@apollo/client 3.12.0-rc.4 → 3.12.0

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.
Files changed (61) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/README.md +2 -0
  3. package/apollo-client.cjs +1 -1
  4. package/apollo-client.cjs.map +1 -1
  5. package/apollo-client.min.cjs +1 -1
  6. package/config/jest/setup.js +0 -2
  7. package/config/jest/setup.js.map +1 -1
  8. package/core/core.cjs +1 -1
  9. package/core/core.cjs.map +1 -1
  10. package/core/core.cjs.native.js +1 -1
  11. package/dev/dev.cjs +1 -1
  12. package/dev/dev.cjs.map +1 -1
  13. package/dev/dev.cjs.native.js +1 -1
  14. package/package.json +8 -7
  15. package/react/internal/internal.cjs +1 -1
  16. package/react/internal/internal.cjs.map +1 -1
  17. package/react/internal/internal.cjs.native.js +1 -1
  18. package/testing/internal/disposables/index.d.ts +0 -1
  19. package/testing/internal/disposables/index.js +0 -1
  20. package/testing/internal/disposables/index.js.map +1 -1
  21. package/testing/internal/index.d.ts +4 -1
  22. package/testing/internal/index.js +4 -1
  23. package/testing/internal/index.js.map +1 -1
  24. package/testing/internal/rtl/actAsync.d.ts +2 -0
  25. package/testing/internal/rtl/actAsync.js +21 -0
  26. package/testing/internal/rtl/actAsync.js.map +1 -0
  27. package/testing/internal/rtl/renderAsync.d.ts +9 -0
  28. package/testing/internal/rtl/renderAsync.js +23 -0
  29. package/testing/internal/rtl/renderAsync.js.map +1 -0
  30. package/testing/internal/rtl/renderHookAsync.d.ts +8 -0
  31. package/testing/internal/rtl/renderHookAsync.js +45 -0
  32. package/testing/internal/rtl/renderHookAsync.js.map +1 -0
  33. package/testing/internal/scenarios/index.d.ts +9 -0
  34. package/testing/internal/scenarios/index.js +9 -2
  35. package/testing/internal/scenarios/index.js.map +1 -1
  36. package/utilities/globals/globals.cjs +1 -1
  37. package/utilities/globals/globals.cjs.map +1 -1
  38. package/utilities/globals/globals.cjs.native.js +1 -1
  39. package/version.js +1 -1
  40. package/.changeset/brown-readers-smash.md +0 -5
  41. package/.changeset/clean-turkeys-kick.md +0 -5
  42. package/.changeset/cold-apes-bow.md +0 -5
  43. package/.changeset/early-bobcats-eat.md +0 -5
  44. package/.changeset/flat-beans-knock.md +0 -15
  45. package/.changeset/gorgeous-zebras-confess.md +0 -5
  46. package/.changeset/happy-months-happen.md +0 -5
  47. package/.changeset/itchy-penguins-worry.md +0 -5
  48. package/.changeset/kind-toys-tie.md +0 -5
  49. package/.changeset/long-zoos-ring.md +0 -5
  50. package/.changeset/mean-bottles-travel.md +0 -5
  51. package/.changeset/nasty-camels-pay.md +0 -36
  52. package/.changeset/nervous-owls-hear.md +0 -5
  53. package/.changeset/nice-countries-share.md +0 -5
  54. package/.changeset/perfect-jobs-flow.md +0 -5
  55. package/.changeset/pre.json +0 -27
  56. package/.changeset/slimy-points-end.md +0 -5
  57. package/.changeset/small-bears-confess.md +0 -5
  58. package/.changeset/wicked-pans-appear.md +0 -5
  59. package/testing/internal/disposables/disableActWarnings.d.ts +0 -9
  60. package/testing/internal/disposables/disableActWarnings.js +0 -15
  61. package/testing/internal/disposables/disableActWarnings.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,65 @@
1
1
  # @apollo/client
2
2
 
3
+ ## 3.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ #### Data masking 🎭
8
+
9
+ - [#12042](https://github.com/apollographql/apollo-client/pull/12042) [`1c0ecbf`](https://github.com/apollographql/apollo-client/commit/1c0ecbf3c0454056853dd3dcb493dfd5fa1a96b1) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Introduces data masking in Apollo Client.
10
+
11
+ Data masking enforces that only the fields requested by the query or fragment is available to that component. Data masking is best paired with [colocated fragments](https://www.apollographql.com/docs/react/data/fragments#colocating-fragments).
12
+
13
+ To enable data masking in Apollo Client, set the `dataMasking` option to `true`.
14
+
15
+ ```ts
16
+ new ApolloClient({
17
+ dataMasking: true,
18
+ // ... other options
19
+ });
20
+ ```
21
+
22
+ For detailed information on data masking, including how to incrementally adopt it in an existing applications, see the [data masking documentation](https://www.apollographql.com/docs/react/data/fragments#data-masking).
23
+
24
+ - [#12131](https://github.com/apollographql/apollo-client/pull/12131) [`21c3f08`](https://github.com/apollographql/apollo-client/commit/21c3f083013445707b7b50ae6390318bc568d0f5) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Allow `null` as a valid `from` value in `useFragment`.
25
+
26
+ <details open>
27
+ <summary><h3>More Patch Changes</h3></summary>
28
+
29
+ - [#12126](https://github.com/apollographql/apollo-client/pull/12126) [`d10d702`](https://github.com/apollographql/apollo-client/commit/d10d702ee9bd4d1d1dee2551821140f2c49d5c0c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Maintain the existing document if its unchanged by the codemod and move to more naive whitespace formatting
30
+
31
+ - [#12150](https://github.com/apollographql/apollo-client/pull/12150) [`9ed1e1e`](https://github.com/apollographql/apollo-client/commit/9ed1e1ef02b28445614fed4f5c141a289ac32d66) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix issue when using `Unmasked` with older versions of TypeScript when used with array fields.
32
+
33
+ - [#12116](https://github.com/apollographql/apollo-client/pull/12116) [`8ae6e4e`](https://github.com/apollographql/apollo-client/commit/8ae6e4e5cec296c3910fdffb0ce51a0f5f06c5d3) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Prevent field accessor warnings when using `@unmask(mode: "migrate")` on objects that are passed into `cache.identify`.
34
+
35
+ - [#12120](https://github.com/apollographql/apollo-client/pull/12120) [`6a98e76`](https://github.com/apollographql/apollo-client/commit/6a98e76af5c800a91a748c498611b55c33e02c68) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Provide a codemod that applies `@unmask` to all named fragments for all operations and fragments.
36
+
37
+ Learn how to use the codemod in the [incremental adoption documentation](https://www.apollographql.com/docs/react/data/fragments#incremental-adoption-in-an-existing-application).
38
+
39
+ - [#12134](https://github.com/apollographql/apollo-client/pull/12134) [`cfaf4ef`](https://github.com/apollographql/apollo-client/commit/cfaf4efc6dea56ae46a5b5199d8ed9414b0f17d8) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix issue where data went missing when an unmasked fragment in migrate mode selected fields that the parent did not.
40
+
41
+ - [#12154](https://github.com/apollographql/apollo-client/pull/12154) [`d933def`](https://github.com/apollographql/apollo-client/commit/d933def986d476cd64321059299ab15031297f04) Thanks [@phryneas](https://github.com/phryneas)! - Data masking types: handle overlapping nested array types and fragments on interface types.
42
+
43
+ - [#12139](https://github.com/apollographql/apollo-client/pull/12139) [`5a53e15`](https://github.com/apollographql/apollo-client/commit/5a53e15e713e5eb2ebc9216615ea1a845fad2685) Thanks [@phryneas](https://github.com/phryneas)! - Fix issue where masked data would sometimes get returned when the field was part of a child fragment from a fragment unmasked by the parent query.
44
+
45
+ - [#12123](https://github.com/apollographql/apollo-client/pull/12123) [`8422a30`](https://github.com/apollographql/apollo-client/commit/8422a305eff861fc8f953731e92c860f555bd99a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Warn when using data masking with "no-cache" operations.
46
+
47
+ - [#12139](https://github.com/apollographql/apollo-client/pull/12139) [`5a53e15`](https://github.com/apollographql/apollo-client/commit/5a53e15e713e5eb2ebc9216615ea1a845fad2685) Thanks [@phryneas](https://github.com/phryneas)! - Fix issue where the warning emitted by `@unmask(mode: "migrate")` would trigger unnecessarily when the fragment was used alongside a masked fragment inside an inline fragment.
48
+
49
+ - [#12114](https://github.com/apollographql/apollo-client/pull/12114) [`1d4ce00`](https://github.com/apollographql/apollo-client/commit/1d4ce0034395147445165022f7d23f42ff638d8a) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix error when combining `@unmask` and `@defer` directives on a fragment spread when data masking is enabled.
50
+
51
+ - [#12130](https://github.com/apollographql/apollo-client/pull/12130) [`1e7d009`](https://github.com/apollographql/apollo-client/commit/1e7d009e4a52949dab0065f3219dfe148837531e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix error thrown when applying unmask migrate mode warnings on interface types with selection sets that contain inline fragment conditions.
52
+
53
+ - [#12152](https://github.com/apollographql/apollo-client/pull/12152) [`78137ec`](https://github.com/apollographql/apollo-client/commit/78137eccba90b80dd29bd8e1423b49ebe51ef8df) Thanks [@phryneas](https://github.com/phryneas)! - Add a helper that will skip the TS unmasking alorithm when no fragments are present on type level
54
+
55
+ - [#12126](https://github.com/apollographql/apollo-client/pull/12126) [`d10d702`](https://github.com/apollographql/apollo-client/commit/d10d702ee9bd4d1d1dee2551821140f2c49d5c0c) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure documents unchanged by the codemod are left untouched.
56
+
57
+ - [#12133](https://github.com/apollographql/apollo-client/pull/12133) [`a6ece37`](https://github.com/apollographql/apollo-client/commit/a6ece375119ce12c19749471c55b0059843a7217) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Ensure `null` is retained in nullable types when unmasking a type with the `Unmasked` helper type.
58
+
59
+ - [#12139](https://github.com/apollographql/apollo-client/pull/12139) [`5a53e15`](https://github.com/apollographql/apollo-client/commit/5a53e15e713e5eb2ebc9216615ea1a845fad2685) Thanks [@phryneas](https://github.com/phryneas)! - Fix issue that threw errors when masking partial data with `@unmask(mode: "migrate")`.
60
+
61
+ </details>
62
+
3
63
  ## 3.12.0-rc.4
4
64
 
5
65
  ### Patch Changes
package/README.md CHANGED
@@ -18,6 +18,8 @@ Join 1000+ engineers at GraphQL Summit for talks, workshops, and office hours, O
18
18
 
19
19
  Apollo Client is a fully-featured caching GraphQL client with integrations for React, Angular, and more. It allows you to easily build UI components that fetch data via GraphQL.
20
20
 
21
+ Apollo Client aims to comply with the [Working Draft of the GraphQL specification](https://spec.graphql.org/draft/).
22
+
21
23
  | ☑️ Apollo Client User Survey |
22
24
  | :----- |
23
25
  | What do you like best about Apollo Client? What needs to be improved? Please tell us by taking a [one-minute survey](https://docs.google.com/forms/d/e/1FAIpQLSczNDXfJne3ZUOXjk9Ursm9JYvhTh1_nFTDfdq3XBAFWCzplQ/viewform?usp=pp_url&entry.1170701325=Apollo+Client&entry.204965213=Readme). Your responses will help us understand Apollo Client usage and allow us to serve you better. |
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.0-rc.4";
34
+ var version = "3.12.0";
35
35
 
36
36
  function maybe(thunk) {
37
37
  try {