RFC 1 / Proposal

Add support for directives on directives

Opened on2021-12-02
Closed on2025-12-18

At a glance

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