Skip to content
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

fix(gatsby-source-wordpress): schema customization errors #30358

Merged
merged 21 commits into from Mar 24, 2021

Conversation

TylerBarnes
Copy link
Contributor

@TylerBarnes TylerBarnes commented Mar 20, 2021

This PR fixes:

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Mar 20, 2021
@TylerBarnes TylerBarnes added topic: source-wordpress Related to Gatsby's integration with WordPress and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Mar 20, 2021
@TylerBarnes TylerBarnes self-assigned this Mar 23, 2021
@TylerBarnes TylerBarnes marked this pull request as ready for review March 23, 2021 17:03
@TylerBarnes
Copy link
Contributor Author

Seems like the failing tests are unrelated to this PR

@TylerBarnes TylerBarnes merged commit 5c9b744 into master Mar 24, 2021
@TylerBarnes TylerBarnes deleted the fix/wp-schema-customization-errors branch March 24, 2021 18:50
@TylerBarnes TylerBarnes added this to To cherry-pick in V2 Release hotfixes via automation Mar 24, 2021
@vladar
Copy link
Contributor

vladar commented Mar 24, 2021

Should this be a V2 hotfix? Or V3? V3 project is V3 Release hotfixes

@TylerBarnes
Copy link
Contributor Author

TylerBarnes commented Mar 24, 2021

@vladar I've heard from some users that they haven't been able to move on from v2 yet because they've run into a lot of troubles. I did ask them to open issues so we can fix them but I know they're still on v2 for now. Do we have a support plan for v2?

EDIT: I checked that the v3 specific change with prefixing the __typename field works on Gatsby v2 if that's why you're asking. The other schema customization issues were present in v2 as well.

@vladar
Copy link
Contributor

vladar commented Mar 24, 2021

Yeah I was confused by the first item in the list:

On Gatsby v3 the type of nodes in node interfaces seem to be resolved slightly differently - which is by the __typename field...

So I assumed it was a fix for v3. Thanks for clarifying this 👍

I've heard from some users that they haven't been able to move on from v2 yet because they've run into a lot of troubles

Are there any related open issues about it?

pieh pushed a commit that referenced this pull request Apr 2, 2021
* use new reporter.panic signature with error code for schema customization

* add the prefixed typename as a node property when creating nodes to prevent gql errors with interfaces

* fix union types that have a field called "type"

* prevent excluded types from throwing errors in connection fields

* test node interface resolution

* test that interfaces that are mixed node and non-node resolve

* prefix the __typename field in the default resolver for Gatsby v3

* an interface type is only a gatsby node type if all implementing types are gatsby node types

* exclude Commenter.databaseId in int tests to get around WPGQL bug

* only return null if there's no gatsby node AND no resolved field data

(cherry picked from commit 5c9b744)
pieh pushed a commit that referenced this pull request Apr 2, 2021
* use new reporter.panic signature with error code for schema customization

* add the prefixed typename as a node property when creating nodes to prevent gql errors with interfaces

* fix union types that have a field called "type"

* prevent excluded types from throwing errors in connection fields

* test node interface resolution

* test that interfaces that are mixed node and non-node resolve

* prefix the __typename field in the default resolver for Gatsby v3

* an interface type is only a gatsby node type if all implementing types are gatsby node types

* exclude Commenter.databaseId in int tests to get around WPGQL bug

* only return null if there's no gatsby node AND no resolved field data

(cherry picked from commit 5c9b744)
@pieh pieh moved this from To cherry-pick to Backport PR opened in V2 Release hotfixes Apr 2, 2021
@vladar vladar added this to To cherry-pick in V3 Release Hotfixes via automation Apr 6, 2021
@vladar vladar removed this from To cherry-pick in V3 Release Hotfixes Apr 6, 2021
pieh pushed a commit that referenced this pull request Apr 7, 2021
…30650)

* use new reporter.panic signature with error code for schema customization

* add the prefixed typename as a node property when creating nodes to prevent gql errors with interfaces

* fix union types that have a field called "type"

* prevent excluded types from throwing errors in connection fields

* test node interface resolution

* test that interfaces that are mixed node and non-node resolve

* prefix the __typename field in the default resolver for Gatsby v3

* an interface type is only a gatsby node type if all implementing types are gatsby node types

* exclude Commenter.databaseId in int tests to get around WPGQL bug

* only return null if there's no gatsby node AND no resolved field data

(cherry picked from commit 5c9b744)

Co-authored-by: Tyler Barnes <tyler@gatsbyjs.com>
@pieh pieh moved this from Backport PR opened to Backported in V2 Release hotfixes Apr 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: source-wordpress Related to Gatsby's integration with WordPress
Projects
No open projects
3 participants