Answers from the community about Queries

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
Understanding GROQ queries for non-Gatsby projects7May 10, 2020
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 <http://cdn.sanity.io|cdn.sanity.io> using `@sanity/image-url` to generate query...2Jan 21, 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
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
Trouble shooting empty array response from groq queries in app development5Apr 17, 2020
"Which ID is the actual Sanity ID when running GraphQL queries?"5Aug 25, 2020
Users report issues with loading content on Sanity.io14Jun 18, 2020
Hello, quick question - is it safe to commit my `projectId`?5Dec 30, 2020