Join us live Sept. 27 – How Sanity and Vercel powered Morning Brew's transformation –>

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?