jorge
Explore posts from serversDTDrizzle Team
•Created by jorge on 8/11/2024 in #help
drizzle-zod createInsertSchema gives optional types
I have the following table:
And I am using
drizzle-zod
to generate a Zod type from my schema:
However when I try to use the type within my tRPC
procedure as such, I get a typescript error, which seems to be complaining that the properties within CreateRecipeSchema
are optional:
I'm quite new to drizzle and zod, and from what I gather from documentation, I am using zod correctly, but I am not sure.8 replies