Package graphql.execution.directives
Class QueryAppliedDirective
java.lang.Object
graphql.execution.directives.QueryAppliedDirective
An applied directive represents the instance of a directive that is applied to a query element such as a field or fragment.
Originally graphql-java re-used the GraphQLDirective
and GraphQLArgument
classes to do both purposes. This was a modelling mistake. New QueryAppliedDirective
and QueryAppliedDirectiveArgument
classes have been introduced to better model when a directive is applied to a query element,
as opposed to its schema definition itself.
See https://graphql.org/learn/queries/#directives for more details on the concept.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescription@Nullable QueryAppliedDirectiveArgument
getArgument
(String name) @Nullable Directive
@Nullable String
@NonNull String
getName()
newDirective
(QueryAppliedDirective existing) toString()
transform
(Consumer<QueryAppliedDirective.Builder> builderConsumer) This helps you transform the current GraphQLDirective into another one by starting a builder with all the current values and allows you to transform it how you want.
-
Method Details
-
getName
-
getDescription
-
getArguments
-
getArgument
-
getDefinition
-
toString
-
transform
This helps you transform the current GraphQLDirective into another one by starting a builder with all the current values and allows you to transform it how you want.- Parameters:
builderConsumer
- the consumer code that will be given a builder to transform- Returns:
- a new field based on calling build on that builder
-
newDirective
-
newDirective
-