gatsby-source-wordpress: GraphQL process stops on this query
See original GitHub issueMy builds sometimes work and sometimes fail with no changes to my code but I think this is related or the cause.
I’ve rewritten this query to be somewhat generic. The area to focus in on is the wpParent part. Any query I have with that kills the GraphQL process immediately. The returned error code is below as well.
query ParentPageQuery {
allWpCustomPostType(limit: 4, filter: {wpParent: {node: {slug: {eq: "parent-slug-name"}}}}) {
nodes {
title
}
}
}
ERROR
Cannot read property 'typeInfo' of undefined
TypeError: Cannot read property 'typeInfo' of undefined
The only way I see around this is to avoid using any wpParent mentions in my queries. I checked the other issues and this isn’t mentioned yet so it may be a new one.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
WORDPRESS-GATSBY DEPLOY FAILS - Stack Overflow
So i changed the query field to graphql but that didnt work either to i resorted to installing the gatsby-source-wordpress plugin hoping it ......
Read more >Troubleshooting Common Errors - Gatsby
comes up when a GraphQL query is trying to query a field for subfields, but none exist. This generally happens when plugins that...
Read more >Using New Gatsby Source WordPress Plugin - CSS-Tricks
js { resolve: gatsby-source-wordpress, options: { // WordPress is the GraphQL url. url: process.env.WPGRAPHQL_URL || https://wpgatsbydemo ...
Read more >Gatsby Changelog | 5.3.0
Gatsby uses child processes to execute its GraphQL queries in parallel (with its own package gatsby-worker ). When Parallel Query Running was introduced ......
Read more >gatsby-source-graphql - npm
By default, gatsby-source-graphql will only refetch the data once the server is restarted. It's also possible to configure the plugin to ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @TylerBarnes, I don’t have an env to share just yet but I will get you one soon. This hasn’t fallen off my radar, I’m still working through this. Some good news, I think I was able to narrow down the issue.
This query works great:
This, throw an error:
Using the slug or the post ID result in the same error.
I think it’s related to the
wpParent
filter. Once I start to use filters for that option stuff starts to break. Not 100% of the time though which is what make this so hard to trace. What seems to work is going to the backend of WP and re-publishing the page. I don’t know if that affects cache but it seems to work sometimes after that.This only happens during
development
and to my knowledge has not affected any builds.For now, I’ll avoid that wpParent filter if only for testing.
Hey again!
It’s been 60 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it. Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m
HUMAN_EMOTION_SORRY
. Please feel free to comment on this issue or create a new one if you need anything else. As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!Thanks again for being part of the Gatsby community! 💪💜