Answers from the community about Queries

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 posts per tag and filter unused tags in Sanity GROQ query5Jun 4, 2023
Billing Issue - No Response After 8 Days4May 31, 2023
Using ternary operator or conditional logic in GROQ queries5May 30, 2023
GROQ: Access root document title from custom object field7May 29, 2023
Query documents by reference array in Sanity (filtering posts by tags)4May 22, 2023
How to group GROQ query results into separate arrays by _type?21May 18, 2023
How to structure content in Sanity.io & use GROQ queries for filtering & referencing related documents.21Feb 23, 2023
Sanity GraphQL error: Anonymous inline object "group" needs top-level schema3Feb 19, 2023
GROQ: Variable array outputting as comma-separated string instead of array6Feb 2, 2023
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