Skip to content

Instantly share code, notes, and snippets.

@Cal30
Created January 19, 2017 17:03
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 Cal30/17db3a45b49620761f7f32e225a2434f to your computer and use it in GitHub Desktop.
Save Cal30/17db3a45b49620761f7f32e225a2434f to your computer and use it in GitHub Desktop.
GraphQL Post - People query field
.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