Git Product home page Git Product logo

Comments (7)

TylerBarnes avatar TylerBarnes commented on June 15, 2024 1

👋 @maghaffar I'm the former maintainer of WPGatsby and gatsby-source-wordpress.
Some context on the two errors seen above:

  1. The "duplicate IDs" error happens when WPGraphQL pagination is broken - this is usually due to a WPGraphQL PHP extension plugin not working properly with the latest WPGraphQL due to changes in how WPGraphQL pagination works or a similar reason like custom PHP site code doing something it shouldn't. We've seen that many times with WPGraphQL over the years whenever pagination logic in WPGQL changes, or when plugins do something weird, hence why I added that error message. I means during pagination the same page of nodes was returned multiple times.

  2. The interface error is either one of two posibilities (or both?). graphql-js seems to be more strict than graphql-php about properly implementing interface types. I've seen that before in the past, and it seems odd that Interface field WordpresswpHierarchicalContentNode.lastEditedBy expects WordpressWpContentNodeToContentTypeConnectionEdge but it's a different type, as those types aren't hardcoded in gatsby-source-wordpress. Or WPGraphQL made a breaking change in a minor release because the change wouldn't effect most users (ie it probably didn't change anything for any non-gatsby users).

In any case, what @justlevine said is true, there is no one maintaining gatsby-source-wordpress. I recodmmend pinning to an older WPGraphQL version and looking at migrating off of gatsby-source-wordpress

However, pre V1.0 of WPGraphQL, these errors in Gatsby actually revealed a ton of bugs in WPGraphQL because Gatsby essentially acts as a giant integration test of the entire WPGraphQL schema. So if I was a WPGraphQL maintainer, I wouldn't investigate this issue to fix Gatsby, but I would to make sure WPGQL is actually working properly.

from wp-graphql.

justlevine avatar justlevine commented on June 15, 2024

Hey @maghaffar

Afaik both gatsby-source-wordpress and it's companion wp-gatsby have been all but discontinued.

I'm not entirely sure what "bug in WPGraphQL" that error message is referring to, but there's been a lot of improvements to pagination on the WPGraphQL side of things, so it's hard to know at a glance if it's still relevant.

Sadly, there's not much we can do without the ability to replicate, and even less when it involves a 3rd party extension. I'd recommend trying your luck by opening an issue in GatsbyJS, but they'll likely also require some form of replication steps in order to address.

from wp-graphql.

justlevine avatar justlevine commented on June 15, 2024

PS: I've marked this ticket as invalid?. This doesnt imply that your issue isn't real, but rather indicates that its likely beyond the scope of WPGraphQL core, and therefore not actionable by the maintainers using GitHub's bug tracker.

from wp-graphql.

maghaffar avatar maghaffar commented on June 15, 2024

PS: I've marked this ticket as invalid?. This doesnt imply that your issue isn't real, but rather indicates that its likely beyond the scope of WPGraphQL core, and therefore not actionable by the maintainers using GitHub's bug tracker.

@justlevine Actually this was the problem with WPGraphql 1.6.10. When I upgraded to 1.24 the latest version, the error was gone. But the latest version is causing another problem. First after some minutes, WPGraphql is roll backed to its previous 1.6 version. I don't know why?. And second it is causing an error, I am attaching ss.
Screenshot from 2024-04-26 11-04-19
Screenshot from 2024-04-26 11-03-31
The above errors are gone with 1.6 and when I upgrade to 1.24, they happen again on Netlify

from wp-graphql.

justlevine avatar justlevine commented on June 15, 2024

Thanks @maghaffar for the additional context 🙇

Those errors in red indeed point to an issue in Gatsby. Since 1.6.0's release in 2021, we've fixed numerous stability issues with resolvers, leading to issues with plugins who were using features as bugs or otherwise incorrectly implementing the Relay Pagination spec. Similarly, some enhancements may require the extension to opt-in or conflict with naive implementations that assumed certain hardcoded values.

As mentioned, Gatsby's WordPress solution has been mostly abandoned for quite a while (with Gatsby itself following suit more recently). It's possible people in the #gatsby channel on WPGraphQL slack have found workarounds (I suggest you check/ask there), but the likelihood of an official fix in gatsby-source-wordpress is slim to none.

(The errors in white are either unrelated, or a similarly sourced side effect. Your OP said you weren't using any other plugins; if that's indeed true then you should take a look whatever custom code you're using to expose Product types to the schema. If you are using an extension, I'd suggest trying to replicate those queries in WPGraphQL's IDE (not Gatsby's GraphQL endpoint) to see how the plugin's schema has changed and what fields are currently available, and rule out any issues from Gatsby's automagical transformations.)

from wp-graphql.

justlevine avatar justlevine commented on June 15, 2024

@maghaffar it seems you found the related issues over in #1116 and the even more relevant gatsbyjs/gatsby#37729, so I'm going to go ahead and close out this bug report, since as mentioned there's nothing we can really do to address bugs in 3rd party code, and to keep all the relevant conversations in one place in the hope they actually can become actionable by the relevant external plugins.

Please free to open any future bug reports you discover in WPGraphQL's core plugin as issues in this repository, and to ask for usage support over in GitHub Discussions or the relevant Slack channel.

from wp-graphql.

justlevine avatar justlevine commented on June 15, 2024

Thanks as always @TylerBarnes for those details - especially the explanation of that error message!

Or WPGraphQL made a breaking change in a minor release because the change wouldn't effect most users (ie it probably didn't change anything for any non-gatsby users).

This is a particular important note. I know two minors since v1.6 in 2021 that accidentally broke b/c just off the top of my head, and then of course the Relay pagination enforcement fix that had a significantly more breaking impact than expected on all of those id: Int nodes 😳. We've since become a lot better about enforcing SemVer and have significantly increased test coverage, but theres still gaps we need to look out for.

So if I was a WPGraphQL maintainer, I wouldn't investigate this issue to fix Gatsby, but I would to make sure WPGQL is actually working properly.

So much this.

@maghaffar I want to be super clear (in case I came off otherwise) that I'm not trying to dismiss your issue. We track discussions on closed bug reports the same as open ones. My sole intent was to consolidate the bug tracking to the preexisting issue you found that has more actionable context while pointing you to the ideal support channels where people can help walk you through finding a solution to your particular issue or at the very least help you generate some more context to your issue can become actionable. Again, so sorry if I came off otherwise!

from wp-graphql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.