Using groq is there a way to resolve all references inside your data no matter how deep?
Last updated: Dec 3, 2020
Using groq is there a way to resolve all references inside your data no matter how deep? So i don't have to manually resolve all my references ?
Nov 2, 2020, 7:15 PM
I would also like to know this. Our data is deeply nested and not a uniform shape since pages are randomly composed of many different types of objects.
Dec 1, 2020, 7:24 PM
Not at the moment I'm afraid. Recursive joining for GROQ comes up as a feature request now and then, so we're looking into it.
Dec 1, 2020, 7:48 PM
the equivalent of
in graphql would be ideal for this use case.
Dec 1, 2020, 7:50 PM
is it possible to get all data for a single document, with every reference resolved, using the doc endpoint? https://www.npmjs.com/package/@sanity/client#fetch-a-single-document we only need to fetch a single document on demand (gatsby client route), but we don't necessarily know the shape of the nested data, so being able to get everything in one simple request is the ideal outcome.