@apollo/client 3.12.8 → 3.12.9

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.
Files changed (44) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/apollo-client.cjs +1 -1
  3. package/apollo-client.cjs.map +1 -1
  4. package/apollo-client.min.cjs +1 -1
  5. package/core/core.cjs +1 -1
  6. package/core/core.cjs.map +1 -1
  7. package/core/core.cjs.native.js +1 -1
  8. package/dev/dev.cjs +1 -1
  9. package/dev/dev.cjs.map +1 -1
  10. package/dev/dev.cjs.native.js +1 -1
  11. package/errors/index.d.ts +2 -8
  12. package/errors/index.js.map +1 -1
  13. package/link/error/index.d.ts +2 -5
  14. package/link/error/index.js.map +1 -1
  15. package/link/retry/retry.cjs +13 -1
  16. package/link/retry/retry.cjs.map +1 -1
  17. package/link/retry/retry.cjs.native.js +13 -1
  18. package/link/retry/retryLink.js +15 -1
  19. package/link/retry/retryLink.js.map +1 -1
  20. package/package.json +2 -2
  21. package/react/internal/internal.cjs +1 -1
  22. package/react/internal/internal.cjs.map +1 -1
  23. package/react/internal/internal.cjs.native.js +1 -1
  24. package/testing/matchers/index.js +6 -0
  25. package/testing/matchers/index.js.map +1 -1
  26. package/testing/matchers/toEmitApolloQueryResult.d.ts +8 -0
  27. package/testing/matchers/toEmitApolloQueryResult.js +51 -0
  28. package/testing/matchers/toEmitApolloQueryResult.js.map +1 -0
  29. package/testing/matchers/toEmitFetchResult.d.ts +8 -0
  30. package/testing/matchers/toEmitFetchResult.js +51 -0
  31. package/testing/matchers/toEmitFetchResult.js.map +1 -0
  32. package/testing/matchers/toEqualFetchResult.d.ts +4 -0
  33. package/testing/matchers/toEqualFetchResult.js +20 -0
  34. package/testing/matchers/toEqualFetchResult.js.map +1 -0
  35. package/utilities/globals/globals.cjs +1 -1
  36. package/utilities/globals/globals.cjs.map +1 -1
  37. package/utilities/globals/globals.cjs.native.js +1 -1
  38. package/version.js +1 -1
  39. package/testing/core/mocking/mockQueryManager.d.ts +0 -21
  40. package/testing/core/mocking/mockQueryManager.js +0 -19
  41. package/testing/core/mocking/mockQueryManager.js.map +0 -1
  42. package/testing/core/mocking/mockWatchQuery.d.ts +0 -5
  43. package/testing/core/mocking/mockWatchQuery.js +0 -15
  44. package/testing/core/mocking/mockWatchQuery.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @apollo/client
2
2
 
3
+ ## 3.12.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [#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.
8
+
9
+ - [#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.
10
+
11
+ ```js
12
+ const retryLink = new RetryLink({
13
+ attempts: (count, operation, error) => {
14
+ if (error instanceof ApolloError) {
15
+ // errors available on the `protocolErrors` field in `ApolloError`
16
+ console.log(error.protocolErrors);
17
+ }
18
+
19
+ return true;
20
+ },
21
+ });
22
+ ```
23
+
3
24
  ## 3.12.8
4
25
 
5
26
  ### 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.8";
34
+ var version = "3.12.9";
35
35
 
36
36
  function maybe(thunk) {
37
37
  try {