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.io – build remarkable experiences at scale

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

Categorized in