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
Querying for array of references in Gatsby and Sanity18Feb 1, 2021
I have an array of references to a country schema type but it always just returns NULL values for me11Jan 30, 2021
Querying array of references in Sanity schema and resolving null values11Jan 30, 2021
Cannot create array with two types - error or wrong syntax?23Jan 29, 2021
How to upload image asset to Sanity from URL instead of binary data?14Jan 27, 2021
Filter posts by tag "internship" in GROQ query13Jan 22, 2021
Slow TTFB for Sanity CDN images with new query param transformations2Jan 21, 2021
Sharp uptick in "invalid response from upstream server" errors7Jan 19, 2021
Issue with authorization token in GROQ requests during Next.js build.12Jan 12, 2021
Different results between curl query and Sanity client fetch methods9Jan 12, 2021
How to generate sitemap paths in NextJS with Sanity dynamic routes?10Jan 8, 2021
Can GROQ query random documents by type?14Jan 8, 2021
Dynamic GROQ Query Construction Patterns in JavaScript6Jan 7, 2021
How to query Sanity documents to show only one item when both draft and published exist?2Jan 5, 2021
Filter child elements in Sanity query (documents array references)9Jan 4, 2021
Array with multiple reference types causing schema validation error13Dec 31, 2020
Bidirectional references and custom input components for managing many-to-many relationships in Sanity13Dec 31, 2020
Is it safe to commit my projectId?5Dec 30, 2020