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
GROQ: Count referenced documents and add as property to query results2Jan 21, 2023
How to query array of images in Sanity schema?4Jan 17, 2023
GROQ query syntax error: missing closing brace in object body7Jan 16, 2023
GROQ references() not working with parent document ID in projection7Jan 11, 2023
Retrieving Documents not in an Array3Jan 7, 2023
Get array of dereferenced values without object wrapper in GROQ2Jan 6, 2023
How to retrieve array items in their Studio display order using GROQ?2Jan 5, 2023
GROQ: Filter slug.current excluding multiple patterns with match operator15Dec 1, 2022
How to integrate Algolia with Sanity and Next.js for e-commerce?17Nov 25, 2022
GROQ: Prevent null values when resolving optional array keys22Nov 14, 2022
Vercel Build Failure: Cannot read properties of undefined (reading 'title')8Nov 13, 2022
Sanity query returning 4 different post IDs instead of selected post50Nov 9, 2022
How to access image asset properties (url, metadata) in Sanity GROQ query?12Nov 3, 2022
GROQ query with nested count and references returns empty in Nuxt Sanity Module7Oct 28, 2022
Following reference fields in nested arrays with GROQ projection14Oct 26, 2022
GROQ: Query articles grouped by tags from list component in single query6Oct 24, 2022
How to query single object by ID without array response in Sanity?11Oct 18, 2022
Tags Plugin Error: Module parse failed in floating-ui.dom.esm.js8Oct 14, 2022