@PublicApi public class QueryAppliedDirective extends java.lang.Object
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 http://graphql.org/learn/queries/#directives for more details on the concept.
Modifier and Type | Class and Description |
---|---|
static class |
QueryAppliedDirective.Builder |
Modifier and Type | Method and Description |
---|---|
@Nullable QueryAppliedDirectiveArgument |
getArgument(java.lang.String name) |
java.util.List<QueryAppliedDirectiveArgument> |
getArguments() |
@Nullable Directive |
getDefinition() |
@Nullable java.lang.String |
getDescription() |
@NotNull java.lang.String |
getName() |
static QueryAppliedDirective.Builder |
newDirective() |
static QueryAppliedDirective.Builder |
newDirective(QueryAppliedDirective existing) |
java.lang.String |
toString() |
QueryAppliedDirective |
transform(java.util.function.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.
|
@NotNull public @NotNull java.lang.String getName()
@Nullable public @Nullable java.lang.String getDescription()
public java.util.List<QueryAppliedDirectiveArgument> getArguments()
@Nullable public @Nullable QueryAppliedDirectiveArgument getArgument(java.lang.String name)
@Nullable public @Nullable Directive getDefinition()
public java.lang.String toString()
toString
in class java.lang.Object
public QueryAppliedDirective transform(java.util.function.Consumer<QueryAppliedDirective.Builder> builderConsumer)
builderConsumer
- the consumer code that will be given a builder to transformpublic static QueryAppliedDirective.Builder newDirective()
public static QueryAppliedDirective.Builder newDirective(QueryAppliedDirective existing)