-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Description
Oh right, I've misunderstood the question at first. Now I see that the problem is not with fields but with type names. The plugin defines interface types here:
gatsby/packages/gatsby-source-contentful/src/gatsby-node.js
Lines 327 to 340 in 3ffc210
| createTypes(` | |
| interface ContentfulEntry @nodeInterface { | |
| contentful_id: String! | |
| id: ID! | |
| node_locale: String! | |
| } | |
| `) | |
| createTypes(` | |
| interface ContentfulReference { | |
| contentful_id: String! | |
| id: ID! | |
| } | |
| `) |
But if someone uses Entry or Reference in Contentful model names - they cause conflicts with those internal plugin types (because in the contentful plugin those model names are also transformed to ContentfulEntry and ContentfulReference).
So this is a conflict on a plugin level - Gatsby doesn't restrict type names (as long as they are prefixed with Contentful). So I think for list-based exceptions you can just go with Reference and Entry (and whatever other internal type names the plugin has). Alternatively, you can rename plugin interface types to something else, e.g. InternalContentfulReference (but that will be a breaking change).
Originally posted by @vladar in #29446 (reply in thread)