Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@tiagopog
Created March 4, 2019 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tiagopog/3084b34e4af4802f690ca7d0b503ffad to your computer and use it in GitHub Desktop.
Save tiagopog/3084b34e4af4802f690ca7d0b503ffad to your computer and use it in GitHub Desktop.
GraphQL - Samples
type Query {
allPersons(last: Int): [Person!]!
}
type Mutation {
createPerson(name: String!, age: Int!): Person!
}
type Subscription {
newPerson: Person!
}
type Person {
name: String!
age: Int!
posts: [Post!]!
}
type Post {
title: String!
author: Person!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment