Answers from the community about GROQ

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
Query array of images for ALT and URL in GROQ8Jan 12, 2022
Query translated Portable Text with nested references in Sanity9Jan 11, 2022
Sanity Studio stuck on "Loading documents..." indefinitely12Jan 11, 2022
Issue with fetching data in Next.js using getServerSideProps19Jan 7, 2022
How to request and filter documents in Sanity.io using GROQ queries.10Dec 27, 2021
Query documents by array field conditions (date, boolean filters)6Dec 21, 2021
Remove `groq` from `client.fetch()` in Next.js tutorial Chapter 411Dec 20, 2021
GROQ query in Next.js components returns empty array, works in pages12Dec 18, 2021
Query and display categories from Sanity blog post schema6Dec 17, 2021
Sorting GROQ results using query params instead of template strings7Dec 15, 2021
Sanity query returns null in getStaticProps when destructuring currentPost9Dec 15, 2021
How to create a singleton document that can only be created once in Sanity?9Dec 13, 2021
How to search nested string fields in complex Portable Text with custom blocks?9Dec 10, 2021
Fixing Sanity Connect Shopify template for GraphQL deployment4Dec 9, 2021
Returning a specific number of items with `S.documentTypeList()` in Sanity.io11Dec 9, 2021
Dynamic Sitemap Generation for Next.js with Sanity Pages5Dec 6, 2021
Cannot query field on type error when adding new fields to object4Dec 6, 2021
Sanity client.fetch() returns empty array despite documents existing in dataset5Dec 2, 2021