rlindskog / covid19-graphql

COVID-19 GraphQL API
https://covid19-graphql.now.sh/
MIT License
84 stars 22 forks source link

Country codes #13

Open elm-suf opened 4 years ago

elm-suf commented 4 years ago

Can you please add country codes and/or lat-long

rlindskog commented 4 years ago

I think this is a great “first PR” issue, totally doable.

All it would require is updating the Country type with a code attribute in the schema, running “yarn generate”, creating the “code” resolver in the country resolver, creating a country name -> code map ‘{ [countryName: string]: string }’, and returning the code in the resolver.