From 8ba32602a42a78c90d3cbf84e81fed696204c526 Mon Sep 17 00:00:00 2001 From: Mert Celil <32895330+tufanlodos@users.noreply.github.com> Date: Sat, 22 May 2021 17:36:50 +0300 Subject: [PATCH] expressGraphQL is not a function error fixed --- server.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index dd856b2..6b7a626 100644 --- a/server.js +++ b/server.js @@ -1,5 +1,6 @@ const express = require('express') -const expressGraphQL = require('express-graphql') +const expressGraphQL = require('express-graphql').graphqlHTTP + const { GraphQLSchema, GraphQLObjectType, @@ -132,4 +133,4 @@ app.use('/graphql', expressGraphQL({ schema: schema, graphiql: true })) -app.listen(5000, () => console.log('Server Running')) \ No newline at end of file +app.listen(5000, () => console.log('Server Running'))