Difference between revisions of "GitHub-GraphQL"
Jump to navigation
Jump to search
Line 16: | Line 16: | ||
sudo chgrp staff node_modules/ | sudo chgrp staff node_modules/ | ||
</source> | </source> | ||
+ | |||
+ | Which lead to the error message | ||
+ | <pre> | ||
+ | get-graphql-schema https://api.github.com/graphql > githubschema.graphql | ||
+ | TypeError: Cannot read property '__schema' of undefined | ||
+ | at Object.buildClientSchema (/usr/local/lib/node_modules/get-graphql-schema/node_modules/graphql/utilities/buildClientSchema.js:48:43) | ||
+ | at /usr/local/lib/node_modules/get-graphql-schema/dist/index.js:89:54 | ||
+ | at step (/usr/local/lib/node_modules/get-graphql-schema/dist/index.js:33:23) | ||
+ | at Object.next (/usr/local/lib/node_modules/get-graphql-schema/dist/index.js:14:53) | ||
+ | at fulfilled (/usr/local/lib/node_modules/get-graphql-schema/dist/index.js:5:58) | ||
+ | at <anonymous> | ||
+ | at process._tickCallback (internal/process/next_tick.js:188:7) | ||
+ | </pre> |
Revision as of 17:00, 16 March 2018
Trying to use the GitHub GraphQL API with GrapQL-Java i asked the following Stackoverflow question:
While waiting for an answer I found:
And therefore decided to download the MacOS package of npm from:
Which installed Node.js v8.10.0 and npm v5.6.0 on my system I could then install
npm install -g get-graphql-schema
after fixing the permission errors of the first attempt with
cd /usr/local/lib
sudo chmod g+w node_modules/
sudo chgrp staff node_modules/
Which lead to the error message
get-graphql-schema https://api.github.com/graphql > githubschema.graphql TypeError: Cannot read property '__schema' of undefined at Object.buildClientSchema (/usr/local/lib/node_modules/get-graphql-schema/node_modules/graphql/utilities/buildClientSchema.js:48:43) at /usr/local/lib/node_modules/get-graphql-schema/dist/index.js:89:54 at step (/usr/local/lib/node_modules/get-graphql-schema/dist/index.js:33:23) at Object.next (/usr/local/lib/node_modules/get-graphql-schema/dist/index.js:14:53) at fulfilled (/usr/local/lib/node_modules/get-graphql-schema/dist/index.js:5:58) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7)