DEV Community

loading...

GraphQL endpoint for getting stats of COVID19

sharadcodes profile image Sharad Raj (He/Him) ・1 min read

I,ve created a GraphQL endpoint for getting stats of COVID19.
Use it and send a pull on REPO, I'll add it to the showcase.

Also I welcome all those who want to make it better. :)

LINK OF ENDPOINT: https://sharad-gql-covid19.herokuapp.com/graphql

Alt Text

Discussion

pic
Editor guide
Collapse
nickdesignsthings profile image
Nick Burczyk

I really want to use this API! I tried to use this in a codesandbox and got a "Network error: Failed to fetch" error. Do I need to so anything special to use this?

Collapse
sharadcodes profile image
Sharad Raj (He/Him) Author

Did u tried again, it's not a normal API btw you'll have to use a lil different code perform the fetch on /graphql

Collapse
nickdesignsthings profile image
Nick Burczyk

Can you please include that different code in your readme/docs to help? I tried it in code sandbox, and now again locally with create-react-app with Apollo set up. Still no luck

Thread Thread
sharadcodes profile image
Sharad Raj (He/Him) Author

Hang on I'm setting up the docs

Thread Thread
nickdesignsthings profile image
Thread Thread
sharadcodes profile image
Thread Thread
nickdesignsthings profile image
Nick Burczyk

Awesome :) I got it working and am playing with building out the app. Will let you know when it is live!

Thread Thread
sharadcodes profile image
Collapse
sharadcodes profile image
Sharad Raj (He/Him) Author

Let me see and resolve the problem

Collapse
sharadcodes profile image
Sharad Raj (He/Him) Author

It it fixed for you now ?

Collapse
nickdesignsthings profile image
Nick Burczyk

Thanks for posting this gql server! This is an interesting distraction in difficult times

Thread Thread
sharadcodes profile image
Collapse
cloudmunk profile image
CloudMunk

Dude this is awesome! Thank you! :)

Collapse
sharadcodes profile image
Collapse
cloudmunk profile image
CloudMunk

Could you provide a coordinates(longitude, latitude) endpoint as well? :)

Thread Thread
sharadcodes profile image
Sharad Raj (He/Him) Author

Yeah I'll do it by today night

Thread Thread
cloudmunk profile image
CloudMunk

You're a champ man! Thank you so much! :D

I'll leave you a link here once I am done building the app :)

Thread Thread
sharadcodes profile image
Sharad Raj (He/Him) Author

Welcome :) ... Cool looking forward

Thread Thread
sharadcodes profile image
Sharad Raj (He/Him) Author

I've added them have a look

Thread Thread
cloudmunk profile image
CloudMunk

I don't see them, what are they named?

Alt text of image

Thread Thread
sharadcodes profile image
Collapse
bardaxx profile image
Giacomo Alonzi

Wow, can I use those data on my project? covidlive.it

Collapse
sharadcodes profile image
Collapse
bardaxx profile image
Giacomo Alonzi

Done! ✌️😷 covidlive.it/en

I found an inconsistency from your numbers and mine in Italy. Do you know why?

Thread Thread
sharadcodes profile image
Sharad Raj (He/Him) Author

Cool submit a PR on repo...

and Why

Collapse
pebg profile image
pebg

Thanks !
You should also add yesterdayCases and yesterdayDeaths because most of the daily data are partial.

Collapse
sharadcodes profile image
Sharad Raj (He/Him) Author

You're welcome...
Okay I'll add it by today night

Collapse
6igo profile image
Bensigo Egwey

Wonderful work.

Collapse
sharadcodes profile image