-
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
TypeError when using sort/filters on allWpTermNode #30586
Comments
Looking into this further there seems to be a problem using allWpTermNode in general if you have any custom taxonomies registered. |
Do you experience this same issue in Gatsby v2? |
I experience the same problem. It happens on all filters related to
Running latest versions of all plugins. |
Same issue here.
P.S. @henrikwirth Thank you so much for all the help your contributions have made on my latest project :) |
I was able to resolve this issue by downgrading wp-graphql to 1.3.5 if anyone needs a quick fix. |
Interesting. So with v1.5.6 it breaks? |
@AlexMorrisonDev716 I think getting this to work by downgrading to WPGraphQL v1.3.5 must be a coincidence, because this issue was opened before WPGraphQL 1.3.5 was even released 🤔 |
@jasonbahl At least with my current combination of packages and plugins v1.3.5 is the last version of WPGraphQL that doesn't cause this error on build. |
Same error upgrading WpGraphQL. My query involves allWpContentNode:
The error diseappears after downgrading WpGraphQL to 1.3.5 |
@tiggeymone Thank you for replicating this! |
I just had a look at this and it appears to be an issue with Gatsby v3. When downgrading to v2 the query doesn't throw any errors and resolves properly. Minimal repro here https://github.com/TylerBarnes/gatsby-starter-wordpress-blog-1 @vladar do you have any ideas on what could be causing this or how we can debug it? |
@TylerBarnes I also get an error when I try to update a Term of a Taxonomy while running It seems after the update is pushed by WordPress, it can't find Terms anymore, maybe because to update tries to apply filters?
Not sure if it is related, but it might be. |
@vladar, do you have any thoughts on the issue? I'm stuck, I wish I had a better idea here, unfortunately. |
@TylerBarnes and @vladar, did we have any luck with this one? |
Also still blocked by this on two projects. Any leads to this? Anything I can look into myself? |
In my case, I'm developing a custom WPGraphQL plugin that extends WooCommerce product term, a misconfiguration in my product connection was causing this error to occur. |
Can you try it with |
@henrikwirth it's resolved in #32195 👍 I tested it on the repro above ☝️ and it works. |
@TylerBarnes and @vladar thanks, I just tried and it seems to work for me again 🚀 |
When querying a gatsby dev server (as in http://localhost:8000/__graphql when running gatsby develop) the server crashes if you query allWpTermNode with a filter or sort parameter. The error received looks as follows:
Steps to reproduce
Query something like the following from a gatsby dev server connected to a wordpress site with some taxonomies added.
Expected result
The query return the expected terms.
Actual result
Server crashes with the error
type.resolveType is not a function
Environment
npmGlobalPackages:
gatsby-cli: 3.0.0
Wordpress 5.7
wp-graphql 1.3.3
wp-gatsby 1.0.7
The text was updated successfully, but these errors were encountered: