diff --git a/server.js b/server.js index dd856b2..d1e460d 100644 --- a/server.js +++ b/server.js @@ -1,5 +1,5 @@ const express = require('express') -const expressGraphQL = require('express-graphql') +const { graphqlHTTP } = require('express-graphql') const { GraphQLSchema, GraphQLObjectType, @@ -128,7 +128,7 @@ const schema = new GraphQLSchema({ mutation: RootMutationType }) -app.use('/graphql', expressGraphQL({ +app.use('/graphql', graphqlHTTP({ schema: schema, graphiql: true }))