From b8c6eb6158d753840efe464dbf1ab26e147c80bd Mon Sep 17 00:00:00 2001 From: Lenz Weber-Tronic Date: Wed, 13 Sep 2023 14:55:06 +0200 Subject: [PATCH] change `addExportedVariables` signature --- src/core/LocalState.ts | 6 +++--- src/core/QueryManager.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/LocalState.ts b/src/core/LocalState.ts index 0436f737151..4b68b787c2a 100644 --- a/src/core/LocalState.ts +++ b/src/core/LocalState.ts @@ -197,11 +197,11 @@ export class LocalState { // To support `@client @export(as: "someVar")` syntax, we'll first resolve // @client @export fields locally, then pass the resolved values back to be // used alongside the original operation variables. - public async addExportedVariables( + public async addExportedVariables( document: DocumentNode, - variables: OperationVariables = {}, + variables: TVars = {} as TVars, context = {} - ) { + ): /* returns at least the variables that were passed in */ Promise { if (document) { return this.resolveDocument( document, diff --git a/src/core/QueryManager.ts b/src/core/QueryManager.ts index ae5330ed72c..fe7a17ca479 100644 --- a/src/core/QueryManager.ts +++ b/src/core/QueryManager.ts @@ -1308,7 +1308,7 @@ export class QueryManager { normalized.variables, normalized.context ) - .then(fromVariables as (Variables: any) => SourcesAndInfo) + .then(fromVariables) .then((sourcesWithInfo) => sourcesWithInfo.sources) ); // there is just no way we can synchronously get the *right* value here,