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
Sorting out a `groq` query for resolved image URL and dimensions16Sep 27, 2021
How to fetch documents in GROQ that match a category but exclude the latest 8 documents.18Sep 27, 2021
Example of a groq query to return related posts based on tags for a blog post.11Sep 26, 2021
Embedding Sanity Studio on a subroute of a website and injecting project IDs at runtime16Sep 23, 2021
Implementing Next.js Sanity Image using a Blurred Placeholder with Sanity as a Loader12Sep 16, 2021
Connecting Sanity to 11ty: tips on serializers, portable text, and fetching data.8Sep 16, 2021
Using @sanity/block-content-to-react to display formatted text in Gatsby8Sep 13, 2021
Is it possible to get a subset of an array in GROQ using `_key` of the initial and final element?34Sep 12, 2021
Querying Mux video data in Sanity project with React frontend.10Sep 11, 2021
Reorder Array of Singleton References - Custom Validation Function7Sep 10, 2021
How to get referenced document attributes in a custom block serializer28Sep 9, 2021
Troubleshooting a schema issue with reference fields in Slack thread33Sep 8, 2021
Filtering products by sub-categories in Sanity.io schema6Sep 5, 2021
How to Add Dynamic Navigation Menus to a Gatsby Page Template6Sep 3, 2021
Best practice for creating internal links with unique slugs in Sanity and Next.js9Sep 1, 2021
Querying reverse relationships in Sanity with GROQ4Aug 29, 2021
Best approach for querying by SKU in a product catalog using Sanity.io and GraphQL.6Aug 20, 2021
Querying for a specific item type within a document in Sanity.io17Aug 15, 2021