-
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
-warn- Multiple node fields resolve to the same GraphQL field #19491
Comments
Thank you for opening this! These warnings can sometimes occur in certain situations with the wordpress source plugin but they shouldn't cause any troubles. So for now: Save to ignore. If you want you can try WPGraphQL: https://www.wpgraphql.com/ We're marking this issue as answered and closing it for now but please feel free to comment here if you would like to continue this discussion. We also recommend heading over to our communities if you have questions that are not bug reports or feature requests. We hope we managed to help and thank you for using Gatsby! |
Hi @LekoArts, I'm facing the same issue here with Airtable,
Could you please let me know the solution to resolve it, many thanks |
I've got the same issue with Contentstack (https://www.gatsbyjs.org/packages/gatsby-source-contentstack/):
Could it have any impact on |
I have the same issue with Strapi, in specific the gatsby-source-strapi plugin.
|
Closed because? |
The decision is obvious enough: try not to use the same field names for different types. |
same warning with gatsby strapi plugin |
I've got the same warning with gatsby-source-shopify
|
same. |
agree it's strange. it implies that the gatsby schema keeps node field names in a common namespace (hence the collision for .image when you have event.image and city.image). this creates "pressure" to artificially change the schema (if you are led to believe this is a problem for gatsby). I'd really like a definitive answer from the gatsby devs - if this is actually NOT a concern, then this warning should be removed. Otherwise, if this is a legitimate source of problems, what are the possible problems? How do we avoid them - other than going back to the schema to make it "gatsby-aware"? |
Same:
Gatsby libs used:
|
Hey, can this be re-opened? |
@selenecodes, Did you find the solution to this? |
@LekoArts I'm aware that this is not considered an issue & has been closed accordingly. Nevertheless, I think that the people who continue to post in this thread would greatly appreciate some sort of explanation of what is going on here - even just a cursory one. Seeing as this is the top result returned on Google when you search for this warning, I think it's worth providing at least a little bit of info, or a link to some documentation that addresses this. |
A way to squash this would be nice as well, since it doesn't seem to cause any issues... at least not in my case. This seems like a warning about what some might think is a bad architectural design choice, but others think is a perfectly viable way to structure your content. I know in my case, I prefer to name things this way because it makes atomic development easier when I don't have to change the way I reference common models from component to component. Gatsby team, any chance we can silence this warning with a flag? |
It does cause issues in my case, results in GraphQL returning null for many of the fields, until I clear cache and rebuild. Getting worse with 5.10.0 |
Same. No workaround found |
I had this problem using the strapi source. Turns out it was due to configuring a nested entity incorrectly. i.e.:
Caused the issue. Changing it to the following got rid of the warning display and
|
Also having this problem when sourcing from gatsby-source-contentful. Have tried renaming fields to no avail. If the cache is cleared, no problem but on subsequent builds: Multiple node fields resolve to the same GraphQL field Results in missing images, even though this field is required in my contentful and therefore never null. |
Also have this issue when sourcing from gatsby-source-contentful... Clearing cache resolves the issue. Whenever an image is uploaded to Contentful I run into the issue described above. @tony-gutierrez @GemN @PhilLanzetta - I don't suppose any of you managed to resolve this? |
I have not. I'm running all of my projects with v5.2 as it doesn't present this problem. |
Thanks for letting me know, will try out v5.2 now. @LekoArts - can we reopen this issue please. Several people are unable to build without clearing cache due to this issue. Thanks! |
@PhilLanzetta FYI I rolled back to 5.6 and all working now. |
@LekoArts is there any update here? Deprecating back to a previous Gatsby version is not possible for me because of some other dependencies that require the newer versions of Gatsby. |
This isn't always just an innocuous warning. It randomly breaks our builds in Vercel. gabsby - 5.11.0
Retrying the build without the cache works. |
Adding on here. We have the exact same issue where any time this warning appears in the build logs on Netlify, many fields end up as Edit: did #38728 fix this? Looks like there was a release yesterday for the gatsby-source-contentful plugin at least. |
We've had this issue since we were forced to migrate from Gatsby Cloud to Netlify. Might just be a coincidence in terms of timing of releases of Gatsby and/or the contentful-source-plugin. It's quite painful – the incremental builds are already so much slower on Netlify. Having to manually clear the cache multiple times a day isn't great. |
I had a similar issue and was able to solve it with a schema customization: Error:
gatsby-node.js exports.createSchemaCustomization = ({ actions }) => {
const { createTypes } = actions;
createTypes(`
type STRAPI_EXAMPLE_CATEGORY implements Node {
descriptionLong: JSON
}`)
} Probably this is causes by a outdated Strapi version (v4.10.5)… |
might be banal but I am getting this error message when compiling and deploying by gatsby site. That site is still being built but I can't figure out what causes the error message
Message ---
warn Multiple node fields resolve to the same GraphQL field
wordpress__acf_pages.acf.landingbackground
- [landingbackground
,landingbackground___NODE
]. Gatsby will uselandingbackground___NODE
.warn Multiple node fields resolve to the same GraphQL field
wordpress__acf_pages.acf.contactbackground
- [contactbackground
,contactbackground___NODE
]. Gatsby will usecontactbackground___NODE
.warn Multiple node fields resolve to the same GraphQL field
wordpress__acf_pages.acf.exterioricon
- [exterioricon
,exterioricon___NODE
]. Gatsby will useexterioricon___NODE
.warn Multiple node fields resolve to the same GraphQL field
wordpress__acf_pages.acf.interioricon
- [interioricon
,interioricon___NODE
]. Gatsby will useinterioricon___NODE
.warn Multiple node fields resolve to the same GraphQL field
wordpress__acf_pages.acf.additionalicon
- [additionalicon
,additionalicon___NODE
]. Gatsby will usewarn Multiple node fields resolve to the same GraphQL field
wordpress__PAGE.acf.landingbackground
- [landingbackground
,landingbackground___NODE
]. Gatsby will uselandingbackground___NODE
.warn Multiple node fields resolve to the same GraphQL field
wordpress__PAGE.acf.contactbackground
- [contactbackground
,contactbackground___NODE
]. Gatsby will usecontactbackground___NODE
.warn Multiple node fields resolve to the same GraphQL field
wordpress__PAGE.acf.exterioricon
- [exterioricon
,exterioricon___NODE
]. Gatsby will useexterioricon___NODE
.warn Multiple node fields resolve to the same GraphQL field
wordpress__PAGE.acf.interioricon
- [interioricon
,interioricon___NODE
]. Gatsby will useinterioricon___NODE
.warn Multiple node fields resolve to the same GraphQL field
wordpress__PAGE.acf.additionalicon
- [additionalicon
,additionalicon___NODE
]. Gatsby will useadditionalicon___NODE
.warn Multiple node fields resolve to the same GraphQL field
wordpress__wp_media.guid
- [guid___NODE
,guid
]. Gatsby will useguid___NODE
.my query---
query HomePageQuery {
wordpressPage(title: { eq: "Homepage" }) {
acf {
landingbackground {
localFile {
url
childImageSharp {
fluid(quality: 100, maxWidth: 2000) {
...GatsbyImageSharpFluid_withWebp
src
}
}
}
}
contactbackground {
localFile {
url
childImageSharp {
fluid(quality: 100, maxWidth: 1800) {
...GatsbyImageSharpFluid_withWebp
src
}
}
}
}
exterioricon {
localFile {
url
}
}
interioricon {
localFile {
url
}
}
additionalicon {
localFile {
url
}
}
}
}
}
any suggestions?
Summary
Relevant information
Environment (if relevant)
File contents (if changed)
gatsby-config.js
: N/Apackage.json
: N/Agatsby-node.js
: N/Agatsby-browser.js
: N/Agatsby-ssr.js
: N/AThe text was updated successfully, but these errors were encountered: