How to query (New) Linked Content with a Dynamic Reference name in Gatsby?
This question is posted on behalf of a user.
In the Gatsby Agility starter, I noticed you pull content with StaticQuery's when it's possible to use a static reference name (like "Global Header").
What about linked content (including nested linked content) that is dynamic - resulting in a generated reference name ?
Consider the content structure:
Top List Item
Nested List Item
Where Nested List is new/dynamically generated per Top List Item instance. One Nested List would have a referenceName like NestedList_12345, another with NestedList_6789, etc...
What's the best way to pull this content from Agility? I've created a modified version of the getLinkedContentItems util provided in the Gatsby starter that can navigate nested list items. Is there a better/another way to do this though?
Overall it seems like we want to avoid any dynamically linked content when possible, but for when we cannot what's the best approach?