Structured Content 2022: Join our conference to explore fresh perspectives on content and digital experiences →

sanity documents query *[_id in path("/somePath")] currently returning bad pattern

4 replies
Last updated: Oct 1, 2020

Morning, all! Any GROQ folks out there who can tell me what’s wrong with my query? Stumped!

sanity documents query *[_id in path("/somePath")]
currently returning
bad pattern: *[_id

Oct 1, 2020, 1:14 PM

The query needs to be a string

sanity documents query "*[_id in path('somePath')]"

Also you can't have slashes in your path, I think

Oct 1, 2020, 1:27 PM

The query needs to be a string

sanity documents query "*[_id in path('somePath')]"

Also you can't have slashes in your path, I think

Oct 1, 2020, 1:27 PM

🤦

Oct 1, 2020, 1:31 PM

Thanks

user J

Oct 1, 2020, 1:31 PM

Sanity.io: Get the most out of your content

Sanity.io is a platform to build websites and applications. It comes with great APIs that let you treat content like data. Give your team exactly what they need to edit and publish their content with the customizable Sanity Studio. Get real-time collaboration out of the box. Sanity.io comes with a hosted datastore for JSON documents, query languages like GROQ and GraphQL, CDNs, on-demand asset transformations, presentation agnostic rich text, plugins, and much more.

Don't compromise on developer experience. Join thousands of developers and trusted companies and power your content with Sanity.io. Free to get started, pay-as-you-go on all plans.