Infering procedure input from prisma type

Hey, is there a way to infer the input validation from prisma entity? maybe with some utility something like this, which is wrong
upsertOrder: protectedProcedure
.input(
z.object({
order: z.somehow...<Prisma.dispo_order>
}),
...
upsertOrder: protectedProcedure
.input(
z.object({
order: z.somehow...<Prisma.dispo_order>
}),
...
1 Reply
Neto
Neto15mo ago
npm
zod-prisma
A Prisma generator that creates Zod schemas for all of your models. Latest version: 0.5.4, last published: a year ago. Start using zod-prisma in your project by running npm i zod-prisma. There are 2 other projects in the npm registry using zod-prisma.