From c96c8f28e6361fd3ec54d334d00738f8a4fb72a2 Mon Sep 17 00:00:00 2001 From: Eddy Nguyen Date: Wed, 22 Jan 2025 22:53:06 +1100 Subject: [PATCH 1/2] Update fragment doc with Codegen Client Preset support --- docs/source/data/fragments.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/data/fragments.mdx b/docs/source/data/fragments.mdx index ee6ccd596f0..aabdceed714 100644 --- a/docs/source/data/fragments.mdx +++ b/docs/source/data/fragments.mdx @@ -1135,7 +1135,7 @@ const config: CodegenConfig = { ##### With the `client-preset` -Support for the `@unmask` directive was introduced with `@graphql-codegen/client-preset` [v4.5.1](https://github.com/dotansimha/graphql-code-generator/releases/tag/release-1732308151614) +Support for the `@unmask` directive was introduced with `@graphql-codegen/client-preset` [v4.6.0](https://github.com/dotansimha/graphql-code-generator/releases/tag/release-1732308151614) You can't use the `client-preset` [Fragment Masking](https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#fragment-masking) and Apollo Client's data masking features simultaneously. @@ -1157,11 +1157,11 @@ To migrate from CodeGen's fragment masking feature to Apollo Client's data maski // ... // disables the incompatible GraphQL Codegen fragment masking feature fragmentMasking: false, + }, + config: { customDirectives: { apolloUnmask: true } - }, - config: { inlineFragmentTypes: "mask", } } From fb9984625b1ddb8220ad9efdb5f2a08e278b9c1b Mon Sep 17 00:00:00 2001 From: Eddy Nguyen Date: Tue, 28 Jan 2025 23:04:11 +1100 Subject: [PATCH 2/2] Update release note link --- docs/source/data/fragments.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/data/fragments.mdx b/docs/source/data/fragments.mdx index aabdceed714..d8f4fdf4373 100644 --- a/docs/source/data/fragments.mdx +++ b/docs/source/data/fragments.mdx @@ -1135,7 +1135,7 @@ const config: CodegenConfig = { ##### With the `client-preset` -Support for the `@unmask` directive was introduced with `@graphql-codegen/client-preset` [v4.6.0](https://github.com/dotansimha/graphql-code-generator/releases/tag/release-1732308151614) +Support for the `@unmask` directive was introduced with `@graphql-codegen/client-preset` [v4.6.0](https://github.com/dotansimha/graphql-code-generator/releases/tag/release-1738065376043) You can't use the `client-preset` [Fragment Masking](https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#fragment-masking) and Apollo Client's data masking features simultaneously.