How to apply different schema based on type in a GROQ query for nested references
Last updated: Jun 9, 2023
Hi. I am having trouble expanding nested references.I have a sections array that can take different types of objects, the objects can have nested fields that are references. I am trying to write a GROQ query where each section type will have different fields. However, this changes the order of the sections. Ideally I want to map over each section in the array, and apply a different schema based on the type.