Skip to content

Commit 6ca879d

Browse files
authored
chore: update auth directives documentation (#3330)
Adds `<Caution>` admonition on `@authenticated`, @requiresScopes` and `@policy` directives to notify users that those directives can no longer be applied on interfaces and interface fields.
1 parent 8aee9f7 commit 6ca879d

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

docs/source/schema-design/federated-schemas/reference/directives.mdx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,11 @@ To learn more, see the [Incremental migration with `@override`](/graphos/schema-
441441

442442
<LicensedDirective />
443443

444+
<Caution>
445+
446+
Federation v2.9 and above doesn't allow `@authenticated` on interfaces. Applying `@authenticated` to an interface or interface field results in a composition error.
447+
448+
</Caution>
444449

445450
```graphql
446451
directive @authenticated on
@@ -459,6 +464,12 @@ Indicates to composition that the target element is accessible only to the authe
459464

460465
<LicensedDirective />
461466

467+
<Caution>
468+
469+
Federation v2.9 and above doesn't allow `@requiresScopes` on interfaces. Applying `@requiresScopes` to an interface or interface field results in a composition error.
470+
471+
</Caution>
472+
462473
```graphql
463474
directive @requiresScopes(scopes: [[federation__Scope!]!]!) on
464475
FIELD_DEFINITION
@@ -506,6 +517,12 @@ Indicates to composition that the target element is accessible only to the authe
506517

507518
<LicensedDirective />
508519

520+
<Caution>
521+
522+
Federation v2.9 and above doesn't allow `@policy` on interfaces. Applying `@policy` to an interface or interface field results in a composition error.
523+
524+
</Caution>
525+
509526
```graphql
510527
directive @policy(policies: [[federation__Policy!]!]!) on
511528
| FIELD_DEFINITION

0 commit comments

Comments
 (0)