See Sanity in action 👀 Join us for a live product demo + Q&A →

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
GraphQL query resolving references on a _raw field in Gatsby3May 17, 2022
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
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
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
I'm still trying to work out how to write a subquery that pulls in references that are based on the parent query. My original...5Jan 5, 2021
is it possible to filter child elements in a query? e.g. in the query below I’d like to return only documents where `deleted...9Jan 4, 2021
Hello, Im trying to understans GROQ and need help understanding what to do next. I want to in post filter all tags with...14Jan 22, 2021
Is it possible to have a conditional value within groq?4Oct 19, 2020
I’ve found this: So far i’m installing and testing. But how doesthis...15Sep 30, 2020
If I have a document type A which contains a reference to document type B, when I query type B can I get a list of all A...2Oct 19, 2020