Skip to content

Commit 69e2f3d

Browse files
authored
Merge pull request #472 from graphql-java-kickstart/bugfix/344
Build int and float default values correctly
2 parents 5cd97c5 + 137d837 commit 69e2f3d

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)