diff --git a/kgraphql/src/main/kotlin/com/apurebase/kgraphql/schema/structure/SchemaCompilation.kt b/kgraphql/src/main/kotlin/com/apurebase/kgraphql/schema/structure/SchemaCompilation.kt index 665d6d00..09630e4c 100644 --- a/kgraphql/src/main/kotlin/com/apurebase/kgraphql/schema/structure/SchemaCompilation.kt +++ b/kgraphql/src/main/kotlin/com/apurebase/kgraphql/schema/structure/SchemaCompilation.kt @@ -332,8 +332,9 @@ class SchemaCompilation( } return operation.argumentsDescriptor.map { (name, kType) -> - val kqlInput = inputValues.find { it.name == name } ?: InputValueDef(kType.jvmErasure, name) - val inputType = handlePossiblyWrappedType(kType, TypeCategory.INPUT) + val inputValue = inputValues.find { it.name == name } + val kqlInput = inputValue ?: InputValueDef(kType.jvmErasure, name) + val inputType = handlePossiblyWrappedType(inputValue?.kClass?.starProjectedType ?: kType, TypeCategory.INPUT) InputValue(kqlInput, inputType) } }