Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read property '__schema' of undefined #25

Open
zakayothuku opened this issue Sep 12, 2018 · 1 comment
Open

TypeError: Cannot read property '__schema' of undefined #25

zakayothuku opened this issue Sep 12, 2018 · 1 comment

Comments

@zakayothuku
Copy link

When i try to get the graphql schema from my backend (graphcool), it doesn't work anymore. It worked the first time, but now it no longer works.

What could be the problem?

This is the issue thrown.

TypeError: Cannot read property '__schema' of undefined at Object.buildClientSchema (C:\Users\User\AppData\Roaming\npm\node_modules\get-graphql-schema\node_modules\graphql\utilities\buildClientSchema.js:48:43) at C:\Users\User\AppData\Roaming\npm\node_modules\get-graphql-schema\dist\index.js:89:54 at step (C:\Users\User\AppData\Roaming\npm\node_modules\get-graphql-schema\dist\index.js:33:23) at Object.next (C:\Users\User\AppData\Roaming\npm\node_modules\get-graphql-schema\dist\index.js:14:53) at fulfilled (C:\Users\User\AppData\Roaming\npm\node_modules\get-graphql-schema\dist\index.js:5:58) at <anonymous> at process._tickCallback (internal/process/next_tick.js:160:7)

@zakayothuku zakayothuku changed the title Getting TypeError: Cannot read property '__schema' of undefined TypeError: Cannot read property '__schema' of undefined Sep 12, 2018
@souenzzo
Copy link

souenzzo commented Feb 4, 2019

One line reproduce
npx [email protected] 'https://api.github.com/graphql'

npx: installed 12 in 1.252s
TypeError: Cannot read property '__schema' of undefined
    at Object.buildClientSchema (/home/souenzzo/.npm/_npx/10103/lib/node_modules/get-graphql-schema/node_modules/graphql/utilities/buildClientSchema.js:55:43)
    at /home/souenzzo/.npm/_npx/10103/lib/node_modules/get-graphql-schema/dist/index.js:90:54
    at step (/home/souenzzo/.npm/_npx/10103/lib/node_modules/get-graphql-schema/dist/index.js:33:23)
    at Object.next (/home/souenzzo/.npm/_npx/10103/lib/node_modules/get-graphql-schema/dist/index.js:14:53)
    at fulfilled (/home/souenzzo/.npm/_npx/10103/lib/node_modules/get-graphql-schema/dist/index.js:5:58)
    at processTicksAndRejections (internal/process/next_tick.js:81:5)

After add the auth token --header 'Authorization=bearer ....' worked.. but it can handle a better error message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants