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
How to get image URL from asset reference in Sanity?27Jul 21, 2020
How to get image URL from Sanity image asset reference?27Jul 21, 2020
Query documents by matching ID prefix for i18n language versions6Jul 17, 2020
How to select() from referenced values with multiple document types in GROQ?6Jul 14, 2020
How to use select() with references to multiple document types in GROQ?5Jul 14, 2020
Schema Specification for a Document - Is There a Way to Specify That Field To Be Unique?7Jul 13, 2020
GROQ: Resolve all references without declaring fields explicitly?19Jun 25, 2020
Querying unique values in GROQ and creating a documentList in Sanity18Jun 9, 2020
How to get unique values in a GROQ query?17Jun 9, 2020
Filter array to exclude already referenced sections in Sanity document27Jun 8, 2020
How to resolve references in PortableText array using GROQ?10Jun 5, 2020
BrowserslistError: Unknown browser query `dead` in Angular with Sanity4May 31, 2020
How to display the parent's label in the preview of a subcategory in Sanity.io14May 28, 2020
Sanity preview: draft revisions inconsistent and sometimes unavailable2May 19, 2020
Query by slug returns 200 instead of 404 when document not found2May 16, 2020
Discussion about issues with querying the "contacts" field in a Sanity.io document.36May 15, 2020
Update sort order via params in client query6May 12, 2020
GROQ: Combining `->` dereference and `references()` in same filter fails6May 11, 2020