Skip to content

Commit 68f7ce2

Browse files
committed
Build int and float default values correctly
1 parent 446cc0b commit 68f7ce2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/kotlin/graphql/kickstart/tools/SchemaParser.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,8 +363,8 @@ class SchemaParser internal constructor(
363363
private fun buildDefaultValue(value: Value<*>?): Any? {
364364
return when (value) {
365365
null -> null
366-
is IntValue -> value.value
367-
is FloatValue -> value.value
366+
is IntValue -> value.value.toInt()
367+
is FloatValue -> value.value.toDouble()
368368
is StringValue -> value.value
369369
is EnumValue -> value.name
370370
is BooleanValue -> value.isValue

0 commit comments

Comments
 (0)