Skip to content

Instantly share code, notes, and snippets.

@schroedermatt
Last active June 23, 2017 20:44
Show Gist options
  • Save schroedermatt/4df017ec7c4dbdb45e29b04f30db0e9a to your computer and use it in GitHub Desktop.
Save schroedermatt/4df017ec7c4dbdb45e29b04f30db0e9a to your computer and use it in GitHub Desktop.
Build schema using GraphQL IDL.
schema {
query: QueryType
}
type QueryType {
# (id: Long) allows for these fields to be filtered by id
animals(id: Long): [Animal]
keepers(id : Long) : [Keeper]
}
type Keeper {
# ! <= required
id: Long!
name: String!
animals: [Animal]
}
type Animal {
id: Long!
name: String!
type: String!
birthdate: String!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment