I was setting up my schema in the Graph Manager for first time, and I tried to run apollo service:check command before running apollo service:push to see what happens.
Intended outcome:
I was expecting some error message saying No services publishet yet or No graph found and instructions to follow up.
Actual outcome:
I got the following error:
✔ Loading Apollo Project
✔ Loading Apollo Project
✖ Validating schema against tag current on graph <graph-id>
→ Cannot read property 'hash' of null
Comparing schema changes
Reporting result
Error: Cannot read property 'hash' of null
at execute.then (~/path/to/node_modules/apollo-language-server/lib/engine/index.js:63:23)
error Command failed with exit code 2.
Then, I published using apollo service:push, and tried again. Everything worked as expected.
It's not a primary issue, but the developer experience could be better since I am setting up things for the first time and the cli didn't helped me to troubleshoot.
How to reproduce the issue:
Run apollo service:check with an ENGINE_API_KEY of a new service that is not puslished yet.
Versions
node: 10.16.3
apollo: 2.18.3
graphql: 14.5.8
Oof. yeah, this is a really bad error. thanks for pointing that out! I'll take a look at fixing that soon :)
Most helpful comment
Oof. yeah, this is a really bad error. thanks for pointing that out! I'll take a look at fixing that soon :)