Unlock seamless workflows and faster delivery with our latest releases - Join the deep dive

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?