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
Count nested components children in GROQ query4Jan 19, 2024
GROQ query with mixed references and non-references in array returns null4Dec 14, 2023
Passing undefined to Sanity image URL builder causes error14Sep 11, 2022
Reduce initial data load for paginated blog posts in Sanity/Next.js12Aug 17, 2022
Gatsby cache causing null Mux asset references in _rawJSON after node_modules reinstall3May 17, 2022
How to Create a Title for a Sanity-Related Question10Apr 21, 2022
GROQ: Conditionally return referenced documents based on boolean value8Feb 1, 2021
How to batch delete all documents of a certain type in Sanity?5Jan 29, 2021
How to view JSON API response samples in Sanity tutorial?12Jan 11, 2021
GROQ query size limit for listenQuery() - details and solutions?3Feb 7, 2025
Why does GROQ match() return more results for full words than partial words?3Dec 12, 2024
Add custom object to Sanity GROQ query results before orderBy?13Jun 24, 2024
Filtering array of references in GROQ for Sanity schema design8Jun 18, 2024
Sanity Typegen Error: "Cannot determine property key for type: PipeFuncCall3Jun 12, 2024
Sanity typegen generates Array<never> for working Groq query8Jun 7, 2024
How is "total documents" calculated in Sanity usage metrics?3Jun 4, 2024
Why is Sanity GROQ fetch returning strings with zero width spaces?3May 16, 2024
GROQ query returns asset reference instead of full image data on frontend11Mar 22, 2024