@apollo/client 3.12.8 → 3.12.10
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 +29 -0
- package/apollo-client.cjs +9 -5
- package/apollo-client.cjs.map +1 -1
- package/apollo-client.min.cjs +1 -1
- package/core/core.cjs +1 -1
- package/core/core.cjs.map +1 -1
- package/core/core.cjs.native.js +1 -1
- package/dev/dev.cjs +1 -1
- package/dev/dev.cjs.map +1 -1
- package/dev/dev.cjs.native.js +1 -1
- package/errors/index.d.ts +2 -8
- package/errors/index.js.map +1 -1
- package/link/error/index.d.ts +2 -5
- package/link/error/index.js.map +1 -1
- package/link/retry/retry.cjs +13 -1
- package/link/retry/retry.cjs.map +1 -1
- package/link/retry/retry.cjs.native.js +13 -1
- package/link/retry/retryLink.js +15 -1
- package/link/retry/retryLink.js.map +1 -1
- package/package.json +4 -4
- package/react/hooks/hooks.cjs +8 -4
- package/react/hooks/hooks.cjs.map +1 -1
- package/react/hooks/hooks.cjs.native.js +8 -4
- package/react/hooks/useQueryRefHandlers.js +7 -10
- package/react/hooks/useQueryRefHandlers.js.map +1 -1
- package/react/hooks/useReadQuery.js +7 -10
- package/react/hooks/useReadQuery.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/testing/matchers/index.js +6 -0
- package/testing/matchers/index.js.map +1 -1
- package/testing/matchers/toEmitApolloQueryResult.d.ts +8 -0
- package/testing/matchers/toEmitApolloQueryResult.js +51 -0
- package/testing/matchers/toEmitApolloQueryResult.js.map +1 -0
- package/testing/matchers/toEmitFetchResult.d.ts +8 -0
- package/testing/matchers/toEmitFetchResult.js +51 -0
- package/testing/matchers/toEmitFetchResult.js.map +1 -0
- package/testing/matchers/toEqualFetchResult.d.ts +4 -0
- package/testing/matchers/toEqualFetchResult.js +20 -0
- package/testing/matchers/toEqualFetchResult.js.map +1 -0
- 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/testing/core/mocking/mockQueryManager.d.ts +0 -21
- package/testing/core/mocking/mockQueryManager.js +0 -19
- package/testing/core/mocking/mockQueryManager.js.map +0 -1
- package/testing/core/mocking/mockWatchQuery.d.ts +0 -5
- package/testing/core/mocking/mockWatchQuery.js +0 -15
- package/testing/core/mocking/mockWatchQuery.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# @apollo/client
|
|
2
2
|
|
|
3
|
+
## 3.12.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#12341](https://github.com/apollographql/apollo-client/pull/12341) [`f2bb0b9`](https://github.com/apollographql/apollo-client/commit/f2bb0b9955564e432345ee8bd431290e698d092c) Thanks [@phryneas](https://github.com/phryneas)! - `useReadQuery`/`useQueryRefHandlers`: Fix a "hook order" warning that might be emitted in React 19 dev mode.
|
|
8
|
+
|
|
9
|
+
- [#12342](https://github.com/apollographql/apollo-client/pull/12342) [`219b26b`](https://github.com/apollographql/apollo-client/commit/219b26ba5a697981ad700e05b926d42db0fb8e59) Thanks [@phryneas](https://github.com/phryneas)! - Add `graphql-ws` `^6.0.3` as a valid `peerDependency`
|
|
10
|
+
|
|
11
|
+
## 3.12.9
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#12321](https://github.com/apollographql/apollo-client/pull/12321) [`daa4f33`](https://github.com/apollographql/apollo-client/commit/daa4f3303cfb81e8dca66c21ce3f3dc24946cafb) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix type of `extensions` in `protocolErrors` for `ApolloError` and the `onError` link. According to the [multipart HTTP subscription protocol](https://www.apollographql.com/docs/graphos/routing/operations/subscriptions/multipart-protocol), fatal tranport errors follow the [GraphQL error format](https://spec.graphql.org/draft/#sec-Errors.Error-Result-Format) which require `extensions` to be a map as its value instead of an array.
|
|
16
|
+
|
|
17
|
+
- [#12318](https://github.com/apollographql/apollo-client/pull/12318) [`b17968b`](https://github.com/apollographql/apollo-client/commit/b17968b61f0e35b1ba20d081dacee66af8225491) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Allow `RetryLink` to retry an operation when fatal [transport-level errors](https://www.apollographql.com/docs/graphos/routing/operations/subscriptions/multipart-protocol#message-and-error-format) are emitted from multipart subscriptions.
|
|
18
|
+
|
|
19
|
+
```js
|
|
20
|
+
const retryLink = new RetryLink({
|
|
21
|
+
attempts: (count, operation, error) => {
|
|
22
|
+
if (error instanceof ApolloError) {
|
|
23
|
+
// errors available on the `protocolErrors` field in `ApolloError`
|
|
24
|
+
console.log(error.protocolErrors);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return true;
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
```
|
|
31
|
+
|
|
3
32
|
## 3.12.8
|
|
4
33
|
|
|
5
34
|
### 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.12.
|
|
34
|
+
var version = "3.12.10";
|
|
35
35
|
|
|
36
36
|
function maybe(thunk) {
|
|
37
37
|
try {
|
|
@@ -9156,9 +9156,11 @@ function useLoadableQuery(query, options) {
|
|
|
9156
9156
|
|
|
9157
9157
|
function useQueryRefHandlers(queryRef) {
|
|
9158
9158
|
var unwrapped = unwrapQueryRef(queryRef);
|
|
9159
|
-
|
|
9159
|
+
var clientOrObsQuery = useApolloClient(unwrapped ?
|
|
9160
9160
|
unwrapped["observable"]
|
|
9161
|
-
:
|
|
9161
|
+
: undefined);
|
|
9162
|
+
return wrapHook("useQueryRefHandlers",
|
|
9163
|
+
useQueryRefHandlers_, clientOrObsQuery)(queryRef);
|
|
9162
9164
|
}
|
|
9163
9165
|
function useQueryRefHandlers_(queryRef) {
|
|
9164
9166
|
assertWrappedQueryRef(queryRef);
|
|
@@ -9191,9 +9193,11 @@ function useQueryRefHandlers_(queryRef) {
|
|
|
9191
9193
|
|
|
9192
9194
|
function useReadQuery(queryRef) {
|
|
9193
9195
|
var unwrapped = unwrapQueryRef(queryRef);
|
|
9194
|
-
|
|
9196
|
+
var clientOrObsQuery = useApolloClient(unwrapped ?
|
|
9195
9197
|
unwrapped["observable"]
|
|
9196
|
-
:
|
|
9198
|
+
: undefined);
|
|
9199
|
+
return wrapHook("useReadQuery",
|
|
9200
|
+
useReadQuery_, clientOrObsQuery)(queryRef);
|
|
9197
9201
|
}
|
|
9198
9202
|
function useReadQuery_(queryRef) {
|
|
9199
9203
|
assertWrappedQueryRef(queryRef);
|