Skip to content

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 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 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 <[email protected]>
This was referenced Apr 13, 2021
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

None yet

Development

Successfully merging this pull request may close these issues.

3 participants