Improving the exposure of Inline Blocks in the Content Delivery API
Based on early feedback from the recent release of inline blocks for Structured Text fields, we're introducing a small but impactful update to how our Content Delivery API handles them.
Previously, inline blocks were included within the blocks
GraphQL selector. With this update, they now have a dedicated inlineBlocks
selector:
Before the update:
query Before { blogPost { content { value blocks { __typename ... on BlockModelRecord { title } ... on InlineBlockModelRecord { title } } } }}
After the update:
query After { blogPost { content { value blocks { __typename ... on BlockModelRecord { title } } inlineBlocks { __typename ... on InlineBlockModelRecord { title } } } }}
Why this change?
By separating inlineBlocks
from blocks
, developers gain more precise control over rich text content, making it easier to manage and render structured text accurately, especially when using TypeScript. This improvement enhances both flexibility and consistency when working with inline blocks in GraphQL queries.
We appreciate your feedback and will continue refining the experience to make content management even smoother! 🚀