-
Notifications
You must be signed in to change notification settings - Fork 6
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
Split Swagger and ZodToDto into two separate packages? #35
Comments
Hi, Thanks for the input!
High five, < insert my rant on class-validator/class-transformer here > :)
The swagger bit is optional and
Yes, it should be. If given the above you'd still like these libs separated feel free to make a PR. The release process is not automated yet so I'll release it manually.
Sadly I cannot advise you here as my GraphQL knowledge is extremely basic but I believe it'd be possible to integrate zod and GraphQL. I am not sure if I'd use that in an enterprise setting though. |
Sadly not a user of the lib to contribute now, maybe someday as I'm full of Nest.... Dayum I hate class-transformer and class-validator. Not a big fan of Nest JS TBH. |
Hey, my team is currently using
class-validator
which I'm not a fan of it at all :) With Nest.js which means we're pretty locked on classes being available in the runtime for Nest to be happy.I try to find a way to migrate towards
zod
for validation as much as I can, but the Swagger part is pretty useless for us as we're using GraphQL, so having Swagger imported even if we're not using it, is a bit wasteful.To guarantee that Swagger stuff will never get into the runtime/compile-time no matter the setup, having it as a separate module will be nice.
Since you have
rush.js
setup, I guess, it should be pretty straightforward to achieve :)Afterthoughts, I guess, with GraphQL we will have to stick to
class-validator
as, well, all GraphQL stuff is done using decorators, so we won't be going away from classes for DTOs/InputTypes/Models, but, anyway, having it separated is just a good thing anyway.The text was updated successfully, but these errors were encountered: