✨Discover storytelling in the AI age with Pixar's Matthew Luhn at Sanity Connect, May 8th—register now

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 remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?