✨Discover storytelling in the AI age with Pixar's Matthew Luhn at Sanity Connect, May 8th—register now

what is the recommended way to query an array of references?

3 replies
Last updated: Oct 11, 2020
what is the recommended way to query an array of references? For example right now I have a field
articles
of type array of elements with type
article
and right now I'm doing this:
	articles[]{
		'article': @->
	}
but it forces me to have everything nested under
article
which I'd like to avoid if possible
Oct 11, 2020, 1:01 PM
	articles[]->{
	  ...
	}
This will do the trick
😀
Oct 11, 2020, 1:51 PM
	articles[]->{
	  ...
	}
This will do the trick
😀
Oct 11, 2020, 1:51 PM
thanks! knew there had to be a concise solution there 🙂
Oct 11, 2020, 2:33 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?