@apollo/client 3.12.7 → 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 (54) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/apollo-client.cjs +3 -2
  3. package/apollo-client.cjs.map +1 -1
  4. package/apollo-client.min.cjs +1 -1
  5. package/cache/cache.cjs +2 -1
  6. package/cache/cache.cjs.map +1 -1
  7. package/cache/cache.cjs.native.js +2 -1
  8. package/cache/core/cache.js +4 -1
  9. package/cache/core/cache.js.map +1 -1
  10. package/core/core.cjs +1 -1
  11. package/core/core.cjs.map +1 -1
  12. package/core/core.cjs.native.js +1 -1
  13. package/dev/dev.cjs +1 -1
  14. package/dev/dev.cjs.map +1 -1
  15. package/dev/dev.cjs.native.js +1 -1
  16. package/errors/index.d.ts +2 -8
  17. package/errors/index.js.map +1 -1
  18. package/link/error/index.d.ts +2 -5
  19. package/link/error/index.js.map +1 -1
  20. package/link/retry/retry.cjs +13 -1
  21. package/link/retry/retry.cjs.map +1 -1
  22. package/link/retry/retry.cjs.native.js +13 -1
  23. package/link/retry/retryLink.js +15 -1
  24. package/link/retry/retryLink.js.map +1 -1
  25. package/package.json +2 -3
  26. package/react/internal/internal.cjs +1 -1
  27. package/react/internal/internal.cjs.map +1 -1
  28. package/react/internal/internal.cjs.native.js +1 -1
  29. package/testing/internal/ObservableStream.d.ts +3 -0
  30. package/testing/internal/ObservableStream.js +30 -1
  31. package/testing/internal/ObservableStream.js.map +1 -1
  32. package/testing/matchers/index.js +6 -0
  33. package/testing/matchers/index.js.map +1 -1
  34. package/testing/matchers/toEmitAnything.js +1 -1
  35. package/testing/matchers/toEmitAnything.js.map +1 -1
  36. package/testing/matchers/toEmitApolloQueryResult.d.ts +8 -0
  37. package/testing/matchers/toEmitApolloQueryResult.js +51 -0
  38. package/testing/matchers/toEmitApolloQueryResult.js.map +1 -0
  39. package/testing/matchers/toEmitFetchResult.d.ts +8 -0
  40. package/testing/matchers/toEmitFetchResult.js +51 -0
  41. package/testing/matchers/toEmitFetchResult.js.map +1 -0
  42. package/testing/matchers/toEqualFetchResult.d.ts +4 -0
  43. package/testing/matchers/toEqualFetchResult.js +20 -0
  44. package/testing/matchers/toEqualFetchResult.js.map +1 -0
  45. package/utilities/globals/globals.cjs +1 -1
  46. package/utilities/globals/globals.cjs.map +1 -1
  47. package/utilities/globals/globals.cjs.native.js +1 -1
  48. package/version.js +1 -1
  49. package/testing/core/mocking/mockQueryManager.d.ts +0 -21
  50. package/testing/core/mocking/mockQueryManager.js +0 -19
  51. package/testing/core/mocking/mockQueryManager.js.map +0 -1
  52. package/testing/core/mocking/mockWatchQuery.d.ts +0 -5
  53. package/testing/core/mocking/mockWatchQuery.js +0 -15
  54. 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.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
+
24
+ ## 3.12.8
25
+
26
+ ### Patch Changes
27
+
28
+ - [#12292](https://github.com/apollographql/apollo-client/pull/12292) [`3abd944`](https://github.com/apollographql/apollo-client/commit/3abd944e4adde5d94d91133f2bf6ed1c7744f8c5) Thanks [@phryneas](https://github.com/phryneas)! - Remove unused dependency `response-iterator`
29
+
30
+ - [#12287](https://github.com/apollographql/apollo-client/pull/12287) [`bf313a3`](https://github.com/apollographql/apollo-client/commit/bf313a39d342a73dc3e9b3db9415c71c2573db3f) Thanks [@phryneas](https://github.com/phryneas)! - Fixes an issue where `client.watchFragment`/`useFragment` with `@includes` crashes when a separate cache update writes to the conditionally included fields.
31
+
3
32
  ## 3.12.7
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.7";
34
+ var version = "3.12.9";
35
35
 
36
36
  function maybe(thunk) {
37
37
  try {
@@ -2782,7 +2782,8 @@ var ApolloCache = (function () {
2782
2782
  : diff.result;
2783
2783
  if (
2784
2784
  latestDiff &&
2785
- equalByQuery(query, { data: latestDiff === null || latestDiff === void 0 ? void 0 : latestDiff.result }, { data: data })) {
2785
+ equalByQuery(query, { data: latestDiff.result }, { data: data },
2786
+ options.variables)) {
2786
2787
  return;
2787
2788
  }
2788
2789
  var result = {