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

CTF-next: Generate GraphQL schema based on Contentful Content Types #30855

Open
wants to merge 177 commits into
base: master
Choose a base branch
from

Conversation

axe312ger
Copy link
Collaborator

@axe312ger axe312ger commented Apr 13, 2021

Discussion for the upcoming major release: #38585

Note for reviewers:


This adds schema generation to the gatsby-source-contentful plugin. This will remove the most annoying restriction of the plugin: You now can have fields without a single instance in your content model and your GraphQL will no more fail because of this. See: https://www.gatsbyjs.com/plugins/gatsby-source-contentful/#restrictions-and-limitations

Goals

Performance improvements

  • These changes will reduce the node count which will lead to improvements in bigger projects.
  • Rich Text fields no more need to JSON.stringify() and rich text renderer no more needs to JSON.parse()

Upcoming goals in the next major / Follow up PRs:

See #31385

Migration steps / Breaking changes

See #31385 (comment) for the full list of steps to migrate.

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Apr 13, 2021
@axe312ger axe312ger added topic: source-contentful Related to Gatsby's integration with Contentful and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Apr 13, 2021
@itwasmattgregg
Copy link

itwasmattgregg commented Apr 14, 2021

What do you think about adding a metadata: { ...assetItem.metadata }, to const assetNode?

Or should we make Tags a separate Node?

@axe312ger
Copy link
Collaborator Author

@itwasmattgregg I'd like to duplicate the pattern the Contentful GraphQL API implements this new feature.

To keep reviews doable, please keep in mind that this will be in a follow up PR

@axe312ger axe312ger force-pushed the test/contentful-e2e-content-rendering branch 2 times, most recently from 6e07482 to 58f039a Compare April 20, 2021 12:42
@axe312ger axe312ger force-pushed the feat/contentful-schema-generation branch from 67f316c to fb57bae Compare April 20, 2021 13:07
Base automatically changed from test/contentful-e2e-content-rendering to master April 20, 2021 13:14
@axe312ger axe312ger force-pushed the feat/contentful-schema-generation branch from fb57bae to 50d6ba2 Compare April 20, 2021 13:28
@axe312ger axe312ger added the breaking change If implemented, this proposed work would break functionality for older versions of Gatsby label Apr 22, 2021
@axe312ger axe312ger force-pushed the feat/contentful-schema-generation branch 2 times, most recently from 08522e7 to e498203 Compare April 27, 2021 07:33
@axe312ger axe312ger force-pushed the feat/contentful-schema-generation branch 3 times, most recently from 6a445eb to ddea54d Compare May 5, 2021 10:29
@axe312ger axe312ger changed the title Contentful: Generate GraphQL schema based on Contentful Content Types CTF-v6: Generate GraphQL schema based on Contentful Content Types May 12, 2021
@axe312ger axe312ger force-pushed the feat/contentful-schema-generation branch 3 times, most recently from cccee87 to 4656166 Compare May 21, 2021 09:41
@pieh
Copy link
Contributor

pieh commented Dec 21, 2023

Published new alpha version - gatsby-source-contentful@9.0.0-alpha.3

@axe312ger
Copy link
Collaborator Author

Published new alpha version - gatsby-source-contentful@9.0.0-alpha.4

@axe312ger
Copy link
Collaborator Author

We published new alpha versions:

  • gatsby-source-contentful@9.0.0-alpha.8
  • gatsby@5.14.0-ctf-next.0

@bartveneman
Copy link
Contributor

bartveneman commented Mar 22, 2024

👋 Long time plugin user here, nice progress!

Just to add context on the necessity of getting this PR merged: I started a discussion on the potential workarounds I need to do to get a site working that has a restricted content model ID, where I'm confident that this PR could solve my problems in a better way than the alternatives I can think of. #38908

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change If implemented, this proposed work would break functionality for older versions of Gatsby status: blocked This issue/PR can't be solved at the moment and shouldn't be closed/merged topic: source-contentful Related to Gatsby's integration with Contentful
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants