Created
December 24, 2018 15:09
-
-
Save zegnus/7bdcf3188887aa15078d179373f591e3 to your computer and use it in GitHub Desktop.
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
RootQuery = new GraphQLObjectType({ | |
name: 'RootQueryType', | |
fields: { | |
book: { | |
type: BookType, | |
args: { id: { type: GraphQLString } }, | |
resolve(parent, args) { | |
// find data | |
return lodash.find(books, {id: args.id}) | |
} | |
} | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment