Unclear method for default boolean values in additional fields

When setting the default value for a required additional field both of the following will fail and try to insert as null (tested drizzle adapter pg provider):
additionalFields: {
onboardingComplete: {
type: "boolean",
required: true,
input: false,
default: false //this fails
defaultValue: false, //as well as this
},
},
additionalFields: {
onboardingComplete: {
type: "boolean",
required: true,
input: false,
default: false //this fails
defaultValue: false, //as well as this
},
},
Only solution I found was
additionalFields: {
onboardingComplete: {
type: "boolean",
required: true,
input: false,
defaultValue: () => false,
},
},
additionalFields: {
onboardingComplete: {
type: "boolean",
required: true,
input: false,
defaultValue: () => false,
},
},
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?