Unlock seamless workflows and faster delivery with our latest releases - Join the deep dive

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
Querying mixed-fields arrays in GROQ for a complex schema.5Jun 20, 2023
Using GROQ to achieve shorthand string compare within array::join function2Jun 20, 2023
Using `match` in GROQ query to search for slugs starting with a specific path4Jun 14, 2023
Adjusting GROQ query to filter out current document based on tags.3Jun 12, 2023
How to apply different schema based on type in a GROQ query for nested references4Jun 9, 2023
How to filter a GROQ query based on the presence of a specific field in the schema.9Jun 1, 2023
Sorting null values in descending order in Groq3May 30, 2023
Understanding the use of `^` and `@` operators in GROQ queries for accessing parent and current scopes.7May 29, 2023
Setting image size in GROQ query for Sanity.io4May 24, 2023
How to fetch an array of images using groq in Sanity.io6May 21, 2023
Sorting sub-array in descending order using Groq in Sanity.io.7Mar 14, 2023
Discussion of GROQ query optimization and potential for a "referencedBy" function11Mar 2, 2023
Handling potential null values when combining properties in API endpoint4Feb 23, 2023
How to structure content in Sanity.io & use GROQ queries for filtering & referencing related documents.21Feb 23, 2023
Issue with filtering documents using `match` query in Elasticsearch2Feb 19, 2023
Guidance on using GROQ to exclude already added documents in a sub-service array6Feb 17, 2023
Syntax for Outputting an Array in GROQ6Feb 2, 2023
GROQ Query Error - Error: `String Literal Expected`2Jan 21, 2023