chrishoermann / zod-prisma-types

Generator creates zod types for your prisma models with advanced validation
Other
579 stars 43 forks source link

Is it possible to skip `prismaClientPath` and the import line? #130

Closed cerinoligutom closed 1 year ago

cerinoligutom commented 1 year ago

My use case is to use this library purely for generating zod schemas then use a different ORM or Query Builder which means I don't need @prisma/client.

image

Seems like whatever I put on the prismaClientPath just gets interpolated to the import path but I'd want the import line removed.

chrishoermann commented 1 year ago

This sadly is not possible, because many generated schemas rely on the imported Prisma type to work correctly.

cerinoligutom commented 1 year ago

I see. Would've been nice for an option to make it decoupled or opt-in to Prisma Client since I'm only opting for the models to be generated and the rest disabled (so no Prisma type dependency) but alright, guess we can close this issue. Thanks!