@apollo/client 3.13.3 → 3.13.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 +12 -0
- package/apollo-client.cjs +11 -8
- package/apollo-client.cjs.map +1 -1
- package/apollo-client.min.cjs +1 -1
- package/core/QueryInfo.d.ts +1 -0
- package/core/QueryInfo.js +8 -7
- package/core/QueryInfo.js.map +1 -1
- package/core/core.cjs +8 -4
- package/core/core.cjs.map +1 -1
- package/core/core.cjs.native.js +8 -4
- package/dev/dev.cjs +1 -1
- package/dev/dev.cjs.map +1 -1
- package/dev/dev.cjs.native.js +1 -1
- package/package.json +1 -1
- package/react/hooks/hooks.cjs +3 -4
- package/react/hooks/hooks.cjs.map +1 -1
- package/react/hooks/hooks.cjs.native.js +3 -4
- package/react/hooks/useSuspenseFragment.js +2 -2
- package/react/hooks/useSuspenseFragment.js.map +1 -1
- package/react/internal/internal.cjs +1 -1
- package/react/internal/internal.cjs.map +1 -1
- package/react/internal/internal.cjs.native.js +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,17 @@
|
|
|
1
1
|
# @apollo/client
|
|
2
2
|
|
|
3
|
+
## 3.13.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#12461](https://github.com/apollographql/apollo-client/pull/12461) [`12c8d06`](https://github.com/apollographql/apollo-client/commit/12c8d06f1ef7cfbece8e3a63b7ad09d91334f663) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix an issue where a `cache-first` query would return the result for previous variables when a cache update is issued after simultaneously changing variables and skipping the query.
|
|
8
|
+
|
|
9
|
+
## 3.13.4
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#12420](https://github.com/apollographql/apollo-client/pull/12420) [`fee9368`](https://github.com/apollographql/apollo-client/commit/fee9368750e242ea03dea8d1557683506d411d8d) Thanks [@jorenbroekema](https://github.com/jorenbroekema)! - Use import star from `rehackt` to prevent issues with importing named exports from external CJS modules.
|
|
14
|
+
|
|
3
15
|
## 3.13.3
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/apollo-client.cjs
CHANGED
|
@@ -30,9 +30,8 @@ function _interopNamespace(e) {
|
|
|
30
30
|
|
|
31
31
|
var equal__default = /*#__PURE__*/_interopDefaultLegacy(equal);
|
|
32
32
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
33
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
34
33
|
|
|
35
|
-
var version = "3.13.
|
|
34
|
+
var version = "3.13.5";
|
|
36
35
|
|
|
37
36
|
function maybe(thunk) {
|
|
38
37
|
try {
|
|
@@ -5810,6 +5809,7 @@ var QueryInfo = (function () {
|
|
|
5810
5809
|
}
|
|
5811
5810
|
if (!equal.equal(query.variables, this.variables)) {
|
|
5812
5811
|
this.lastDiff = void 0;
|
|
5812
|
+
this.cancel();
|
|
5813
5813
|
}
|
|
5814
5814
|
Object.assign(this, {
|
|
5815
5815
|
document: query.document,
|
|
@@ -5931,13 +5931,16 @@ var QueryInfo = (function () {
|
|
|
5931
5931
|
this.stopped = true;
|
|
5932
5932
|
this.reset();
|
|
5933
5933
|
this.cancel();
|
|
5934
|
-
this.cancel = QueryInfo.prototype.cancel;
|
|
5935
5934
|
var oq = this.observableQuery;
|
|
5936
5935
|
if (oq)
|
|
5937
5936
|
oq.stopPolling();
|
|
5938
5937
|
}
|
|
5939
5938
|
};
|
|
5940
|
-
QueryInfo.prototype.cancel = function () {
|
|
5939
|
+
QueryInfo.prototype.cancel = function () {
|
|
5940
|
+
var _a;
|
|
5941
|
+
(_a = this.cancelWatch) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
5942
|
+
this.cancelWatch = void 0;
|
|
5943
|
+
};
|
|
5941
5944
|
QueryInfo.prototype.updateWatch = function (variables) {
|
|
5942
5945
|
var _this = this;
|
|
5943
5946
|
if (variables === void 0) { variables = this.variables; }
|
|
@@ -5948,7 +5951,7 @@ var QueryInfo = (function () {
|
|
|
5948
5951
|
var watchOptions = tslib.__assign(tslib.__assign({}, this.getDiffOptions(variables)), { watcher: this, callback: function (diff) { return _this.setDiff(diff); } });
|
|
5949
5952
|
if (!this.lastWatch || !equal.equal(watchOptions, this.lastWatch)) {
|
|
5950
5953
|
this.cancel();
|
|
5951
|
-
this.
|
|
5954
|
+
this.cancelWatch = this.cache.watch((this.lastWatch = watchOptions));
|
|
5952
5955
|
}
|
|
5953
5956
|
};
|
|
5954
5957
|
QueryInfo.prototype.resetLastWrite = function () {
|
|
@@ -9230,14 +9233,14 @@ function useSuspenseFragment_(options) {
|
|
|
9230
9233
|
var client = useApolloClient(options.client);
|
|
9231
9234
|
var from = options.from, variables = options.variables;
|
|
9232
9235
|
var cache = client.cache;
|
|
9233
|
-
var id =
|
|
9236
|
+
var id = React__namespace.useMemo(function () {
|
|
9234
9237
|
return typeof from === "string" ? from
|
|
9235
9238
|
: from === null ? null
|
|
9236
9239
|
: cache.identify(from);
|
|
9237
9240
|
}, [cache, from]);
|
|
9238
9241
|
var fragmentRef = id === null ? null : (getSuspenseCache(client).getFragmentRef([id, options.fragment, canonicalStringify(variables)], client, tslib.__assign(tslib.__assign({}, options), { variables: variables, from: id })));
|
|
9239
|
-
var _a =
|
|
9240
|
-
|
|
9242
|
+
var _a = React__namespace.useState(fragmentRef === null ? NULL_PLACEHOLDER : ([fragmentRef.key, fragmentRef.promise])), current = _a[0], setPromise = _a[1];
|
|
9243
|
+
React__namespace.useEffect(function () {
|
|
9241
9244
|
if (fragmentRef === null) {
|
|
9242
9245
|
return;
|
|
9243
9246
|
}
|