@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 +41 -0
- package/README.md +0 -3
- package/apollo-client.cjs +1 -1
- package/apollo-client.cjs.map +1 -1
- package/apollo-client.min.cjs +1 -1
- package/core/ObservableQuery.d.ts +1 -1
- package/core/core.cjs +1 -1
- package/core/core.cjs.map +1 -1
- package/core/core.cjs.native.js +1 -1
- package/dev/dev.cjs +1 -1
- package/dev/dev.cjs.map +1 -1
- package/dev/dev.cjs.native.js +1 -1
- package/masking/__benches__/types.bench.js +28 -0
- package/masking/__benches__/types.bench.js.map +1 -1
- package/masking/types.d.ts +6 -4
- package/masking/types.js.map +1 -1
- package/package.json +1 -1
- package/react/hooks/useQuery.d.ts +1 -1
- package/react/hooks/useSubscription.d.ts +1 -2
- package/react/internal/cache/QueryReference.d.ts +2 -2
- package/react/internal/internal.cjs +1 -1
- package/react/internal/internal.cjs.map +1 -1
- package/react/internal/internal.cjs.native.js +1 -1
- package/utilities/globals/globals.cjs +1 -1
- package/utilities/globals/globals.cjs.map +1 -1
- package/utilities/globals/globals.cjs.native.js +1 -1
- package/version.js +1 -1
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