[StoryblokRichText] Rendering immutable richText object #1353
Labels
pending-author
[Issue] Awaiting further information or action from the issue author
pending-triage
[Issue] Ticket is pending to be prioritised
Describe the issue you're facing
We encountered an issue where the StoryblokRichText and richTextResolver's render function do not support immutable Storyblok data.
Our setup uses Apollo GraphQL to fetch Storyblok content. In production, certain pages were throwing errors in specific languages. After investigation, we found that the issue likely stemmed from Apollo’s immutable response structure. We resolved this by wrapping all Storyblok content with
cloneDeep
.To further diagnose the issue, we created a minimal reproduction and found that the error occurs when the rich text contains attributes.
Would it be possible for Storyblok to handle this internally to ensure compatibility with immutable data sources?
Reproduction
https://stackblitz.com/edit/bb-storblok
Steps to reproduce
No response
System Info
Used Package Manager
yarn
Error logs (Optional)
Validations
The text was updated successfully, but these errors were encountered: