Hi,
I'm importing the client like this:
import GraphQLJSClient from 'graphql-js-client'
const graphQLClient = new GraphQLJSClient(types, {
fetcher: function fetcher(graphQLParams) {
return fetch(url, {
body: JSON.stringify(graphQLParams),
method: 'POST',
mode: 'cors',
headers
}).then((response) => response.json());
}
})
inside a *.mjs file. But I'm getting the exception in the subject.
node index.mjs
TypeError: GraphQLJSClient is not a constructor
Hi,
I'm importing the client like this:
inside a *.mjs file. But I'm getting the exception in the subject.