-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@sanity-typed/groq-zod
#306
Comments
This is... so complicated. Picking apart any zod schema to transform it is very difficult (and sometimes impossible). The fact that |
I don't think I'm going to do this.
It's definitely possible. But the scope of this rivals the scope of the rest of the monorepo, possibly even more. I'm not doing that. It's still within the vision, but I definitely can't justify actually spending time on that. |
@sanity-typed/groq-zod
@sanity-typed/groq-zod
@sanity-typed/groq-zod
@sanity-typed/groq-zod
https://www.npmjs.com/package/groq-builder is definitely my recommended solution atm, so go look there! |
A schema aware GROQ zod parser would need:
GROQ Zod Parser
= typed runtime ast to zod parser(typed runtime schema, typed runtime groq parsed ast)
= typed runtime ast to zod parser(
@sanity-typed/types
,@sanity-typed/groq-js
)Is this not technically possible? We have typed runtime values for everything we'd need to generate a zod parser for GROQ queries.
The text was updated successfully, but these errors were encountered: