Do we have replacement for .nullable to .optional #311
Replies: 1 comment
-
@satyam7world the zod methods for but currently there is no option to change all nullable fields to optional() since the generated schemas reflect the types of the prisma schema where "null" (corresponds to nullable() in zod) is returned for fields with no value and not "undefined" (corresponds to optional() in zod). so if you would fetch data via prisma where some fields are null and then parse the schema with |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am integrating a library for auto form creation that is uniforms
but it's showing error when used .nullable or .nullish
error
Invariant Violation: Field "city" has an unknown type
of course i can manually edit all generated types but do you have some flags to generate them as .optional
Beta Was this translation helpful? Give feedback.
All reactions