diff --git a/server/schema/schema.js b/server/schema/schema.js index 2f5bb7a..9d4d7d2 100644 --- a/server/schema/schema.js +++ b/server/schema/schema.js @@ -71,6 +71,18 @@ const RootQuery = new GraphQLObjectType({ resolve (parent, args) { 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; + } } } });