Answers from the community about GROQ

Some of the conversations between community members on questions, suggestions and tips for using Sanity. Join our Discord to be a part of it.

TopicCategoriesFeaturedRepliesLast Updated
Query referenced tag title in GROQ array filter6Aug 1, 2023
How to fetch drafts from referenced documents in GROQ with raw perspective?4Jul 20, 2023
GROQ query for array with mixed objects and references5Jun 20, 2023
GROQ: Using string comparison shorthand within array::join function2Jun 20, 2023
GROQ match operator with slashes in slug patterns not working as expected4Jun 14, 2023
Filter out current document in GROQ related posts query3Jun 12, 2023
How to filter a GROQ query based on the presence of a specific field in the schema.9Jun 1, 2023
Sorting with null values in search_priority field not working as expected3May 30, 2023
GROQ: Access root document title from custom object field7May 29, 2023
How to set image size in GROQ query for thumbnails?4May 24, 2023
How to fetch array of images with GROQ in Sanity?6May 21, 2023
Sorting sub-array in descending order using Groq in Sanity.io.7Mar 14, 2023
GROQ: Finding shared references between documents (referencedBy workaround)11Mar 2, 2023
Handling null values when combining address fields in Sanity GROQ query4Feb 23, 2023
How to structure content in Sanity.io & use GROQ queries for filtering & referencing related documents.21Feb 23, 2023
GROQ match filter not working with periods before wildcard (1.*)2Feb 19, 2023
GROQ: Exclude already referenced documents from array reference field options6Feb 17, 2023
GROQ: Variable array outputting as comma-separated string instead of array6Feb 2, 2023