@apollo/client 3.9.3 → 3.9.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/apollo-client.cjs +14 -7
- package/apollo-client.cjs.map +1 -1
- package/apollo-client.min.cjs +1 -1
- package/core/QueryInfo.d.ts +1 -1
- package/core/QueryInfo.js +26 -11
- package/core/QueryInfo.js.map +1 -1
- package/core/QueryManager.js +1 -1
- package/core/QueryManager.js.map +1 -1
- package/core/core.cjs +13 -6
- package/core/core.cjs.map +1 -1
- package/core/core.cjs.native.js +13 -6
- package/dev/dev.cjs +1 -1
- package/dev/dev.cjs.map +1 -1
- package/dev/dev.cjs.native.js +1 -1
- package/package.json +14 -14
- package/react/hooks/hooks.cjs +1 -1
- package/react/hooks/hooks.cjs.map +1 -1
- package/react/hooks/hooks.cjs.native.js +1 -1
- package/react/hooks/useLazyQuery.js +1 -1
- package/react/hooks/useLazyQuery.js.map +1 -1
- package/testing/core/core.cjs +2 -2
- package/testing/core/core.cjs.map +1 -1
- package/testing/core/core.cjs.native.js +2 -2
- package/testing/core/mocking/mockLink.d.ts +1 -1
- package/testing/core/mocking/mockLink.js +2 -2
- package/testing/core/mocking/mockLink.js.map +1 -1
- package/utilities/globals/globals.cjs +1 -1
- package/utilities/globals/globals.cjs.map +1 -1
- package/utilities/globals/globals.cjs.native.js +1 -1
- package/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @apollo/client
|
|
2
2
|
|
|
3
|
+
## 3.9.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#11595](https://github.com/apollographql/apollo-client/pull/11595) [`8c20955`](https://github.com/apollographql/apollo-client/commit/8c20955874562e5b2ab35557325e047b059bc4fc) Thanks [@phryneas](https://github.com/phryneas)! - Bumps the dependency `rehackt` to 0.0.5
|
|
8
|
+
|
|
9
|
+
- [#11592](https://github.com/apollographql/apollo-client/pull/11592) [`1133469`](https://github.com/apollographql/apollo-client/commit/1133469bd91ff76b9815e815a454a79d8e23a9bc) Thanks [@Stephen2](https://github.com/Stephen2)! - Strengthen `MockedResponse.newData` type
|
|
10
|
+
|
|
11
|
+
- [#11579](https://github.com/apollographql/apollo-client/pull/11579) [`1ba2fd9`](https://github.com/apollographql/apollo-client/commit/1ba2fd919f79dfdc7b9d3f7d1a7aa5918e648349) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix issue where partial data is reported to `useQuery` when using `notifyOnNetworkStatusChange` after it errors while another overlapping query succeeds.
|
|
12
|
+
|
|
13
|
+
- [#11579](https://github.com/apollographql/apollo-client/pull/11579) [`1ba2fd9`](https://github.com/apollographql/apollo-client/commit/1ba2fd919f79dfdc7b9d3f7d1a7aa5918e648349) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix an issue where a partial cache write for an errored query would result in automatically refetching that query.
|
|
14
|
+
|
|
15
|
+
- [#11562](https://github.com/apollographql/apollo-client/pull/11562) [`65ab695`](https://github.com/apollographql/apollo-client/commit/65ab695470741e8dcaef1ebd7742c3c397526354) Thanks [@mspiess](https://github.com/mspiess)! - Mocks with an infinite delay no longer require result or error
|
|
16
|
+
|
|
17
|
+
## 3.9.4
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- [#11403](https://github.com/apollographql/apollo-client/pull/11403) [`b0c4f3a`](https://github.com/apollographql/apollo-client/commit/b0c4f3ad8198981a229b46dc430345a76e577e9c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix issue in `useLazyQuery` that results in a double network call when calling the execute function with no arguments after having called it previously with another set of arguments.
|
|
22
|
+
|
|
23
|
+
- [#11576](https://github.com/apollographql/apollo-client/pull/11576) [`e855d00`](https://github.com/apollographql/apollo-client/commit/e855d00447e4d9ae478d98f6796d842ef6cc76d1) Thanks [@alessbell](https://github.com/alessbell)! - Revert PR [#11202](https://github.com/apollographql/apollo-client/pull/11202) to fix caching bug reported in [#11560](https://github.com/apollographql/apollo-client/issues/11560)
|
|
24
|
+
|
|
3
25
|
## 3.9.3
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
package/apollo-client.cjs
CHANGED
|
@@ -31,7 +31,7 @@ function _interopNamespace(e) {
|
|
|
31
31
|
var equal__default = /*#__PURE__*/_interopDefaultLegacy(equal);
|
|
32
32
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
33
33
|
|
|
34
|
-
var version = "3.9.
|
|
34
|
+
var version = "3.9.5";
|
|
35
35
|
|
|
36
36
|
function maybe(thunk) {
|
|
37
37
|
try {
|
|
@@ -5818,7 +5818,14 @@ var QueryInfo = (function () {
|
|
|
5818
5818
|
};
|
|
5819
5819
|
QueryInfo.prototype.setDiff = function (diff) {
|
|
5820
5820
|
var _this = this;
|
|
5821
|
+
var _a;
|
|
5821
5822
|
var oldDiff = this.lastDiff && this.lastDiff.diff;
|
|
5823
|
+
if (diff &&
|
|
5824
|
+
!diff.complete &&
|
|
5825
|
+
!((_a = this.observableQuery) === null || _a === void 0 ? void 0 : _a.options.returnPartialData) &&
|
|
5826
|
+
!(oldDiff && oldDiff.complete)) {
|
|
5827
|
+
return;
|
|
5828
|
+
}
|
|
5822
5829
|
this.updateLastDiff(diff);
|
|
5823
5830
|
if (!this.dirty && !equal.equal(oldDiff && oldDiff.result, diff && diff.result)) {
|
|
5824
5831
|
this.dirty = true;
|
|
@@ -5908,7 +5915,6 @@ var QueryInfo = (function () {
|
|
|
5908
5915
|
};
|
|
5909
5916
|
QueryInfo.prototype.markResult = function (result, document, options, cacheWriteBehavior) {
|
|
5910
5917
|
var _this = this;
|
|
5911
|
-
result = tslib.__assign({}, result);
|
|
5912
5918
|
var merger = new DeepMerger();
|
|
5913
5919
|
var graphQLErrors = isNonEmptyArray(result.errors) ? result.errors.slice(0) : [];
|
|
5914
5920
|
this.reset();
|
|
@@ -5935,7 +5941,7 @@ var QueryInfo = (function () {
|
|
|
5935
5941
|
overwrite: cacheWriteBehavior === 1 ,
|
|
5936
5942
|
});
|
|
5937
5943
|
_this.lastWrite = {
|
|
5938
|
-
result:
|
|
5944
|
+
result: result,
|
|
5939
5945
|
variables: options.variables,
|
|
5940
5946
|
dmCount: destructiveMethodCounts.get(_this.cache),
|
|
5941
5947
|
};
|
|
@@ -5952,14 +5958,15 @@ var QueryInfo = (function () {
|
|
|
5952
5958
|
_this.updateWatch(options.variables);
|
|
5953
5959
|
}
|
|
5954
5960
|
_this.updateLastDiff(diff, diffOptions);
|
|
5955
|
-
|
|
5961
|
+
if (diff.complete) {
|
|
5962
|
+
result.data = diff.result;
|
|
5963
|
+
}
|
|
5956
5964
|
});
|
|
5957
5965
|
}
|
|
5958
5966
|
else {
|
|
5959
5967
|
this.lastWrite = void 0;
|
|
5960
5968
|
}
|
|
5961
5969
|
}
|
|
5962
|
-
return result;
|
|
5963
5970
|
};
|
|
5964
5971
|
QueryInfo.prototype.markReady = function () {
|
|
5965
5972
|
this.networkError = null;
|
|
@@ -6634,7 +6641,7 @@ var QueryManager = (function () {
|
|
|
6634
6641
|
graphQLErrors: graphQLErrors,
|
|
6635
6642
|
}));
|
|
6636
6643
|
}
|
|
6637
|
-
|
|
6644
|
+
queryInfo.markResult(result, linkDocument, options, cacheWriteBehavior);
|
|
6638
6645
|
queryInfo.markReady();
|
|
6639
6646
|
}
|
|
6640
6647
|
var aqr = {
|
|
@@ -7669,7 +7676,7 @@ function useLazyQuery(query, options) {
|
|
|
7669
7676
|
var queryRef = React__namespace.useRef();
|
|
7670
7677
|
var merged = mergeOptions(options, execOptionsRef.current || {});
|
|
7671
7678
|
var document = (_a = merged === null || merged === void 0 ? void 0 : merged.query) !== null && _a !== void 0 ? _a : query;
|
|
7672
|
-
optionsRef.current =
|
|
7679
|
+
optionsRef.current = options;
|
|
7673
7680
|
queryRef.current = document;
|
|
7674
7681
|
var internalState = useInternalState(useApolloClient(options && options.client), document);
|
|
7675
7682
|
var useQueryResult = internalState.useQuery(tslib.__assign(tslib.__assign({}, merged), { skip: !execOptionsRef.current }));
|