Closed kjavia closed 1 year ago
PS: I put back the original
generator prismaclient {
provider = "prisma-client-js"
}
which I removed, now I have both zod and this. It seems to fix the issues.
@kjavia you have to add both. The prisma-client
generates the actual client you then interact with when querying the database and zod-prisma-types
generates helper zod schemas that you can then use in your prisma queries mutations.
Hello. I am currently using
prisma-client
generator, and something like this.import { Prisma, User } from '@prisma/client';
The
prisma-client
generator automatically adds the select, insert, and methods to thePrisma
type.I have replaced the
prisma-client
withzod-prisma-types
generator as described in the documentation, but I don't anything about running actual queries with Prisma.zod-prisma-types
is no longer modifying the@prisma-client
Prisma
type. Is that still supposed to happen?I am using Yarn with workspaces and a shared
node_modules
folder. Not sure if that's what breaking it.