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
GROQ v1 auto-dereferences arrays, v2+ returns refs - how to dereference?8Jun 30, 2022
How to access the slug of a reference to a route in a CTA object within a hero element3Jun 29, 2022
How to pass dynamic category ID to GROQ query in getStaticProps with slug param10Jun 28, 2022
Next.js fallback:true causes undefined post during prerender10Jun 28, 2022
Allow image OR string field type in Sanity schema6Jun 27, 2022
Filter Sanity documents by referenced array elements condition13Jun 25, 2022
How to access file asset URL in Sanity query for PDF download link?11Jun 23, 2022
Sanity client not using CDN URL despite useCdn:true in React17Jun 23, 2022
Query bug with dereferencing in subquery count (tags[].tag->_id)2Jun 21, 2022
How to handle multiple Sanity schemas in Next.js dynamic route [slug].js?7Jun 20, 2022
Next.js - How to Make a Route Based on a GROQ Query27Jun 20, 2022
Gatsby blog template query not filtering by slug for individual posts3Jun 18, 2022
How to bulk delete 20,000 documents of a specific type in Sanity?5Jun 16, 2022
How to display array of images from Sanity in Next.js slug page8Jun 16, 2022
Untitled Sanity Question2Jun 16, 2022
How to use GROQ queries with filters in Sanity HTTP API fetch requests?5Jun 15, 2022
NextJs Preview Mode Causing Lags and Timeouts with Browser Unresponsive Error9Jun 14, 2022
Sanity media URL with download parameter returns 404 error14Jun 13, 2022