Skip to content

Commit

Permalink
change addExportedVariables signature
Browse files Browse the repository at this point in the history
  • Loading branch information
phryneas committed Sep 13, 2023
1 parent 6498326 commit b8c6eb6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/core/LocalState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,11 @@ export class LocalState<TCacheShape> {
// 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<TVars extends OperationVariables>(
document: DocumentNode,
variables: OperationVariables = {},
variables: TVars = {} as TVars,
context = {}
) {
): /* returns at least the variables that were passed in */ Promise<TVars> {
if (document) {
return this.resolveDocument(
document,
Expand Down
2 changes: 1 addition & 1 deletion src/core/QueryManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1308,7 +1308,7 @@ export class QueryManager<TStore> {
normalized.variables,
normalized.context
)
.then(fromVariables as (Variables: any) => SourcesAndInfo<TData>)
.then(fromVariables)
.then((sourcesWithInfo) => sourcesWithInfo.sources)
);
// there is just no way we can synchronously get the *right* value here,
Expand Down

0 comments on commit b8c6eb6

Please sign in to comment.