Unlock seamless workflows and faster delivery with our latest releases - Join the deep dive

Answers from the community about Queries

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
What’s the best way to construct GROQ query dynamically in JavaScript? Is there a sort of way to construct it in objects...6Jan 7, 2021
I’d love some help understanding how to work with drafts and published documents. I’m running into issues with including...2Jan 5, 2021
is it possible to filter child elements in a query? e.g. in the query below I’d like to return only documents where `deleted...9Jan 4, 2021
Is it possible to have a `type: array`, of more than one entry for `type: reference` ? I kept getting an error that pointed...13Dec 31, 2020
Bidirectional references and custom input components for managing many-to-many relationships in Sanity13Dec 31, 2020
Hello, quick question - is it safe to commit my `projectId`?5Dec 30, 2020
Hi, anyone able to help with a relationship thing? I have several schemas set up, like, Country, County, and Business,each...3Dec 29, 2020
is the `match` query operator case-sensitive? i.e. is ```*[text match "word"] ``` === ```*[text match "wORd"] ``` ?3Dec 28, 2020
How to Match Only a Subset of String in a Word16Dec 15, 2020
`slug` is `undefined` when I track mark and children from internalLink5Dec 14, 2020
Write a GROQ query for getting all documents that has an ID in an array of IDs5Nov 28, 2020
Is there a way to query documents that aren’t referenced by another type of document?7Nov 23, 2020
How to delete all docs of a specific doc type via cli?4Nov 13, 2020
Anyone who could help me out with sanity/mux?6Nov 3, 2020
Hey when I try to connect to the groq tool (<https://abc123.api.sanity.io/v1/groq/development>) by clicking the link from...5Oct 29, 2020
Are there some limitations on -> when nested like this?14Oct 23, 2020
what is the recommended way to query an array of references?4Oct 11, 2020
how to implement localization on blocks?5Oct 5, 2020