diff --git a/src/execution/__tests__/executor-test.ts b/src/execution/__tests__/executor-test.ts index 6cb6858e46..aa84f7cc94 100644 --- a/src/execution/__tests__/executor-test.ts +++ b/src/execution/__tests__/executor-test.ts @@ -240,7 +240,19 @@ describe('Execute: Handles basic execution tasks', () => { expect(resolvedInfo).to.deep.include({ fieldNodes: [field], path: { prev: undefined, key: 'result', typename: 'Test' }, - variableValues: { var: 'abc' }, + variableValues: { + sources: { + var: { + signature: { + name: 'var', + type: GraphQLString, + defaultValue: undefined, + }, + value: 'abc', + }, + }, + coerced: { var: 'abc' }, + }, }); }); diff --git a/src/execution/execute.ts b/src/execution/execute.ts index 939104c430..6909765041 100644 --- a/src/execution/execute.ts +++ b/src/execution/execute.ts @@ -843,7 +843,7 @@ export function buildResolveInfo( ), rootValue: exeContext.rootValue, operation: exeContext.operation, - variableValues: exeContext.variableValues.coerced, + variableValues: exeContext.variableValues, }; } diff --git a/src/type/definition.ts b/src/type/definition.ts index 4ebb5ae928..6ce4115a87 100644 --- a/src/type/definition.ts +++ b/src/type/definition.ts @@ -40,6 +40,8 @@ import type { import { Kind } from '../language/kinds.js'; import { print } from '../language/printer.js'; +import type { VariableValues } from '../execution/values.js'; + import { valueFromASTUntyped } from '../utilities/valueFromASTUntyped.js'; import { assertEnumValueName, assertName } from './assertName.js'; @@ -897,7 +899,7 @@ export interface GraphQLResolveInfo { readonly fragments: ObjMap; readonly rootValue: unknown; readonly operation: OperationDefinitionNode; - readonly variableValues: { [variable: string]: unknown }; + readonly variableValues: VariableValues; } /**