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

Structure: Query provided where filter is expected

Certain nodes within the desk structure requires a filter. A filter is the part of a GROQ-query which specifies which documents should be matched - the constraints of a query, if you will.

While a full GROQ-query could look like this:

*[_type == "movie" && releaseDate > $afterDate] {
  _id, titlex, releaseDate
} [0...20]

The filter of the query is simply:

_type == "movie" && releaseDate > $afterDate

Was this article helpful?