We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a18ece2 commit cb2226aCopy full SHA for cb2226a
src/yup/index.ts
@@ -281,8 +281,9 @@ function shapeFields(fields: readonly (FieldDefinitionNode | InputValueDefinitio
281
defaultValue?.kind === Kind.INT
282
|| defaultValue?.kind === Kind.FLOAT
283
|| defaultValue?.kind === Kind.BOOLEAN
284
- )
+ ) {
285
fieldSchema = `${fieldSchema}.default(${defaultValue.value})`;
286
+ }
287
288
if (defaultValue?.kind === Kind.STRING || defaultValue?.kind === Kind.ENUM) {
289
if (config.useEnumTypeAsDefaultValue && defaultValue?.kind !== Kind.STRING) {
0 commit comments