Skip to content

Commit 4ed4217

Browse files
authored
[execution] fix coercing variable values (#6644)
1 parent 234c82a commit 4ed4217

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/apollo-execution/src/commonMain/kotlin/com/apollographql/apollo/execution/internal/coerceVariablesValues.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ internal fun coerceVariableValues(
2727

2828
variableDefinitions.forEach { variableDefinition ->
2929
val hasValue = variables.containsKey(variableDefinition.name)
30-
if (hasValue) {
30+
if (!hasValue) {
3131
val defaultValue = variableDefinition.defaultValue
3232
if (defaultValue != null) {
3333
coercedValues.put(variableDefinition.name, coerceInputLiteralToInternal(schema, defaultValue, variableDefinition.type, coercings, null))

0 commit comments

Comments
 (0)