I'm using gatsby-source-contentful v4.6.4
According to the docs, I should be able to use a query similar to the following without issue (simplified query from the docs):
query MyQuery {
contentfulBlogPost {
id
bodyRichText {
raw
}
}
}
Along with documentToReactComponents. However, the following code doesn't throw an error, but simply doesn't parse the rich text:
function ArticleBody({raw}) {
return (
<>
{
raw.map(rtNode => {
return (
<>
{documentToReactComponents(rtNode)}
</>
)
})
}
</>
);
}
export default ArticleBody;