https://github.com/conermurphy/covid-19-graphql-api
A GraphQL based API to query data relating to the COVID-19 pandemic.
https://github.com/conermurphy/covid-19-graphql-api
Last synced: over 1 year ago
JSON representation
A GraphQL based API to query data relating to the COVID-19 pandemic.
- Host: GitHub
- URL: https://github.com/conermurphy/covid-19-graphql-api
- Owner: conermurphy
- Created: 2020-04-23T20:36:59.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-12T15:27:35.000Z (over 3 years ago)
- Last Synced: 2024-06-12T18:43:17.436Z (about 2 years ago)
- Language: JavaScript
- Homepage:
- Size: 139 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# COVID-19 GraphQL API
A GraphQL API to allow for the querying of data relating to the COVID-19 pandemic. Data is based off the [Johns Hopkins CSSE 2019 Novel Coronavirus COVID-19 (2019-nCoV) Data Repository](https://github.com/CSSEGISandData/COVID-19).
## Technologies used:
- GraphQL
- NodeJS
- Apollo Server
- Netlify
## How to use:
The API is now live and can be used @ https://covid-19-graphql-api.herokuapp.com/
### Queries:
Currently you can query for the below:
- All Countries / Territories dead, recovered and confirmed case numbers.
- Individual Country / Territory dead, recovered and confirmed case numbers.
Below is an example query for both:
**All:**
```
query {
getTimeSeriesAll {
uniqueId
dead
confirmed
recovered
}
}
```
**Individual:**
```
query {
getTimeSeries(uniqueId: "United-Kingdom") {
dead
recovered
confirmed
}
}
```
To query for an individual country / territory you will need to find their uniqueId, which is made up of the territory and country name. For example:
```
"uniqueId": "Gibraltar-United-Kingdom"
"uniqueId": "United-Kingdom"
```
If you want to get a full list of uniqueId's you can run:
```
query {
getTimeSeriesAll {
uniqueId
}
}
```
## Contributing
I am happy for people to contribute to the project, if you see a better way of doing something or just have an idea, raise a PR.