From 4e25e6d4f3a3aac9a1cfaae78d2775e9d050ce7a Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Fri, 17 Jan 2025 09:47:00 +0100 Subject: [PATCH] Remove `@policy`, `@requiresScopes`, `@authenticated` when producing public schema (#78) --- .changeset/a-b-c.md | 5 +++++ src/graphql/transform-supergraph-to-public-schema.ts | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 .changeset/a-b-c.md diff --git a/.changeset/a-b-c.md b/.changeset/a-b-c.md new file mode 100644 index 0000000..55e4f39 --- /dev/null +++ b/.changeset/a-b-c.md @@ -0,0 +1,5 @@ +--- +"@theguild/federation-composition": patch +--- + +`transformSupergraphToPublicSchema` removes now `@policy`, `@requiresScopes` and `@authenticated` diff --git a/src/graphql/transform-supergraph-to-public-schema.ts b/src/graphql/transform-supergraph-to-public-schema.ts index 1626cef..fe554ee 100644 --- a/src/graphql/transform-supergraph-to-public-schema.ts +++ b/src/graphql/transform-supergraph-to-public-schema.ts @@ -31,6 +31,9 @@ export const federationDirectives = new Set([ 'join__enumValue', 'join__field', 'inaccessible', + 'authenticated', + 'policy', + 'requiresScopes', ]); const specifiedDirectives = new Set(specifiedDirectivesArray.map(d => d.name));