Referencing Nested Entries in Rich Text field from Contentful #31932
-
Hi. I have a problem with embedding multi levels of entries in the rich text field on Contentful with the gatsby-source-contentful plugin. For example in the Rich text field of a page content model I want to embed a Grid entry:
And say in the Grid there is another rich text field for embedding another Grid entry. The graphQL for this becomes something like:
I want to enable more flexibility by not having to write the graphQL specifying a limited number of nested levels so that the code can be reused when a new page with more nested grids is created. This is only the simplest example of the issue I am having. The graphQL gets more complicated when there are more content models with rich text fields and when I try to allow them being embedded in other rich text fields. Is there a solution with the current version of the plugin? Here is a demo of the code I created https://github.com/stevenyang1011/gatsby-contentful-circular-reference cc @axe312ger |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
This is not related to Contentful, this is more GraphQL in general. I think you have to specify how deep you will go. Maybe the Core team has an idea. |
Beta Was this translation helpful? Give feedback.
This is not related to Contentful, this is more GraphQL in general. I think you have to specify how deep you will go. Maybe the Core team has an idea.