Created
March 4, 2019 14:24
-
-
Save tiagopog/3084b34e4af4802f690ca7d0b503ffad to your computer and use it in GitHub Desktop.
GraphQL - Samples
This file contains hidden or 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 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