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
The name of the directive will be taken from the ``@GraphQLName`` annotation (if not specified, the name will be the class's name).
343
+
The description of the directive will be taken from the ``@GraphQLDescription`` annotation's value.
344
+
The valid locations of the directive (locations which the directive can be applied on) will be taken from ``@DirectiveLocations``.
345
+
The arguments of the directive will be taken from the fields defined in the class - notice that you can only use primitive types as arguments of a directive.
346
+
For example, we defined an ``isActive`` field - which is boolean, and its default value is true. That's how the argument of the directive will be defined.
347
+
You can also use ``@GraphQLName`` and ``@GraphQLDescription`` annotations on the field.
348
+
349
+
After you created the class, you will be able to create the ``GraphQLDirective`` object using the following code:
We now wired the field "name" - so it will turn upper case when calling the field.
384
+
The ``Directive`` annotations requires the name of the directive, the wiring class (the ``UpperWiring`` class defined earlier), and the values of the arguments. If an argument has a default value, you don't have to supply a value in the arguments values.
0 commit comments