At a glance
- Identifier: #907
- Stage: RFC 1 / Proposal
- Champion: @IvanGoncharov
- Latest activity: Added to WG agenda on 2022-01-06
- Spec PR: https://github.com/graphql/graphql-spec/pull/907
Spec PR description
I suggest allowing to specify directives on directives with the following syntax:
directive @foo on DIRECTIVE_DEFINITION
directive @bar on FIELD @foo
Motivation
Allow applying directive-exclusive features (e.g. @specifyBy, @deprecate) on directives.
Validation
We already have a rule in place that prevent cycles in directives
A directive definition must not contain the use of a directive that references itself indirectly by referencing a Type or Directive which transitively includes a reference to this directive.
https://spec.graphql.org/draft/#sel-HAHnBTDDABAB_F_kC
So validation is already in place and already paid "complexity cost".
Timeline
- Added to WG agenda on 2022-01-06
- Mentioned in WG notes on 2022-01-06
- Spec PR created on 2021-12-02 by IvanGoncharov
- Commit pushed on 2021-12-02 by IvanGoncharov: Add support for directives on directives
- Added to WG agenda on 2021-12-02