diff --git a/src/execution/execute.ts b/src/execution/execute.ts index a35156cb8c..b2ad9ec76f 100644 --- a/src/execution/execute.ts +++ b/src/execution/execute.ts @@ -1147,7 +1147,7 @@ function getStreamUsage( (fieldDetails) => ({ node: fieldDetails.node, deferUsage: undefined, - fragmentVariablesValues: fieldDetails.fragmentVariableValues, + fragmentVariableValues: fieldDetails.fragmentVariableValues, }), ); diff --git a/src/execution/values.ts b/src/execution/values.ts index 5040193c77..f5ce397633 100644 --- a/src/execution/values.ts +++ b/src/execution/values.ts @@ -219,7 +219,7 @@ export function experimentalGetArgumentValues( node: FieldNode | DirectiveNode | FragmentSpreadNode, argDefs: ReadonlyArray, variableValues: Maybe, - fragmentVariablesValues?: Maybe, + fragmentVariableValues?: Maybe, hideSuggestions?: Maybe, ): { [argument: string]: unknown } { const coercedValues: { [argument: string]: unknown } = {}; @@ -256,10 +256,8 @@ export function experimentalGetArgumentValues( if (valueNode.kind === Kind.VARIABLE) { const variableName = valueNode.name.value; - const scopedVariableValues = fragmentVariablesValues?.sources[ - variableName - ] - ? fragmentVariablesValues + const scopedVariableValues = fragmentVariableValues?.sources[variableName] + ? fragmentVariableValues : variableValues; if ( scopedVariableValues == null || @@ -295,7 +293,7 @@ export function experimentalGetArgumentValues( valueNode, argType, variableValues, - fragmentVariablesValues, + fragmentVariableValues, hideSuggestions, ); if (coercedValue === undefined) {