Skip to content

Commit 9812d88

Browse files
committed
getVariableValues populates only valid values
1 parent 8261a4d commit 9812d88

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/execution/values.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ export function getVariableValues(
4343
): { [key: string]: mixed } {
4444
return definitionASTs.reduce((values, defAST) => {
4545
const varName = defAST.variable.name.value;
46-
values[varName] = getVariableValue(schema, defAST, inputs[varName]);
46+
const value = getVariableValue(schema, defAST, inputs[varName]);
47+
if (value !== undefined && value === value) {
48+
values[varName] = value;
49+
}
4750
return values;
4851
}, {});
4952
}

0 commit comments

Comments
 (0)