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 – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Was this answer helpful?