-
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
GraphQL Error Unknown field ... on type ... #8053
Comments
I'm able to reproduce this and getting it on the first run and every time |
I am also seeing this error. Similar environment but am seeing the behavior regardless of the |
same here |
Found a behavior in my case that might hint at the underlying issue (I'm on v2 btw I'm pulling in multiple AirTable sources ( |
@JanLenoch this happens because it this moment gatsby doesn't support class instances when constructing schema
I think fastest way forward would be to normalize fields you get from |
@JanLenoch I've hacky checked yesterday and it seems that what we need is really only way to determine when Object is something we would want to handle - just switching our check here https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/src/schema/data-tree-utils.js#L174 should be enough to make it work, but not sure what's the best check we can use - switching it to more open |
Works around the "Unknown field ... on type ..." [GraphQL error](gatsbyjs/gatsby#8053). **Note:** Introduces a breaking change. The data of content elements now reside in the `elements` property, not in the root of each `kenticoCloudItem` node.
Hi @pieh , I found a semi-hacky way of passing plain objects to Gatsby while still being able to utilize our JS SDK at the same time. We're currently doing a peer review of my PR that brings the plain objects. In the mid-term future, it would still be great if Gatsby supported class instances. That way, we could avoid this semi-hacky solution. I'll close this one for now and I'll file a new issue to support class instances. Thanks for looking into it. |
Description
Occasionally, during the process of building a project with
gatsby develop
an error occurs:"GraphQL Error Unknown field
some field
on typesome type
"It definitely happens every time the project is first run (after initializing it with
npm install
). But, it also happens in other moments, in a random fashion.Steps to reproduce
Expected result
The
update schema
step should be processed without errors.Actual result
Environment
System:
OS: Windows 10
CPU: x64 Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
Binaries:
npm: 5.6.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: 40.15063.674.0
npmPackages:
gatsby: ^1.9.277 => 1.9.277
gatsby-link: ^1.6.46 => 1.6.46
gatsby-plugin-react-helmet: ^2.0.11 => 2.0.11
error The system cannot find the path specified.
Error: The system cannot find the path specified.
envinfo.js:1 Function.e.exports.sync
[npm]/[gatsby-cli]/[envinfo]/dist/envinfo.js:1:7778
envinfo.js:1 Object.copySync
[npm]/[gatsby-cli]/[envinfo]/dist/envinfo.js:1:104976
envinfo.js:1 Object.t.writeSync.e [as writeSync]
[npm]/[gatsby-cli]/[envinfo]/dist/envinfo.js:1:123499
envinfo.js:1
[npm]/[gatsby-cli]/[envinfo]/dist/envinfo.js:1:124274
envinfo.js:1 Promise.all.then.e
[npm]/[gatsby-cli]/[envinfo]/dist/envinfo.js:1:124289
From previous event:
envinfo.js:1 p
[npm]/[gatsby-cli]/[envinfo]/dist/envinfo.js:1:123986
envinfo.js:1 Object.run
[npm]/[gatsby-cli]/[envinfo]/dist/envinfo.js:1:125487
create-cli.js:181 Object.handler
[npm]/[gatsby-cli]/lib/create-cli.js:181:17
command.js:235 Object.runCommand
[npm]/[gatsby-cli]/[yargs]/lib/command.js:235:44
yargs.js:1046 Object.parseArgs [as _parseArgs]
[npm]/[gatsby-cli]/[yargs]/yargs.js:1046:30
yargs.js:551 Object.parse
[npm]/[gatsby-cli]/[yargs]/yargs.js:551:25
create-cli.js:242 module.exports
[npm]/[gatsby-cli]/lib/create-cli.js:242:157
index.js:126 Object.
[npm]/[gatsby-cli]/lib/index.js:126:1
bootstrap_node.js:187 startup
bootstrap_node.js:187:16
bootstrap_node.js:608
bootstrap_node.js:608:3
error UNHANDLED REJECTION
Error: The system cannot find the path specified.
envinfo.js:1 Function.e.exports.sync
[npm]/[gatsby-cli]/[envinfo]/dist/envinfo.js:1:7778
envinfo.js:1 Object.copySync
[npm]/[gatsby-cli]/[envinfo]/dist/envinfo.js:1:104976
envinfo.js:1 Object.t.writeSync.e [as writeSync]
[npm]/[gatsby-cli]/[envinfo]/dist/envinfo.js:1:123499
envinfo.js:1
[npm]/[gatsby-cli]/[envinfo]/dist/envinfo.js:1:124274
envinfo.js:1 Promise.all.then.e
[npm]/[gatsby-cli]/[envinfo]/dist/envinfo.js:1:124289
From previous event:
envinfo.js:1 p
[npm]/[gatsby-cli]/[envinfo]/dist/envinfo.js:1:123986
envinfo.js:1 Object.run
[npm]/[gatsby-cli]/[envinfo]/dist/envinfo.js:1:125487
create-cli.js:181 Object.handler
[npm]/[gatsby-cli]/lib/create-cli.js:181:17
command.js:235 Object.runCommand
[npm]/[gatsby-cli]/[yargs]/lib/command.js:235:44
yargs.js:1046 Object.parseArgs [as _parseArgs]
[npm]/[gatsby-cli]/[yargs]/yargs.js:1046:30
yargs.js:551 Object.parse
[npm]/[gatsby-cli]/[yargs]/yargs.js:551:25
create-cli.js:242 module.exports
[npm]/[gatsby-cli]/lib/create-cli.js:242:157
index.js:126 Object.
[npm]/[gatsby-cli]/lib/index.js:126:1
bootstrap_node.js:187 startup
bootstrap_node.js:187:16
bootstrap_node.js:608
bootstrap_node.js:608:3
The text was updated successfully, but these errors were encountered: