Last active
June 1, 2019 19:57
-
-
Save richlloydmiles/5faed54b31524eee2d618d7670a4e3c7 to your computer and use it in GitHub Desktop.
example graphQL schema
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type City { | |
id: ID!, | |
name: String!, | |
country: String!, | |
} | |
type Query { | |
fetchCity(id: ID!): City | |
} | |
schema { | |
query: Query | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mutation a { | |
createCity(input: { | |
name: "Cape Town", | |
country: "South Africa" | |
}) { | |
id | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query b { | |
fetchCity(id: "{CITY ID}") { | |
id, | |
name, | |
country | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment