2020-02-27 10:53:52 -08:00
2020-02-26 20:08:15 -08:00
2019-07-22 00:49:40 -07:00
2020-02-21 12:46:28 -08:00
2020-02-26 20:08:15 -08:00
2019-05-30 15:47:29 -07:00
2020-02-26 20:08:15 -08:00
2020-02-26 20:10:54 -08:00
2020-02-26 20:02:44 -08:00
2020-02-27 10:53:52 -08:00

globe

Countries GraphQL API

Build Status Contributor Covenant

A public GraphQL API for information about countries, continents, and languages. This project uses Countries List as a data source, so the schema follows the shape of that data, with a few exceptions:

  1. The codes used to key the objects in the original data are available as a code property on each item returned from the API.
  2. The continent and languages properties are now objects and arrays of objects, respectively.

Writing queries

{
  country(code: "BR") {
    name
    native
    emoji
    currency
    languages {
      code
      name
    }
  }
}

The above GraphQL query will produce the following JSON response:

{
  "data": {
    "country": {
      "name": "Brazil",
      "native": "Brasil",
      "emoji": "🇧🇷",
      "currency": "BRL",
      "languages": [
        {
          "code": "pt",
          "name": "Portuguese"
        }
      ]
    }
  }
}

Check out the playground to explore the schema and test out some queries.

Examples

License

MIT

Description
No description provided
Readme MIT 1.9 MiB
Languages
JavaScript 99.6%
Procfile 0.4%