Closed myronmarston closed 3 years ago
a plan
There's not exactly a plan, but I'm hoping to improve directive support in 1.12. I've added this issue to the tracking issue! I agree it'd be a nice improvement.
I recently released 1.12.0 which includes a "schema directives" system, please give it a try and open a new issue if you run into any trouble with it!
https://graphql-ruby.org/type_definitions/directives.html#schema-directives
We've been using directives pretty heavily in our SDL files. Unfortunately, graphql-ruby seems to gladly accept any typo in any directive name or in any directive arg, because it does not seem to support a way to define directives. The GraphQL schema has examples for this, such as:
This defines
@example
as a directive, which is only valid on fields. Many other GraphQL implementations use these to reject any undefined directives, or directives defined on the wrong element type, etc.Is there a plan to add support for this to graphql-ruby at some point?