piglovesyou/graphql-let

ReferenceError: name is not defined

Grohden opened this issue · 0 comments

I don't know why, but this name variable is not available for this function:

if (!raw.schema || !raw.documents || !raw.plugins)
printError(new Error(`A config requires a "${name}" field`));
const hasUnnecessaryPlugin = raw.plugins.some((p) => {
const name = typeof p === 'string' ? p : Object.keys(p)[0];
return name === 'typescript';
});

(maybe this is referring to the global dom name and ts accepts it?)
so the error report does not report the error

edit: some context

schema: "http://localhost:3000/graphql"
# documents: "app/javascript/**/*.gql" # commented this line, which is probably my issue
plugins:
  - typescript-operations
  - typescript-react-apollo