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
How to get the number of nested/children components in a GROQ query.4Jan 19, 2024
Issue with fetching data from an array of references and non-references in a groq query.4Dec 14, 2023
Error: unable to resolve image URL from source (undefined)14Sep 11, 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
Custom Document Views - Is it Even Possible to Use the Structure Builder?10Apr 21, 2022
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 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
Adding custom objects to GROQ query results and sorting them13Jun 24, 2024
Filtering array of references in GROQ for Sanity schema design8Jun 18, 2024
Resolving a query issue with Sanity's GROQ parsers3Jun 12, 2024
Debugging Groq query type issue in Sanity typegen8Jun 7, 2024
Calculating total documents in Sanity usage using GROQ queries3Jun 4, 2024
Issue with Sanity GROQ fetch returning string data with zero width spaces.3May 16, 2024
Issue with groq query not returning desired result on front end11Mar 22, 2024
Groq query issue with getting movies and character names for each person in the Sanity movies database.4Mar 18, 2024