@apollo/client 3.9.7 → 3.9.8
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 +9 -5
- package/apollo-client.cjs.map +1 -1
- package/apollo-client.min.cjs +1 -1
- package/core/ApolloClient.d.ts +7 -7
- package/core/ApolloClient.js +6 -6
- package/core/ApolloClient.js.map +1 -1
- package/core/core.cjs +1 -1
- package/core/core.cjs.map +1 -1
- package/core/core.cjs.native.js +1 -1
- package/core/watchQueryOptions.d.ts +3 -3
- package/dev/dev.cjs +18 -15
- package/dev/dev.cjs.map +1 -1
- package/dev/dev.cjs.native.js +18 -15
- package/dev/index.d.ts +2 -0
- package/dev/index.js +1 -0
- package/dev/index.js.map +1 -1
- package/dev/loadErrorMessageHandler.d.ts +6 -1
- package/dev/loadErrorMessageHandler.js +17 -14
- package/dev/loadErrorMessageHandler.js.map +1 -1
- package/dev/setErrorMessageHandler.d.ts +34 -0
- package/dev/setErrorMessageHandler.js +9 -0
- package/dev/setErrorMessageHandler.js.map +1 -0
- package/package.json +17 -17
- package/react/hooks/hooks.cjs +3 -0
- package/react/hooks/hooks.cjs.map +1 -1
- package/react/hooks/hooks.cjs.native.js +3 -0
- package/react/hooks/useFragment.d.ts +1 -1
- package/react/hooks/useFragment.js +5 -0
- package/react/hooks/useFragment.js.map +1 -1
- package/react/internal/cache/QueryReference.d.ts +2 -2
- package/react/internal/cache/QueryReference.js +13 -4
- package/react/internal/cache/QueryReference.js.map +1 -1
- package/react/internal/internal.cjs +5 -4
- package/react/internal/internal.cjs.map +1 -1
- package/react/internal/internal.cjs.native.js +5 -4
- package/react/query-preloader/createQueryPreloader.d.ts +6 -6
- package/react/query-preloader/createQueryPreloader.js.map +1 -1
- package/react/types/types.d.ts +3 -3
- package/react/types/types.documentation.d.ts +4 -4
- package/react/types/types.documentation.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/utilities/globals/invariantWrappers.d.ts +1 -1
- package/utilities/globals/invariantWrappers.js.map +1 -1
- package/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @apollo/client
|
|
2
2
|
|
|
3
|
+
## 3.9.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#11706](https://github.com/apollographql/apollo-client/pull/11706) [`8619bc7`](https://github.com/apollographql/apollo-client/commit/8619bc7e569c1c732afa6faf605c83a6ce0cdf0c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix issue in all suspense hooks where returning an empty array after calling `fetchMore` would rerender the component with an empty list.
|
|
8
|
+
|
|
9
|
+
- [#11694](https://github.com/apollographql/apollo-client/pull/11694) [`835d5f3`](https://github.com/apollographql/apollo-client/commit/835d5f30c532c432e2434561580e6f1ec44cc908) Thanks [@phryneas](https://github.com/phryneas)! - Expose `setErrorMessageHandler` from `@apollo/client/dev` entrypoint.
|
|
10
|
+
|
|
11
|
+
- [#11689](https://github.com/apollographql/apollo-client/pull/11689) [`cb8ffe5`](https://github.com/apollographql/apollo-client/commit/cb8ffe50e903397f741b62a44624bfe69b5f7b75) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix issue where passing a new `from` option to `useFragment` would first render with the previous value before rerendering with the correct value.
|
|
12
|
+
|
|
13
|
+
- [#11713](https://github.com/apollographql/apollo-client/pull/11713) [`642092c`](https://github.com/apollographql/apollo-client/commit/642092c713199093aede45f105a1ee3f637614cd) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix issue where setting a default `watchQuery` option in the `ApolloClient` constructor could break `startTransition` when used with suspense hooks.
|
|
14
|
+
|
|
3
15
|
## 3.9.7
|
|
4
16
|
|
|
5
17
|
### 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.8";
|
|
35
35
|
|
|
36
36
|
function maybe(thunk) {
|
|
37
37
|
try {
|
|
@@ -8048,6 +8048,9 @@ function _useFragment(options) {
|
|
|
8048
8048
|
var resultRef = useLazyRef(function () {
|
|
8049
8049
|
return diffToResult(cache.diff(diffOptions));
|
|
8050
8050
|
});
|
|
8051
|
+
React__namespace.useMemo(function () {
|
|
8052
|
+
resultRef.current = diffToResult(cache.diff(diffOptions));
|
|
8053
|
+
}, [diffOptions, cache]);
|
|
8051
8054
|
var getSnapshot = React__namespace.useCallback(function () { return resultRef.current; }, []);
|
|
8052
8055
|
return useSyncExternalStore(React__namespace.useCallback(function (forceUpdate) {
|
|
8053
8056
|
var lastTimeout = 0;
|
|
@@ -8189,7 +8192,8 @@ var InternalQueryReference = (function () {
|
|
|
8189
8192
|
InternalQueryReference.prototype.didChangeOptions = function (watchQueryOptions) {
|
|
8190
8193
|
var _this = this;
|
|
8191
8194
|
return OBSERVED_CHANGED_OPTIONS.some(function (option) {
|
|
8192
|
-
return
|
|
8195
|
+
return option in watchQueryOptions &&
|
|
8196
|
+
!equal.equal(_this.watchQueryOptions[option], watchQueryOptions[option]);
|
|
8193
8197
|
});
|
|
8194
8198
|
};
|
|
8195
8199
|
InternalQueryReference.prototype.applyOptions = function (watchQueryOptions) {
|
|
@@ -8275,12 +8279,12 @@ var InternalQueryReference = (function () {
|
|
|
8275
8279
|
this.promise = this.createPendingPromise();
|
|
8276
8280
|
this.promise.catch(function () { });
|
|
8277
8281
|
returnedPromise
|
|
8278
|
-
.then(function (
|
|
8282
|
+
.then(function () {
|
|
8279
8283
|
setTimeout(function () {
|
|
8280
8284
|
var _a;
|
|
8281
8285
|
if (_this.promise.status === "pending") {
|
|
8282
|
-
_this.result =
|
|
8283
|
-
(_a = _this.resolve) === null || _a === void 0 ? void 0 : _a.call(_this, result);
|
|
8286
|
+
_this.result = _this.observable.getCurrentResult();
|
|
8287
|
+
(_a = _this.resolve) === null || _a === void 0 ? void 0 : _a.call(_this, _this.result);
|
|
8284
8288
|
}
|
|
8285
8289
|
});
|
|
8286
8290
|
})
|