@apollo/client 4.2.0 → 4.2.2
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/__cjs/core/ObservableQuery.cjs +8 -0
- package/__cjs/core/ObservableQuery.cjs.map +1 -1
- package/__cjs/react/hooks/useLazyQuery.cjs +1 -0
- package/__cjs/react/hooks/useLazyQuery.cjs.map +1 -1
- package/__cjs/version.cjs +1 -1
- package/core/ObservableQuery.js +8 -0
- package/core/ObservableQuery.js.map +1 -1
- package/package.json +1 -1
- package/react/hooks/useLazyQuery.js +1 -0
- package/react/hooks/useLazyQuery.js.map +1 -1
- package/react/hooks-compiled/useLazyQuery.js +1 -0
- package/react/hooks-compiled/useLazyQuery.js.map +1 -1
- package/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @apollo/client
|
|
2
2
|
|
|
3
|
+
## 4.2.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#13184](https://github.com/apollographql/apollo-client/pull/13184) [`c207b88`](https://github.com/apollographql/apollo-client/commit/c207b886026114943dc7f5c85e997a1938e74cfe) Thanks [@audrius-savickas](https://github.com/audrius-savickas)! - Preserve referential equality of masked data on refetch when the result is deeply equal to the previous result.
|
|
8
|
+
|
|
9
|
+
## 4.2.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#13248](https://github.com/apollographql/apollo-client/pull/13248) [`062ffe3`](https://github.com/apollographql/apollo-client/commit/062ffe3ecfeda8630a4ad3ced40ce58193199b74) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fixes an issue where `useLazyQuery` would not apply a changed `pollInterval` between renders.
|
|
14
|
+
|
|
3
15
|
## 4.2.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -1326,6 +1326,14 @@ class ObservableQuery {
|
|
|
1326
1326
|
result.networkStatus = this.calculateNetworkStatus(result.networkStatus);
|
|
1327
1327
|
result.loading = (0, utilities_1.isNetworkRequestInFlight)(result.networkStatus);
|
|
1328
1328
|
result = this.maskResult(result);
|
|
1329
|
+
// Preserve referential equality of masked data when the new masked
|
|
1330
|
+
// result is deeply equal to the previous one. This prevents React hooks
|
|
1331
|
+
// like `useMemo` or `useEffect` from firing unnecessarily.
|
|
1332
|
+
if (previous.result.data !== undefined &&
|
|
1333
|
+
result.data !== previous.result.data &&
|
|
1334
|
+
(0, equality_1.equal)(result.data, previous.result.data)) {
|
|
1335
|
+
result.data = previous.result.data;
|
|
1336
|
+
}
|
|
1329
1337
|
return { query, variables, result, meta };
|
|
1330
1338
|
});
|
|
1331
1339
|
// Reobserve with fetchPolicy effectively set to "cache-first", triggering
|