-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Query.node defined in resolvers, but not in schema #25405
Comments
Quick googling shows that it is probably an apollo-server issue (at least there is a couple of similar reports in their repo): apollographql/apollo-server#2656 Have you checked those? |
Yes, but why only Gatsby graphql plugin complains about this? Our graphql server has been working fine for some time. If we have to make changes to get this running, we can, but I find it odd that only Gatsby has issues with this? |
You are right, it happens when we try to transform the schema using gatsby/packages/gatsby-source-graphql/src/gatsby-node.js Lines 97 to 101 in c2f42cb
It throws even without custom Gatsby transforms. So probably a bug somewhere in One interesting thing though is that you have this Do you even use |
I actually had to convert the |
Description
We are trying to make use of an existing Apollo Graphql Server for a new Gatsby site. I am not sure why but we are getting this error on
gatsby develop
.Error:
Query.node defined in resolvers, but not in schema
.Our Apollo server has been working with no issues and the above error we are getting from Gatsby doesn't seem to be legitimate.
Our schema does have the
node
definition as shown below:I enabled the playground for the graphql server also if you need any additional info.
Steps to reproduce
Here is a simple repo you can use to reproduce the problem: https://github.com/GreenOn/gatsby-apollo-dynos.
I followed the example posted here and updated the config file with our graphql server name: https://github.com/jlengstorf/gatsby-with-apollo
Expected result
The expected result is to run the project successfully getting all the queries working at the build time.
Actual result
On executing
gatsby develop
, it fails immediately after loadinggatsby-config.js
.Environment
System:
OS: Windows 10 10.0.18362
CPU: (4) x64 Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz
Binaries:
Node: 12.16.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.4 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.14.0 - C:\Program Files\nodejs\npm.CMD
Languages:
Python: 2.7.16 - /c/Users/pramo/.windows-build-tools/python27/python
Browsers:
Edge: 44.18362.449.0
npmPackages:
gatsby: ^2.0.19 => 2.23.11
gatsby-source-graphql: ^2.0.6 => 2.5.7
npmGlobalPackages:
gatsby-cli: 2.12.50
The text was updated successfully, but these errors were encountered: