Instantly share code, notes, and snippets.

Embed
What would you like to do?
const RootQuery = new GraphQLObjectType({
name: 'RootQueryType',
fields: {
gadget: {
type: gadgetGraphQLType,
args: { id: { type: GraphQLString }},
resolve(parent, args) {
return Gadget.findById(args.id)
}
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment