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-contentful): De-dupe type names #30834

Merged
merged 2 commits into from Apr 12, 2021

Conversation

ascorbic
Copy link
Contributor

@ascorbic ascorbic commented Apr 12, 2021

Because this plugin uses setFieldsOnGraphQLNodeType rather than createSchemaCustomization, type names are not merged and deduped. This leads to bugs like this. This PR is a quick fix that renames the offending types. The proper fix though is to switch to the newer API that handles types properly.

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Apr 12, 2021
@ascorbic ascorbic requested a review from axe312ger April 12, 2021 09:17
@ascorbic ascorbic changed the title fix(gatsby-source-contentful): De-dupe layout type name fix(gatsby-source-contentful): De-dupe type names Apr 12, 2021
@vladar vladar added topic: GraphQL Related to Gatsby's GraphQL layer and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Apr 12, 2021
Copy link
Contributor

@vladar vladar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍

@vladar vladar added the topic: source-contentful Related to Gatsby's integration with Contentful label Apr 12, 2021
@ascorbic ascorbic added this to To cherry-pick in Release candidate via automation Apr 12, 2021
@ascorbic ascorbic merged commit 71ec0cd into master Apr 12, 2021
@ascorbic ascorbic deleted the fix/contentful-image-layout-type branch April 12, 2021 10:52
vladar pushed a commit that referenced this pull request Apr 13, 2021
* fix(gatsby-source-contentful): De-dupe layout type name

* Add placeholder type too

(cherry picked from commit 71ec0cd)
@vladar vladar moved this from To cherry-pick to Backport PR opened in Release candidate Apr 13, 2021
vladar pushed a commit that referenced this pull request Apr 13, 2021
* fix(gatsby-source-contentful): De-dupe layout type name

* Add placeholder type too

(cherry picked from commit 71ec0cd)

Co-authored-by: Matt Kane <matt@gatsbyjs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: GraphQL Related to Gatsby's GraphQL layer topic: source-contentful Related to Gatsby's integration with Contentful
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants