Skip to content

Commit

Permalink
docs: add version notes to updated directives (#3013)
Browse files Browse the repository at this point in the history
Clarifies if a Federation directive definitions were changed at a
certain version.
  • Loading branch information
Meschreiber authored May 22, 2024
1 parent dbeae3d commit b48e856
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
10 changes: 8 additions & 2 deletions docs/source/federated-types/federated-directives.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,15 @@ In Federation 1, every subgraph must extend the `Query` and `Mutation` types (if
</MinVersion>

```graphql
directive @shareable on FIELD_DEFINITION | OBJECT
directive @shareable repeatable on FIELD_DEFINITION | OBJECT
```

<Note>

`@shareable` is only `repeatable` in [v2.2](../federation-versions#v22) and later.

</Note>

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}
Expand Down Expand Up @@ -761,7 +767,7 @@ Examples:
</MinVersion>

```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.
Expand Down
28 changes: 14 additions & 14 deletions docs/source/federation-versions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Minimum router version
<table>
<thead>
<tr>
<th>Topic</th>
<th style={{ minWidth: 200 }}>Topic</th>
<th>Description</th>
</tr>
</thead>
Expand Down Expand Up @@ -129,7 +129,7 @@ Minimum router version
<table>
<thead>
<tr>
<th>Topic</th>
<th style={{ minWidth: 200 }}>Topic</th>
<th>Description</th>
</tr>
</thead>
Expand Down Expand Up @@ -166,7 +166,7 @@ directive @policy(policies: [[federation__Policy!]!]!) on
<table>
<thead>
<tr>
<th>Topic</th>
<th style={{ minWidth: 200 }}>Topic</th>
<th>Description</th>
</tr>
</thead>
Expand Down Expand Up @@ -226,7 +226,7 @@ Minimum router version
<table>
<thead>
<tr>
<th>Topic</th>
<th style={{ minWidth: 200 }}>Topic</th>
<th>Description</th>
</tr>
</thead>
Expand Down Expand Up @@ -286,7 +286,7 @@ directive @requiresScopes(scopes: [[federation__Scope!]!]!) on
<table>
<thead>
<tr>
<th>Topic</th>
<th style={{ minWidth: 200 }}>Topic</th>
<th>Description</th>
</tr>
</thead>
Expand Down Expand Up @@ -346,7 +346,7 @@ Minimum router version
<table>
<thead>
<tr>
<th>Topic</th>
<th style={{ minWidth: 200 }}>Topic</th>
<th>Description</th>
</tr>
</thead>
Expand Down Expand Up @@ -408,7 +408,7 @@ Minimum router version
<table>
<thead>
<tr>
<th>Name</th>
<th style={{ minWidth: 200 }}>Topic</th>
<th>Description</th>
</tr>
</thead>
Expand Down Expand Up @@ -488,7 +488,7 @@ Minimum router version
<table>
<thead>
<tr>
<th>Name</th>
<th style={{ minWidth: 200 }}>Topic</th>
<th>Description</th>
</tr>
</thead>
Expand Down Expand Up @@ -555,7 +555,7 @@ Minimum router version
<table>
<thead>
<tr>
<th>Name</th>
<th style={{ minWidth: 200 }}>Topic</th>
<th>Description</th>
</tr>
</thead>
Expand Down Expand Up @@ -657,7 +657,7 @@ For details on these directives as defined in Federation 2, see [Federation-spec
<table>
<thead>
<tr>
<th>Name</th>
<th style={{ minWidth: 200 }}>Topic</th>
<th>Description</th>
</tr>
</thead>
Expand Down Expand Up @@ -787,7 +787,7 @@ No changes.
<table>
<thead>
<tr>
<th>Topic</th>
<th style={{ minWidth: 200 }}>Topic</th>
<th>Description</th>
</tr>
</thead>
Expand Down Expand Up @@ -849,7 +849,7 @@ Value types
<table>
<thead>
<tr>
<th>Name</th>
<th style={{ minWidth: 200 }}>Topic</th>
<th>Description</th>
</tr>
</thead>
Expand Down Expand Up @@ -888,7 +888,7 @@ For details on these directives as defined in Federation 1, see the [Federation
<table>
<thead>
<tr>
<th>Name</th>
<th style={{ minWidth: 200 }}>Topic</th>
<th>Description</th>
</tr>
</thead>
Expand Down Expand Up @@ -987,7 +987,7 @@ directive @extends on OBJECT | INTERFACE
<table>
<thead>
<tr>
<th>Topic</th>
<th style={{ minWidth: 200 }}>Topic</th>
<th>Description</th>
</tr>
</thead>
Expand Down

0 comments on commit b48e856

Please sign in to comment.