The SDK uses rich text resolvers to transform modular (linked) item references found in rich text elements into HTML (or other output format). This is great but the SDK also removes the property that holds the array of codenames from the original response.
In Gatsby, the internal GraphQL store abstracts from presentation and the codenames of items is exactly what is needed to build the standard relationships among nodes. In order for the Gatsby source plugin to work, I have to refill the missing modular_content array from the debug part of the response.
Proposed solution
If possible, do not strip the modular_content array from the rich text element JavaScript objects.
Motivation
The SDK uses rich text resolvers to transform modular (linked) item references found in rich text elements into HTML (or other output format). This is great but the SDK also removes the property that holds the array of codenames from the original response.
In Gatsby, the internal GraphQL store abstracts from presentation and the codenames of items is exactly what is needed to build the standard relationships among nodes. In order for the Gatsby source plugin to work, I have to refill the missing
modular_content
array from thedebug
part of the response.Proposed solution
If possible, do not strip the
modular_content
array from the rich text element JavaScript objects.