-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
[Updated] See this comment for the up to date problem.
Reproduction
You can reproduce the issue with my repo https://github.com/SabbeRubbish/graphcms-bug-repro
Used GraphCMS and latest gatsby default starter.
Added to gatsby-config.js:
exports.onCreateNode = ({ node, getNode, actions }) => {
const { createNodeField } = actions
createNodeField({
node,
name: `BLAH`,
value: "BLAH",
})
}
Expected behaviour
ALL nodes get a fields
object with BLAH
as key and BLAH
as value.
Actual behaviour
ALL nodes except GraphCMS nodes get the extra field:
Use case
I want to add an extra field "Type" so that I can distinguish on components' types. For example, I have a page with 2 modular components that I can place on them: section with image or testimonials. But in my page template I need to know which one is which, which is why I want to add a _type field to be able to distinguish.
Thanks for any help!
Metadata
Metadata
Assignees
Labels
No labels