Skip to content

Commit 7224d07

Browse files
committed
toQueryResult in same promise
1 parent 0af6017 commit 7224d07

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/core/ObservableQuery.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import { __DEV__ } from "@apollo/client/utilities/environment";
2323
import { toQueryResult } from "@apollo/client/utilities/internal";
2424
import { invariant } from "@apollo/client/utilities/invariant";
2525

26-
2726
import { equalByQuery } from "./equalByQuery.js";
2827
import { isNetworkRequestInFlight, NetworkStatus } from "./networkStatus.js";
2928
import type { QueryInfo } from "./QueryInfo.js";
@@ -1067,7 +1066,9 @@ Did you mean to call refetch(variables) instead of refetch({ variables })?`,
10671066
// Note: lastValueFrom will create a separate subscription to the
10681067
// observable which means that terminating this ObservableQuery will not
10691068
// cancel the request from the link chain.
1070-
lastValueFrom(observable).then(this.maskResult).then(toQueryResult)
1069+
lastValueFrom(observable).then((result) =>
1070+
toQueryResult(this.maskResult(result))
1071+
)
10711072
);
10721073
}
10731074

0 commit comments

Comments
 (0)