Varich
Varich2y ago

Making input to trpc route from Prisma generated type

Hello everyone, I want to make my TRPC update route generic and type safe. I already have all prisma setup. Would it be possible for me to reuse prisma generated type as the input and converted it to zod object automatically? I am trying not to copy myself and make it dynamic for future changes Thanks!
2 Replies
sachin
sachin2y ago
GitHub
GitHub - CarterGrimmeisen/zod-prisma: A custom prisma generator tha...
A custom prisma generator that creates Zod schemas from your Prisma model. - GitHub - CarterGrimmeisen/zod-prisma: A custom prisma generator that creates Zod schemas from your Prisma model.
Varich
Varich2y ago
Thank you, u r awesome!