Answers from the community about Queries

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

TopicCategoriesFeaturedRepliesLast Updated
Order documents by referenced field values in Sanity GROQ13Jun 10, 2022
How to make nested parent page slug query more generic in Sanity?11Jun 9, 2022
Sanity preview API returns 404 on Vercel but works locally22Jun 9, 2022
How to limit the number of documents for a schema in Sanity?12Jun 9, 2022
Next.js Errors when trying to map Slugs to Articles20Jun 7, 2022
How to check if a field value exists in an array using GROQ?20Jun 7, 2022
Display Sanity images with Next.js Image component using asset reference16Jun 6, 2022
How to query Sanity data in NextJS using GraphQL instead of GROQ?17Jun 4, 2022
GROQ query showing "[object Object]" instead of string - expected ']' error7Jun 3, 2022
Converting string array tags to document references in Sanity schema28Jun 2, 2022
GROQ: Resolve only reference elements in array, keep objects intact11May 31, 2022
How to use patch().set() to update a slug field in Sanity?5May 30, 2022
How to query images from portable text body in Sanity slug page?26May 27, 2022
How to Reference an Enclosing Document of a Reference in GROQ8May 26, 2022
Custom slug input component for dynamic URL description without schema changes5May 25, 2022
Sanity CMS: Untitled Question5May 25, 2022
How to display Shopify image URL and sync prices in Next.js with Sanity?13May 24, 2022
Filter out NULL values in GROQ query results4May 24, 2022