You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Document graphql_name configuration for custom directives.
This wasn't documented and I had to dig into the source code to find it.
I tried to follow the style of the rest of the documentation, but feel free to edit however best reflects what you would want.
graphql_name "directive_name"# string, not symbol!
42
43
description "A nice runtime customization"
43
44
end
44
45
```
@@ -54,6 +55,16 @@ class MySchema < GraphQL::Schema
54
55
end
55
56
```
56
57
58
+
And you can reference them in the query with `@directive_name(...)`:
59
+
60
+
```ruby
61
+
query {
62
+
field @directive_name {
63
+
id
64
+
}
65
+
}
66
+
```
67
+
57
68
{{ "GraphQL::Schema::Directive::Feature" | api_doc }} and {{ "GraphQL::Schema::Directive::Transform" | api_doc }} are included in the library as examples.
0 commit comments