Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I am getting following error and not sure whats causing problem.
- I tried to run application and getting following
- error:DesktopGraphqlgraphql-playlistserverschemaschema.js:94
- });
- ^
- const RootQuery = new GraphQLObjectType({
- //Query for getting details of a specific book.
- name:'RootQueryType',
- fields:{
- book:{
- type:BookType,
- args:{id:{type:GraphQLID}},
- resolve(parent,args){
- console.log(typeof(args.id));
- return_.find(books,{id:args.id});
- }
- },
- author:{
- type:AuthorType,
- args:{id:{type:GraphQLID}},
- resolve(parent,args){
- //code to get data from db/other source.
- return_.find(authors,{id:args.id});
- }
- },
- books:{
- type:new GraphQLList(BookType),
- resolve(parent,args){
- return books;
- }
- },
- authors:{
- type:new GraphQLList(AuthorType),
- resolve(parent,args){
- return authors;
- }
- }
- //line 94
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement