Skip to content

Commit 740e3e0

Browse files
committed
Inline the call
1 parent 55b3707 commit 740e3e0

1 file changed

Lines changed: 5 additions & 10 deletions

File tree

src/core/MutationResponse.ts

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import { shouldWriteResult } from "./QueryInfo.js";
1515
import type { QueryManager } from "./QueryManager.js";
1616
import type {
1717
DataValue,
18-
MutationQueryReducer,
1918
NormalizedExecutionResult,
2019
OperationVariables,
2120
} from "./types.js";
@@ -246,18 +245,14 @@ export class MutationResponse<
246245
return;
247246
}
248247

249-
const updater = updateQueries[queryName];
250248
const { query: document, variables } = observableQuery;
251249

252250
// Run our reducer using the current query result and the mutation result.
253-
const nextQueryResult = (updater as MutationQueryReducer<any>)(
254-
currentQueryResult,
255-
{
256-
mutationResult: this.getResultWithDataState(result),
257-
queryName,
258-
queryVariables: variables!,
259-
}
260-
);
251+
const nextQueryResult = updateQueries[queryName](currentQueryResult, {
252+
mutationResult: this.getResultWithDataState(result),
253+
queryName,
254+
queryVariables: variables!,
255+
});
261256

262257
// Write the modified result back into the store if we got a new result.
263258
if (nextQueryResult) {

0 commit comments

Comments
 (0)