Validating groq queries with groq-js library.

2 replies
Last updated: Dec 9, 2020
Is there any library to validate a groq query? Creating a functional wrapper for
sanityClient.fetch
, and would be cool to have better debugging. ๐Ÿ™‚
Dec 2, 2020, 11:01 AM
You can at least parse a groq query with
groq-js
ย . I don't think it return very useful debugging info yet, but you can at least capture if it's valid.
Dec 2, 2020, 12:18 PM
Awesome, thanks for this! ๐Ÿ™‚ It's at least some more info to be able to say if it's valid or not.
Dec 9, 2020, 10:58 AM

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?