-
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
[gatsby-source-wordpress] TypeError: Cannot destructure property 'fields' of 'nodesType' as it is undefined #37114
Comments
Hi! Sorry to hear you're running into an issue. To help us best begin debugging the underlying cause, it is incredibly helpful if you're able to create a minimal reproduction. This is a simplified example of the issue that makes it clear and obvious what the issue is and how we can begin to debug it. If you're up for it, we'd very much appreciate if you could provide a minimal reproduction and we'll be able to take another look. Thanks for using Gatsby! 💜 |
Experiencing the same. Cannot reproduce on a fresh install |
also happens in v6.24.1 |
Seems like it can be an issue caused by the latest update of the WPGRAPHQL plugin |
Also experienced this issue this morning. +1 up on your suggestion @tsamantanis For a temporary fix before this is resolved I downloaded an older version of the WPGraphQL plugin So the new WPGraphQL version seems to be the cultprit here. |
@REDSoftwareRasmus I actually downgraded to v12.3 and the issue was resolved. |
Yeah that's what I did as well 😄 @turbz |
Downgrading WPGraphQL does fix the issue @REDSoftwareRasmus. Thanks! |
Please open an issue on the WPGraphQL GitHub then. Thanks! |
Hey everyone, the errors here come from upgrading WPGraphQL but are due to how I'm currently working on a fix for it and I'll post an update here when I have a new version of Thanks! |
Thanks, this fixed the issue for me too. Downgraded to Version 1.12.2 of WPGraphQL plugin fixed it. |
Exact same issue here after WPGraphQL update to 1.13.x, downgrading fixed it. Using an outdated version of a plugin in a production environment isn't a suitable long-term solution though. |
Yesterday I identified the problem, I'm just reading through the code right now and updating it with the fix, as the fix needs to be applied in multiple places. I'll have a PR up today |
Hey folks, it's taking a little longer than expected but I want to drop an update here. I've fixed all of the issues that were failing builds and causing connections to break. I'm now working through integration test failures on older versions of WPGraphQL. Once I can be sure the changes I made wont break sites on earlier versions of WPGraphQL I'll be able to ship the fix |
I have a fix which is forward/backwards compatible with WPGraphQL! I released it as a canary here |
I released a canary that adds back the |
Hi Tyler, Just upgraded to version 7.2.2. Is this related?
|
Two new versions with the nodeType field fix were published earlier today: @hamiltonbrooke are you able to share your WPGrphQL /graphql endpoint with me so I can reproduce the issue? My email is tyler@gatsbyjs.com if you don't want to share it publicly |
@aaronjtonner are you able to send me your WPGraphQL api endpoint so I can reproduce the problem? Our integration tests do test using |
Sure, here's the endpoint: https://staging.innerspiritphoto.com/graphql |
Thanks @aaronjtonner |
@aaronjtonner that might be due to a change in how WPGraphQL 1.13.0+ works. The field is named In WPGraphQL: {
pages {
nodes {
aCF_BooksPage {
fieldGroupName
}
}
}
} in Gatsby: {
allWpPage {
nodes {
aCF_BooksPage {
fieldGroupName
}
}
}
} |
Thanks Tyler, that fixed those errors! Still dealing with a few other errors that might be due to something else. |
I believe the last remaining issue is the problem you mentioned @hamiltonbrooke but since I'm not able to reproduce it I'm not able to fix it. Is anyone else seeing those same errors on the latest versions? |
|
I'm going to close this since I haven't heard any more reports recently. If anyone is still running into problems please respond here with reproduction steps or open a new issue and I can help you out. Thanks everyone for your patience on this issue and for helping me reproduce bugs! |
+1 same issue with new update version 13 , we downgraded to 12.2 and now works. |
@salmanamemon thanks for sharing, which issue are you having? A description of it + reproduction steps will help a lot. |
Hi @TylerBarnes, It is almost the same as Jason Bahl mentioned. Description Tried to disable all plugins and the error still remained. Rolled back to 1.12.2, and everything works fine again. After re-activating all other plugins everything works fine Steps to reproduce Additional context TypeError: Cannot destructure property 'fields' of 'nodesType' as it is undefined. WPGraphQL Version WordPress Version PHP Version Additional enviornment details Please confirm that you have searched existing issues in the repo. |
@salmanamemon did you upgrade to the latest version of |
No gatbsy-source-wordpress is the same |
@salmanamemon upgrade to the latest 6.x.x version of source-wordpress and it should start working. ( |
I am having the same issue here when updating PHP to 8.1. Is that part of the problem? gatsby-source-wordpress version: 6.25.3 None of the above solutions worked. Right now I have a working site working with PHP 7.4 and will stick with that for now. |
@byebyers I haven't heard reports of that yet, that's odd. Are you saying when you're on the latest versions of those plugins it works until you switch to PHP 8.1? |
Fixes Cannot destructure property 'fields' of 'nodesType' as it is undefined gatsbyjs/gatsby#37114
Fixes Cannot destructure property 'fields' of 'nodesType' as it is undefined gatsbyjs/gatsby#37114
@TylerBarnes I still need to troubleshoot a few things but at first glance, that is what it looks like on my end. I will follow up on this thread once I have more info. |
Hi @TylerBarnes, not sure if this is the correct place for this, but I'm running into problems in local development. Everything is set up properly and I'm using local flywheel. Would this have anything to do with version updates? |
Have you managed to solve the issue? Could you share versions of WP GraphQL, WP Gatsby and gatsby-source-wordpress? I'm struggling with the same issue. |
@Daw-St that's unrelated to this issue, can you open a GH discussion instead? |
Preliminary Checks
Description
Trying to setup Gatsby with Wordpress.
"Encountered a critical error when running the buildNodeQueries build step."
"TypeError: Cannot destructure property 'fields' of 'nodesType' as it is undefined.
at generateNodeQueriesFromIngestibleFields"
Reproduction Link
na
Steps to Reproduce
Fresh WP install with latest plugin versions of
graphql url is reachable and graphiql ide returns correct post data for a basic query.
Fresh Gatsby install with Wordpress.
Run gatsby develop and get the above error.
Expected Result
success
Actual Result
error
Environment
Config Flags
No response
The text was updated successfully, but these errors were encountered: