We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f2d64ac commit 5d34499Copy full SHA for 5d34499
1 file changed
src/core/MutationResponse.ts
@@ -238,15 +238,16 @@ export class MutationResponse<
238
}
239
240
// Read the current query result from the store.
241
- const { result: currentQueryResult, complete } =
242
- observableQuery.getCacheDiff({ optimistic: false });
+ const { result, complete } = observableQuery.getCacheDiff({
+ optimistic: false,
243
+ });
244
- if (!complete || !currentQueryResult) {
245
+ if (!complete || !result) {
246
return;
247
248
249
// Run our reducer using the current query result and the mutation result.
- const nextQueryResult = updateQueries[queryName](currentQueryResult, {
250
+ const nextQueryResult = updateQueries[queryName](result, {
251
mutationResult: this.getResultWithDataState(result),
252
queryName,
253
queryVariables: variables!,
0 commit comments