Add ContentType filter to gatsby-source-contenful #33304
Unanswered
xavivars
asked this question in
Ideas / Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When using gatsby-source-contentful, everything in the Contentful space configured in the plugin is downloaded, schemas are created, and nodes are cached.
While the first two steps (download + schema creation) are relatively fast (seconds), the node generation time can take a significant amount of time (mainly, if there's no previous cache, which may happen pretty often in some CI/CD pipelines).
It would be extremely good to have a plugin configuration option that allows us to filter out content types from even being processed.
A very naive (and probably incorrect, but good enough to make my point) implementation would be something like this (in https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-source-contentful/src/gatsby-node.js#L643)
A feature like this could decrease our build times significantly (in the minutes range): gatsby-source-contenful node creation is taking almost 10 minutes in some of our cases.
Would such a feature be welcome?
Beta Was this translation helpful? Give feedback.
All reactions