@apollo/client 4.2.3 → 4.2.4

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,11 @@
1
1
  # @apollo/client
2
2
 
3
+ ## 4.2.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#13281](https://github.com/apollographql/apollo-client/pull/13281) [`e4df809`](https://github.com/apollographql/apollo-client/commit/e4df809e87a1d2b72728df53327f531f65411ed3) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fixes an issue where `client.readFragment` and `client.readQuery` ignored the `optimistic` option when passed in the options object.
8
+
3
9
  ## 4.2.3
4
10
 
5
11
  ### Patch Changes
@@ -344,7 +344,7 @@ class ApolloClient {
344
344
  })));
345
345
  return Object.assign(mapped, { restart: observable.restart });
346
346
  }
347
- readQuery(options, optimistic = false) {
347
+ readQuery(options, optimistic = !!options.optimistic) {
348
348
  return this.cache.readQuery({ ...options, query: this.transform(options.query) }, optimistic);
349
349
  }
350
350
  watchFragment(options) {
@@ -369,7 +369,7 @@ class ApolloClient {
369
369
  }
370
370
  return observable;
371
371
  }
372
- readFragment(options, optimistic = false) {
372
+ readFragment(options, optimistic = !!options.optimistic) {
373
373
  return this.cache.readFragment({ ...options, fragment: this.transform(options.fragment) }, optimistic);
374
374
  }
375
375
  /**