Not sure why am I getting this error.
Please help.

const express = require('express');
const graphqlHTTP = require('express-graphql');
const app = express();
app.use('/graphql', graphqlHTTP({
graphiql: true
}));
app.listen(4000, () => {
console.log('Listening to port 4000');
});
CodePudding user response:
From their doc
const { graphqlHTTP } = require('express-graphql');