how to tRPC Prisma Zod Json field

Hi 🙂 I am stuck with a mutation, in my db Model (Prisma + pg) I have a Json field (with variable schema) . How can I define the mutation input for it with Zod?
I tried to base myself on https://github.com/colinhacks/zod#json-type but still it diverges from the given Prisma.JsonValue.
I am rather new with with stack so I might miss something obvious 🙂
GitHub
GitHub - colinhacks/zod: TypeScript-first schema validation with st...
TypeScript-first schema validation with static type inference - GitHub - colinhacks/zod: TypeScript-first schema validation with static type inference
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server