Change code to ID

This commit is contained in:
Trevor Blades
2020-03-27 09:10:43 -07:00
parent 84a1a9229a
commit 9e83568a16
2 changed files with 26 additions and 46 deletions

View File

@@ -19,7 +19,6 @@ A public GraphQL API for information about countries, continents, and languages.
3. Each `Country` has an array of `states` populated by their states/provinces, if any.
- [Writing queries](#writing-queries)
- [Migration notes (pre-March 2020)](#migration-notes-pre-march-2020)
- [Docs](#docs)
- [Examples](#examples)
- [License](#license)
@@ -28,7 +27,7 @@ A public GraphQL API for information about countries, continents, and languages.
```graphql
{
country(code: BR) {
country(code: "BR") {
name
native
capital
@@ -64,20 +63,6 @@ The above GraphQL query will produce the following JSON response:
}
```
### Migration notes (pre-March 2020)
In the first version of this API, `code` arguments were treated as `String`s. Now, they are enums of valid options only. To migrate, simply remove the double quotes from your existing code arguments:
```diff
{
- country(code: "CA") {
+ country(code: CA) {
name
emoji
}
}
```
## Docs
Check out [the playground](https://countries.trevorblades.com) to explore the schema and test out some queries.