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.
trpc allows you to provide a Zod schema to the input() argument for mutations:
exportconstexampleRouter=createRouter({// Here: vcreate: protectedProcedure.input(...).mutation(({ ctx })=>{const{ user, db }=ctx;}),});
It would be great if we could use the schema types we define in the DB package for inferring the necessary input.
Describe the solution you'd like drizzle-zod exists to solve this problem, as it's a plugin for Drizzle ORM that allows you to generate Zod schemas from Drizzle ORM schemas.
Describe alternatives you've considered
N/A
Additional context
Should these be defined in the API package? Or the DB package? (if DB: we'd need to make all the schema types publicly accessible / external to the package.)
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
trpc allows you to provide a Zod schema to the
input()
argument for mutations:It would be great if we could use the schema types we define in the DB package for inferring the necessary input.
Describe the solution you'd like
drizzle-zod exists to solve this problem, as it's a plugin for Drizzle ORM that allows you to generate Zod schemas from Drizzle ORM schemas.
Describe alternatives you've considered
N/A
Additional context
Should these be defined in the API package? Or the DB package? (if DB: we'd need to make all the schema types publicly accessible / external to the package.)
The text was updated successfully, but these errors were encountered: