Skip to content

Handling the size of the generated schemas #190

Closed Answered by chrishoermann
joacoespinosa asked this question in Q&A
Discussion options

You must be logged in to vote

@joacoespinosa no worries, this comment is not funny. I sometimes experience this behaviour myself and it can be annoying. I sadly do not have a bulletproof method how this behavior of typescript could be improved since there is a lot of type inference going on with zod in general that can lead to a degrading typescript perfomance - the amount of generated schemas does not help with this.

Sadly there is no solution to reduce the amount of schemas other than disabling input schemas in general with createInputTypes = false and create necessary validation schemas e.g. for trpc or react-hook-forms by hand.

The problem lies in the complexity of the data in the prisma dmmf which is the basis fo…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@joacoespinosa
Comment options

Answer selected by joacoespinosa
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants