FormidableLabs / groqd

A schema-unaware, runtime and type-safe query builder for GROQ.
https://commerce.nearform.com/open-source/groqd
MIT License
221 stars 17 forks source link

Discussion: Consider swapping Zod with Typebox #261

Open heggemsnes opened 5 months ago

heggemsnes commented 5 months ago

This is kind of a follow up to my #228 issue. We've been using groqd extensively and we really love it, but at some point in the development for larger projects the TS compiler slows to a halt with potential scary Type instantiation is excessively deep and possibly infinite..

Been tearing my hair out around this but after doing some more research around Zod and TS I believe this might not be the correct package for this kind of project. Check out this interesting article about TS validators performance..

I am not sure if groqd should change like this but I really just want to open the discussion on this issue as it is a "creeping issue" that only comes when you're already in too deep...