Skip to content

Instantly share code, notes, and snippets.

@richlloydmiles
Last active June 1, 2019 19:57
Show Gist options
  • Save richlloydmiles/5faed54b31524eee2d618d7670a4e3c7 to your computer and use it in GitHub Desktop.
Save richlloydmiles/5faed54b31524eee2d618d7670a4e3c7 to your computer and use it in GitHub Desktop.
example graphQL schema
type City {
id: ID!,
name: String!,
country: String!,
}
type Query {
fetchCity(id: ID!): City
}
schema {
query: Query
}
mutation a {
createCity(input: {
name: "Cape Town",
country: "South Africa"
}) {
id
}
}
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