diff --git a/README.md b/README.md index 0608aaf..85595a5 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,27 @@ -globe +

+ globe +

-# Countries GraphQL API +

Countries GraphQL API

+ +
[![Build Status](https://github.com/trevorblades/countries/workflows/Node%20CI/badge.svg)](https://github.com/trevorblades/countries/actions) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md) +
+ A public GraphQL API for information about countries, continents, and languages. This project uses [Countries List](https://annexare.github.io/Countries/) and [`provinces`](https://github.com/substack/provinces) as data sources, 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. +2. The `country.continent` and `country.languages` are now objects and arrays of objects, respectively. 3. Each `Country` has an array of `states` populated by their states/provinces, if any. ## Writing queries ```graphql { - country(code: "BR") { + country(code: BR) { name native emoji @@ -49,6 +55,8 @@ The above GraphQL query will produce the following JSON response: } ``` +## Docs + Check out [the playground](https://countries.trevorblades.com) to explore the schema and test out some queries. ## Examples diff --git a/logo.png b/logo.png new file mode 100644 index 0000000..ae2b801 Binary files /dev/null and b/logo.png differ