@apollo/client 3.12.0-alpha.0 → 3.12.0-rc.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.
- package/.changeset/cold-apes-bow.md +5 -0
- package/.changeset/early-bobcats-eat.md +5 -0
- package/.changeset/flat-beans-knock.md +15 -0
- package/.changeset/kind-toys-tie.md +5 -0
- package/.changeset/nervous-owls-hear.md +5 -0
- package/.changeset/pre.json +7 -2
- package/CHANGELOG.md +34 -0
- package/apollo-client.cjs +133 -77
- package/apollo-client.cjs.map +1 -1
- package/apollo-client.min.cjs +1 -1
- package/cache/cache.cjs +30 -20
- package/cache/cache.cjs.map +1 -1
- package/cache/cache.cjs.native.js +30 -20
- package/cache/inmemory/policies.js +12 -9
- package/cache/inmemory/policies.js.map +1 -1
- package/config/jest/setup.js +5 -0
- package/config/jest/setup.js.map +1 -1
- package/core/ApolloClient.js +7 -3
- package/core/ApolloClient.js.map +1 -1
- package/core/ObservableQuery.js +2 -0
- package/core/ObservableQuery.js.map +1 -1
- package/core/QueryManager.d.ts +4 -1
- package/core/QueryManager.js +26 -2
- package/core/QueryManager.js.map +1 -1
- package/core/core.cjs +57 -20
- package/core/core.cjs.map +1 -1
- package/core/core.cjs.native.js +57 -20
- package/core/masking.d.ts +6 -0
- package/core/masking.js +33 -15
- package/core/masking.js.map +1 -1
- package/dev/dev.cjs +66 -62
- package/dev/dev.cjs.map +1 -1
- package/dev/dev.cjs.native.js +66 -62
- package/invariantErrorCodes.js +66 -61
- package/link/core/ApolloLink.js +2 -2
- package/link/core/core.cjs +2 -2
- package/link/core/core.cjs.map +1 -1
- package/link/core/core.cjs.native.js +2 -2
- package/link/http/checkFetcher.js +1 -1
- package/link/http/createHttpLink.js +1 -1
- package/link/http/http.cjs +3 -3
- package/link/http/http.cjs.map +1 -1
- package/link/http/http.cjs.native.js +3 -3
- package/link/http/serializeFetchParameter.js +1 -1
- package/link/persisted-queries/index.js +2 -2
- package/link/persisted-queries/index.js.map +1 -1
- package/link/persisted-queries/persisted-queries.cjs +2 -2
- package/link/persisted-queries/persisted-queries.cjs.map +1 -1
- package/link/persisted-queries/persisted-queries.cjs.native.js +2 -2
- package/link/utils/toPromise.js +1 -1
- package/link/utils/utils.cjs +2 -2
- package/link/utils/utils.cjs.map +1 -1
- package/link/utils/utils.cjs.native.js +2 -2
- package/link/utils/validateOperation.js +1 -1
- package/masking/types.d.ts +2 -2
- package/masking/types.js.map +1 -1
- package/package.json +4 -3
- package/react/context/ApolloConsumer.js +1 -1
- package/react/context/ApolloContext.js +1 -1
- package/react/context/ApolloProvider.js +1 -1
- package/react/context/context.cjs +3 -3
- package/react/context/context.cjs.map +1 -1
- package/react/context/context.cjs.native.js +3 -3
- package/react/hoc/hoc-utils.js +1 -1
- package/react/hoc/hoc.cjs +2 -2
- package/react/hoc/hoc.cjs.map +1 -1
- package/react/hoc/hoc.cjs.native.js +2 -2
- package/react/hoc/withApollo.js +1 -1
- package/react/hooks/hooks.cjs +9 -9
- package/react/hooks/hooks.cjs.map +1 -1
- package/react/hooks/hooks.cjs.native.js +9 -9
- package/react/hooks/useApolloClient.js +1 -1
- package/react/hooks/useLoadableQuery.js +2 -2
- package/react/hooks/useSubscription.js +3 -3
- package/react/hooks/useSuspenseQuery.js +2 -2
- package/react/hooks/useSyncExternalStore.js +1 -1
- package/react/internal/cache/QueryReference.js +2 -2
- package/react/internal/cache/QueryReference.js.map +1 -1
- package/react/internal/internal.cjs +3 -3
- package/react/internal/internal.cjs.map +1 -1
- package/react/internal/internal.cjs.native.js +3 -3
- package/react/parser/index.js +5 -5
- package/react/parser/parser.cjs +5 -5
- package/react/parser/parser.cjs.map +1 -1
- package/react/parser/parser.cjs.native.js +5 -5
- package/testing/core/core.cjs +2 -2
- package/testing/core/core.cjs.map +1 -1
- package/testing/core/core.cjs.native.js +2 -2
- package/testing/core/mocking/mockLink.js +2 -2
- package/testing/internal/ObservableStream.d.ts +11 -15
- package/testing/internal/ObservableStream.js +18 -62
- package/testing/internal/ObservableStream.js.map +1 -1
- package/testing/internal/index.d.ts +1 -2
- package/testing/internal/index.js +1 -2
- package/testing/internal/index.js.map +1 -1
- package/testing/internal/renderHelpers.d.ts +13 -2
- package/testing/internal/renderHelpers.js +20 -12
- package/testing/internal/renderHelpers.js.map +1 -1
- package/testing/matchers/index.js +0 -3
- package/testing/matchers/index.js.map +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/utilities/graphql/DocumentTransform.js +1 -1
- package/utilities/graphql/directives.js +7 -7
- package/utilities/graphql/fragments.d.ts +1 -0
- package/utilities/graphql/fragments.js +18 -3
- package/utilities/graphql/fragments.js.map +1 -1
- package/utilities/graphql/getFromAST.js +8 -8
- package/utilities/graphql/storeUtils.js +1 -1
- package/utilities/graphql/transform.js +8 -2
- package/utilities/graphql/transform.js.map +1 -1
- package/utilities/index.d.ts +1 -1
- package/utilities/index.js +1 -1
- package/utilities/index.js.map +1 -1
- package/utilities/utilities.cjs +41 -22
- package/utilities/utilities.cjs.map +1 -1
- package/utilities/utilities.cjs.native.js +41 -22
- package/version.js +1 -1
- package/testing/internal/profile/Render.d.ts +0 -69
- package/testing/internal/profile/Render.js +0 -144
- package/testing/internal/profile/Render.js.map +0 -1
- package/testing/internal/profile/context.d.ts +0 -10
- package/testing/internal/profile/context.js +0 -14
- package/testing/internal/profile/context.js.map +0 -1
- package/testing/internal/profile/index.d.ts +0 -4
- package/testing/internal/profile/index.js +0 -2
- package/testing/internal/profile/index.js.map +0 -1
- package/testing/internal/profile/profile.d.ts +0 -109
- package/testing/internal/profile/profile.js +0 -304
- package/testing/internal/profile/profile.js.map +0 -1
- package/testing/internal/profile/traces.d.ts +0 -7
- package/testing/internal/profile/traces.js +0 -30
- package/testing/internal/profile/traces.js.map +0 -1
- package/testing/matchers/ProfiledComponent.d.ts +0 -8
- package/testing/matchers/ProfiledComponent.js +0 -110
- package/testing/matchers/ProfiledComponent.js.map +0 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
"@apollo/client": patch
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Provide a codemod that applies `@unmask` to all named fragments for all operations and fragments. To use the codemod, run the following command:
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
npx jscodeshift -t node_modules/@apollo/client/scripts/codemods/data-masking/unmask.ts --extensions tsx --parser tsx path/to/app/
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
To customize the tag used to search for GraphQL operations, use the `--tag` option. By default the codemod looks for `gql` and `graphql` tags.
|
|
12
|
+
|
|
13
|
+
To apply the directive in migrate mode in order to receive runtime warnings on potentially masked fields, use the `--mode migrate` option.
|
|
14
|
+
|
|
15
|
+
For more information on the options that can be used with `jscodeshift`, check out the [`jscodeshift` documentation](https://github.com/facebook/jscodeshift).
|
package/.changeset/pre.json
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"mode": "pre",
|
|
3
|
-
"tag": "
|
|
3
|
+
"tag": "rc",
|
|
4
4
|
"initialVersions": {
|
|
5
5
|
"@apollo/client": "3.11.5"
|
|
6
6
|
},
|
|
7
7
|
"changesets": [
|
|
8
|
-
"
|
|
8
|
+
"cold-apes-bow",
|
|
9
|
+
"early-bobcats-eat",
|
|
10
|
+
"flat-beans-knock",
|
|
11
|
+
"kind-toys-tie",
|
|
12
|
+
"nasty-camels-pay",
|
|
13
|
+
"nervous-owls-hear"
|
|
9
14
|
]
|
|
10
15
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @apollo/client
|
|
2
2
|
|
|
3
|
+
## 3.12.0-rc.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#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`.
|
|
8
|
+
|
|
9
|
+
- [#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. To use the codemod, run the following command:
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
npx jscodeshift -t node_modules/@apollo/client/scripts/codemods/data-masking/unmask.ts --extensions tsx --parser tsx path/to/app/
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
To customize the tag used to search for GraphQL operations, use the `--tag` option. By default the codemod looks for `gql` and `graphql` tags.
|
|
16
|
+
|
|
17
|
+
To apply the directive in migrate mode in order to receive runtime warnings on potentially masked fields, use the `--mode migrate` option.
|
|
18
|
+
|
|
19
|
+
For more information on the options that can be used with `jscodeshift`, check out the [`jscodeshift` documentation](https://github.com/facebook/jscodeshift).
|
|
20
|
+
|
|
21
|
+
- [#12121](https://github.com/apollographql/apollo-client/pull/12121) [`1085a95`](https://github.com/apollographql/apollo-client/commit/1085a95e4430da35d19033613e73f315a0aede9e) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Warn when using data masking with "no-cache" operations.
|
|
22
|
+
|
|
23
|
+
- [#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.
|
|
24
|
+
|
|
3
25
|
## 3.12.0-alpha.0
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
|
@@ -37,6 +59,18 @@
|
|
|
37
59
|
}
|
|
38
60
|
```
|
|
39
61
|
|
|
62
|
+
## 3.11.10
|
|
63
|
+
|
|
64
|
+
### Patch Changes
|
|
65
|
+
|
|
66
|
+
- [#12093](https://github.com/apollographql/apollo-client/pull/12093) [`1765668`](https://github.com/apollographql/apollo-client/commit/1765668b7d495ef8a581f697bf9e4b7460455f13) Thanks [@mgmolisani](https://github.com/mgmolisani)! - Fixed a bug when evaluating the devtools flag with the new syntax `devtools.enabled` that could result to `true` when explicitly set to `false`.
|
|
67
|
+
|
|
68
|
+
## 3.11.9
|
|
69
|
+
|
|
70
|
+
### Patch Changes
|
|
71
|
+
|
|
72
|
+
- [#12110](https://github.com/apollographql/apollo-client/pull/12110) [`a3f95c6`](https://github.com/apollographql/apollo-client/commit/a3f95c6f7623060bbf68b418b0ab268fabc0c9b6) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix an issue where errors returned from a `fetchMore` call from a Suspense hook would cause a Suspense boundary to be shown indefinitely.
|
|
73
|
+
|
|
40
74
|
## 3.11.8
|
|
41
75
|
|
|
42
76
|
### Patch Changes
|