Answers from the community about GROQ

Some of the conversations between community members on questions, suggestions and tips for using Sanity. Join our Slack to be a part of it.

TopicCategoriesFeaturedRepliesLast Updated
Hey all - what’s the quickest way to batch delete all documents of a certain type? It looks like the `sanity` cli tool allows...5Jan 29, 2021
In the tutorial, there is samples of what the API returns as JSON. Is there a way to view these ?12Jan 11, 2021
hello guys, I noticed that the data I fetch from my sanity studio to my front end are displayed randomly and I don't want...5Dec 20, 2020
Custom Document Views - Is it Even Possible to Use the Structure Builder?10Apr 21, 2022
Warning: Data for Page Exceeds the Threshold of 128 kB12Aug 17, 2022
GraphQL query resolving references on a _raw field in Gatsby3May 17, 2022
GROQ query for getting references from arrays in another array in Sanity.io13Apr 9, 2020
How to fetch an array of images using groq in Sanity.io6May 21, 2023
Best advice on Slack for passing down full url with GraphQL?5Jan 6, 2021
Is there a way to write a groq query that checks if a boolean is true, and if so, returns an array of referenced documents?...8Feb 1, 2021
Querying multiple authors in Sanity using GROQ20Aug 1, 2020
Hey! We're fetching responsive images from <|> using `@sanity/image-url` to generate query...2Jan 21, 2021
Order By Date not working in GROQ query4Feb 8, 2021
I’ve been fighting for a few hours with a preview, and I figured I’d check in here. I am creating a grid container thathas...3Feb 1, 2021
Query for finding un-referenced documents in Sanity.io11May 10, 2020
How to delete all docs of a specific doc type via cli?4Nov 13, 2020
What does an ellipsis (...) mean in a GROQ query?22Feb 8, 2021
Understanding how to query categories in Sanity schema using Groq14Aug 8, 2020