RFC 1 / Proposal

Add support for directives on directive definitions

Opened on2021-12-02
Updated on2026-01-15

At a glance

Spec PR description

Adds the ability to apply directives to directive definitions and to deprecate directives, with this syntax:

directive @onDirective on DIRECTIVE_DEFINITION

directive @foo @onDirective on OBJECT

directive @baz @deprecated(reason: "...") on OBJECT

extend directive @quux @deprecated(reason: "...")

With @IvanGoncharov's blessing, this PR is a continuation and updated version of #907 which I think can be closed. (There's also prior art in #567).

Motivation

Allow applying directive-exclusive features (e.g. @specifyBy, @deprecated) on directives.

For instance, on Apollo Kotlin we'd like to deprecate some client side directives.

Timeline