@apollo/client 4.1.0 → 4.1.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 CHANGED
@@ -1,5 +1,21 @@
1
1
  # @apollo/client
2
2
 
3
+ ## 4.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#13105](https://github.com/apollographql/apollo-client/pull/13105) [`8b62263`](https://github.com/apollographql/apollo-client/commit/8b62263e19b3442e20fea822de62074cf4f5cb22) Thanks [@phryneas](https://github.com/phryneas)! - `ssrMode`, `ssrForceFetchDelay` or `prioritizeCacheValues` should not override `fetchPolicy: 'cache-only'`, `fetchPolicy: 'no-cache'`, `fetchPolicy: 'standby'`, `skip: true`, or `skipToken` when reading the initial value of an `ObservableQuery`.
8
+
9
+ - [#13105](https://github.com/apollographql/apollo-client/pull/13105) [`8b62263`](https://github.com/apollographql/apollo-client/commit/8b62263e19b3442e20fea822de62074cf4f5cb22) Thanks [@phryneas](https://github.com/phryneas)! - Fix `skipToken` in `useQuery` with `prerenderStatic` and related SSR functions.
10
+
11
+ - [#13105](https://github.com/apollographql/apollo-client/pull/13105) [`8b62263`](https://github.com/apollographql/apollo-client/commit/8b62263e19b3442e20fea822de62074cf4f5cb22) Thanks [@phryneas](https://github.com/phryneas)! - Avoid fetches with `fetchPolicy: no-cache` in `useQuery` with `prerenderStatic` and related SSR functions.
12
+
13
+ ## 4.1.1
14
+
15
+ ### Patch Changes
16
+
17
+ - [#13103](https://github.com/apollographql/apollo-client/pull/13103) [`dee7dcf`](https://github.com/apollographql/apollo-client/commit/dee7dcff4d4baa26d623d1ecace60be88c684c1a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure `@client` fields that are children of aliased server fields are resolved correctly.
18
+
3
19
  ## 4.1.0
4
20
 
5
21
  ### Minor Changes
@@ -221,9 +221,11 @@ class ObservableQuery {
221
221
  });
222
222
  }
223
223
  getInitialResult(initialFetchPolicy) {
224
- const fetchPolicy = this.queryManager.prioritizeCacheValues ?
225
- "cache-first"
226
- : initialFetchPolicy || this.options.fetchPolicy;
224
+ let fetchPolicy = initialFetchPolicy || this.options.fetchPolicy;
225
+ if (this.queryManager.prioritizeCacheValues &&
226
+ (fetchPolicy === "network-only" || fetchPolicy === "cache-and-network")) {
227
+ fetchPolicy = "cache-first";
228
+ }
227
229
  const cacheResult = () => {
228
230
  const diff = this.getCacheDiff();
229
231
  // TODO: queryInfo.getDiff should handle this since cache.diff returns a