You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeError: Cannot read property 'types' of undefined
at buildClientSchema (.../node_modules/graphql/utilities/buildClientSchema.js:57:61)
at Object. (.../gql-json-to-sdl.js:5:26)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
BUG/FIX
Hi I am using a vscode plugin to do graphql autocompletes https://marketplace.visualstudio.com/items?itemName=kumar-harsh.graphql-for-vscode
It requires a gql file so I use grahpql-tools https://www.npmjs.com/package/gql-tools?activeTab=readme.
I download the json scheme
gqlschema http://example.com/graphql -i
Then I convert it to the gql using this library
in a script I call gql-json-to-sdl.js
with the following
I get the following stack trace
TypeError: Cannot read property 'types' of undefined
at buildClientSchema (.../node_modules/graphql/utilities/buildClientSchema.js:57:61)
at Object. (.../gql-json-to-sdl.js:5:26)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
If I change the following https://github.com/graphql/graphql-js/blob/master/src/utilities/buildClientSchema.js#L76
to
it works wondering if that change is a valid fix for this repo or just a one
off solution for my own situation
The text was updated successfully, but these errors were encountered: