We'd like to be able to declare directives on directive definitions.
We have tooling that uses type system directives to perform special processing on a schema, and we'd like users of that tooling to be able to define their own directives, with metadata indicating to the tooling that this directive is for its use. For example, if we could define directive @Handler(class:String!) on DIRECTIVE_DEFINITION then our users could define directive @CustomDirective(...) on FIELD_DEFINITION @Handler(class:"Foo") telling our tooling that their directive is meant to be handled by it, passing arguments we declare to our tooling, and still providing whatever arguments they declare to their own hooks.
That directives can't be declared on directive definitions seems like an oversight.
We'd like to be able to declare directives on directive definitions.
We have tooling that uses type system directives to perform special processing on a schema, and we'd like users of that tooling to be able to define their own directives, with metadata indicating to the tooling that this directive is for its use. For example, if we could define
directive @Handler(class:String!) on DIRECTIVE_DEFINITIONthen our users could definedirective @CustomDirective(...) on FIELD_DEFINITION @Handler(class:"Foo")telling our tooling that their directive is meant to be handled by it, passing arguments we declare to our tooling, and still providing whatever arguments they declare to their own hooks.That directives can't be declared on directive definitions seems like an oversight.