Created
January 19, 2017 17:03
-
-
Save Cal30/17db3a45b49620761f7f32e225a2434f to your computer and use it in GitHub Desktop.
GraphQL Post - People query field
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
.field(newFieldDefinition() | |
.name("people") | |
.description("Find a character by id") | |
.argument(newArgument() // argumento (id: ID) | |
.name("id") | |
.description("People ID") | |
.type(new GraphQLNonNull(GraphQLInt))) | |
.type(new GraphQLTypeReference("People")) | |
.dataFetcher(peopleDataFetcher)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment