A public GraphQL API for information about countries, continents, and languages. This project uses Countries List and provinces
as data sources, so the schema follows the shape of that data, with a few exceptions:
- The codes used to key the objects in the original data are available as a
code
property on each item returned from the API. - The
country.continent
andcountry.languages
are now objects and arrays of objects, respectively. - Each
Country
has an array ofstates
populated by their states/provinces, if any.
{
country(code: "BR") {
name
native
capital
emoji
currency
languages {
code
name
}
}
}
The above GraphQL query will produce the following JSON response:
{
"data": {
"country": {
"name": "Brazil",
"native": "Brasil",
"capital": "BrasÃlia",
"emoji": "🇧🇷",
"currency": "BRL",
"languages": [
{
"code": "pt",
"name": "Portuguese"
}
]
}
}
}
Check out the playground to explore the schema and test out some queries.
- React
- React Native
- ReasonML
- Country quiz app (React, TypeScript)
- Python
- Seed