@apollo/client 3.12.4 → 3.12.5

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,46 @@
1
1
  # @apollo/client
2
2
 
3
+ ## 3.12.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [#12252](https://github.com/apollographql/apollo-client/pull/12252) [`cb9cd4e`](https://github.com/apollographql/apollo-client/commit/cb9cd4ea251aab225adf5e4e4f3f69e1bbacee52) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Changes the default behavior of the `MaybeMasked` type to preserve types unless otherwise specified. This change makes it easier to upgrade from older versions of the client where types could have unexpectedly changed in the application due to the default of trying to unwrap types into unmasked types. This change also fixes the compilation performance regression experienced when simply upgrading the client since types are now preserved by default.
8
+
9
+ A new `mode` option has now been introduced to allow for the old behavior. See the next section on migrating if you wish to maintain the old default behavior after upgrading to this version.
10
+
11
+ ### Migrating from <= v3.12.4
12
+
13
+ If you've adopted data masking and have opted in to using masked types by setting the `enabled` property to `true`, you can remove this configuration entirely:
14
+
15
+ ```diff
16
+ -declare module "@apollo/client" {
17
+ - interface DataMasking {
18
+ - mode: "unmask"
19
+ - }
20
+ -}
21
+ ```
22
+
23
+ If you prefer to specify the behavior explicitly, change the property from `enabled: true`, to `mode: "preserveTypes"`:
24
+
25
+ ```diff
26
+ declare module "@apollo/client" {
27
+ interface DataMasking {
28
+ - enabled: true
29
+ + mode: "preserveTypes"
30
+ }
31
+ }
32
+ ```
33
+
34
+ If you rely on the default behavior in 3.12.4 or below and would like to continue to use unmasked types by default, set the `mode` to `unmask`:
35
+
36
+ ```ts
37
+ declare module "@apollo/client" {
38
+ interface DataMasking {
39
+ mode: "unmask";
40
+ }
41
+ }
42
+ ```
43
+
3
44
  ## 3.12.4
4
45
 
5
46
  ### Patch Changes
package/README.md CHANGED
@@ -39,10 +39,7 @@ Learn how to use Apollo Client with self-paced hands-on training on Odyssey, Apo
39
39
 
40
40
  |Name|Username|
41
41
  |---|---|
42
- |Ben Newman|[@benjamn](https://github.com/benjamn)|
43
- |Alessia Bellisario|[@alessbell](https://github.com/alessbell)|
44
42
  |Jeff Auriemma|[@bignimbus](https://github.com/bignimbus)|
45
- |Hugh Willson|[@hwillson](https://github.com/hwillson)|
46
43
  |Jerel Miller|[@jerelmiller](https://github.com/jerelmiller)|
47
44
  |Lenz Weber-Tronic|[@phryneas](https://github.com/phryneas)|
48
45
 
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.4";
34
+ var version = "3.12.5";
35
35
 
36
36
  function maybe(thunk) {
37
37
  try {