@apollo/client 3.13.2 → 3.13.3

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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @apollo/client
2
2
 
3
+ ## 3.13.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#12362](https://github.com/apollographql/apollo-client/pull/12362) [`f6d387c`](https://github.com/apollographql/apollo-client/commit/f6d387c166cc76f08135966fb6d74fd8fe808c21) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fixes an issue where calling `observableQuery.getCurrentResult()` when the `errorPolicy` was set to `all` would return the `networkStatus` as `NetworkStatus.ready` when there were errors returned in the result. This has been corrected to report `NetworkStatus.error`.
8
+
9
+ This bug also affected the `useQuery` and `useLazyQuery` hooks and may affect you if you check for `networkStatus` in your component.
10
+
3
11
  ## 3.13.2
4
12
 
5
13
  ### Patch Changes
package/apollo-client.cjs CHANGED
@@ -32,7 +32,7 @@ var equal__default = /*#__PURE__*/_interopDefaultLegacy(equal);
32
32
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
33
33
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
34
34
 
35
- var version = "3.13.2";
35
+ var version = "3.13.3";
36
36
 
37
37
  function maybe(thunk) {
38
38
  try {
@@ -5286,6 +5286,10 @@ var ObservableQuery = (function (_super) {
5286
5286
  else {
5287
5287
  result.partial = true;
5288
5288
  }
5289
+ if (result.networkStatus === exports.NetworkStatus.ready &&
5290
+ (result.error || result.errors)) {
5291
+ result.networkStatus = exports.NetworkStatus.error;
5292
+ }
5289
5293
  if (globalThis.__DEV__ !== false &&
5290
5294
  !diff.complete &&
5291
5295
  !this.options.partialRefetch &&