From 7c24282ff172544dfd0479261e26200b8a38ca4c Mon Sep 17 00:00:00 2001 From: AKSHAT Date: Thu, 5 Nov 2020 22:29:03 +0530 Subject: [PATCH] Updated expressGraphQL to graphqlHTTP --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 }))