You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Hi there, thanks for this amazing generator. We are trying to export the schema validation inside a monorepo. The reason is kind of reusing the schema as validation for forms in the frontend and the backend. When the schema types are generated in a different package inside the monorepo though the @prisma/client is not present. We are trying to use the package as follow:
The generated output inside the packages/zod is not aware of the @prisma/client required from the generated output since it's a different package reused by both a client and backend application.
Describe the solution you'd like
Maybe provide our own types somehow through a config file like:
Is your feature request related to a problem? Please describe.
Hi there, thanks for this amazing generator. We are trying to export the schema validation inside a monorepo. The reason is kind of reusing the schema as validation for forms in the frontend and the backend. When the schema types are generated in a different package inside the monorepo though the
@prisma/client
is not present. We are trying to use the package as follow:The generated output inside the
packages/zod
is not aware of the@prisma/client
required from the generated output since it's a different package reused by both a client and backend application.Describe the solution you'd like
Maybe provide our own types somehow through a config file like:
Or somehow skip nullish checking through configuration.
Describe alternatives you've considered
A quick and dirty patch is to trick typescript to import
@prisma/client
as my own types through aliasing.Once again thanks ton for your amazing work. Keep up.
The text was updated successfully, but these errors were encountered: