-
-
Notifications
You must be signed in to change notification settings - Fork 56
Closed
Labels
good first issueGood for newcomersGood for newcomers
Description
Currently, due to limitation of the zod framework, all default
properties become nullable which causes an issue for us. The apparent solution is to add a transform call after the .default(
, e.g. z.boolean().default(false).transform(option.fromNullable)
I know that I can do
scalarSchemas: { Boolean: "z.boolean().transform(option.fromNullable)", },
but this applies the transformation before .default
Looking at the code (index.ts for zod), I can see that the default is hardcoded to be the last one.
Would it be possible to configure the plugin to generate something after .default
?
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers