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
Slow TTFB for Sanity CDN images with new query param transformations2Jan 21, 2021
Sharp uptick in "invalid response from upstream server" errors7Jan 19, 2021
Issue with authorization token in GROQ requests during Next.js build.12Jan 12, 2021
Different results between curl query and Sanity client fetch methods9Jan 12, 2021
How to generate sitemap paths in NextJS with Sanity dynamic routes?10Jan 8, 2021
Can GROQ query random documents by type?14Jan 8, 2021
Dynamic GROQ Query Construction Patterns in JavaScript6Jan 7, 2021
How to get reference data in nested components without overriding other fields?4Jan 6, 2021
Filter child elements in Sanity query (documents array references)9Jan 4, 2021
Array with multiple reference types causing schema validation error13Dec 31, 2020
Bidirectional references and custom input components for managing many-to-many relationships in Sanity13Dec 31, 2020
How to expand reference objects in GROQ array without losing non-reference items?4Dec 30, 2020
GROQ: Query reverse relationships - get all businesses by county reference3Dec 29, 2020
Is the GROQ `match` operator case-sensitive?3Dec 28, 2020
GROQ: How to match exact string subset and exclude partial matches (WW not UWW)?16Dec 15, 2020
`slug` is `undefined` when I track mark and children from internalLink5Dec 14, 2020
Using groq is there a way to resolve all references inside your data no matter how deep?5Dec 3, 2020
Write a GROQ query for getting all documents that has an ID in an array of IDs5Nov 28, 2020