From b48e856e00aa5d1c2c4afdf683a19e77357d0750 Mon Sep 17 00:00:00 2001 From: Maria Elisabeth Schreiber Date: Wed, 22 May 2024 08:01:57 -0600 Subject: [PATCH] docs: add version notes to updated directives (#3013) Clarifies if a Federation directive definitions were changed at a certain version. --- .../federated-types/federated-directives.mdx | 10 +++++-- docs/source/federation-versions.mdx | 28 +++++++++---------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/docs/source/federated-types/federated-directives.mdx b/docs/source/federated-types/federated-directives.mdx index ed697b3e2..fdd326396 100644 --- a/docs/source/federated-types/federated-directives.mdx +++ b/docs/source/federated-types/federated-directives.mdx @@ -248,9 +248,15 @@ In Federation 1, every subgraph must extend the `Query` and `Mutation` types (if ```graphql -directive @shareable on FIELD_DEFINITION | OBJECT +directive @shareable repeatable on FIELD_DEFINITION | OBJECT ``` + + +`@shareable` is only `repeatable` in [v2.2](../federation-versions#v22) and later. + + + Indicates that an object type's field is allowed to be resolved by multiple subgraphs (by default in Federation 2, object fields can be resolved by only one subgraph). ```graphql {2-3} @@ -761,7 +767,7 @@ Examples: ```graphql -directive @tag(name: String!) repeatable on FIELD_DEFINITION | INTERFACE | OBJECT | UNION | ARGUMENT_DEFINITION | SCALAR | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION +directive @tag(name: String!) repeatable on FIELD_DEFINITION | INTERFACE | OBJECT | UNION | ARGUMENT_DEFINITION | SCALAR | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION | SCHEMA ``` Applies arbitrary string metadata to a schema location. Custom tooling can use this metadata during any step of the schema delivery flow, including composition, static analysis, and documentation. The GraphOS Enterprise [contracts feature](/graphos/delivery/contracts/) uses `@tag` with its inclusion and exclusion filters. diff --git a/docs/source/federation-versions.mdx b/docs/source/federation-versions.mdx index b04f80cd3..5463324ee 100644 --- a/docs/source/federation-versions.mdx +++ b/docs/source/federation-versions.mdx @@ -64,7 +64,7 @@ Minimum router version - + @@ -129,7 +129,7 @@ Minimum router version
TopicTopic Description
- + @@ -166,7 +166,7 @@ directive @policy(policies: [[federation__Policy!]!]!) on
TopicTopic Description
- + @@ -226,7 +226,7 @@ Minimum router version
TopicTopic Description
- + @@ -286,7 +286,7 @@ directive @requiresScopes(scopes: [[federation__Scope!]!]!) on
TopicTopic Description
- + @@ -346,7 +346,7 @@ Minimum router version
TopicTopic Description
- + @@ -408,7 +408,7 @@ Minimum router version
TopicTopic Description
- + @@ -488,7 +488,7 @@ Minimum router version
NameTopic Description
- + @@ -555,7 +555,7 @@ Minimum router version
NameTopic Description
- + @@ -657,7 +657,7 @@ For details on these directives as defined in Federation 2, see [Federation-spec
NameTopic Description
- + @@ -787,7 +787,7 @@ No changes.
NameTopic Description
- + @@ -849,7 +849,7 @@ Value types
TopicTopic Description
- + @@ -888,7 +888,7 @@ For details on these directives as defined in Federation 1, see the [Federation
NameTopic Description
- + @@ -987,7 +987,7 @@ directive @extends on OBJECT | INTERFACE
NameTopic Description
- +
TopicTopic Description