diff --git a/server/app.js b/server/app.js index e3e82c6..ef0b70e 100644 --- a/server/app.js +++ b/server/app.js @@ -6,7 +6,8 @@ const schema = require('./schema/schema'); const app = express(); app.use('/graphql', graphqlHTTP({ - schema + schema, + graphiql: true })); app.listen(4000, () => { diff --git a/server/schema/schema.js b/server/schema/schema.js index cae4a48..3a90c94 100644 --- a/server/schema/schema.js +++ b/server/schema/schema.js @@ -28,7 +28,7 @@ const RootQuery = new GraphQLObjectType({ fields: { book: { type: BookType, - args: { id: { GraphQLString } }, + args: { id: { type: GraphQLString } }, resolve (parent, { id }) { return _.find(books, { id }); }