graphqlHTTP is not a function

Look at the documentation:

const { graphqlHTTP } = require('express-graphql');

Note that it uses destructuring equivalent to:

const graphqlHTTP = require('express-graphql').graphqlHTTP;

require('express-graphql') returns an object with a property called graphqlHTTP that is the function you want to call.

You’re trying to call the object itself as if it was a function.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)