GraphQL Post - Query Object
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
return newObject() | |
.name("Query") | |
.description("Root query") | |
.field(newFieldDefinition() | |
.name("film") | |
.description("Find a film by id") | |
.argument(newArgument() // argumento (id: ID) | |
.name("id") | |
.description("Film ID") | |
.type(new GraphQLNonNull(GraphQLInt))) | |
.type(new GraphQLTypeReference("Film")) | |
.dataFetcher(filmDataFetcher)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment