Package graphql.execution.directives
Class QueryAppliedDirectiveArgument
- java.lang.Object
-
- graphql.execution.directives.QueryAppliedDirectiveArgument
-
@PublicApi public class QueryAppliedDirectiveArgument extends java.lang.Object
This represents the argument values that can be placed on anQueryAppliedDirective.You can think of them as 'instances' of
GraphQLArgument, when applied to a directive on a query element
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classQueryAppliedDirectiveArgument.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull InputValueWithStategetArgumentValue()@Nullable ArgumentgetDefinition()@Nullable java.lang.StringgetDescription()This will always be null.@NotNull java.lang.StringgetName()@NotNull GraphQLInputTypegetType()<T> TgetValue()This swill give out an internal java value based on the semantics captured in theInputValueWithStatefromgetArgumentValue()Note : You MUST only call this on aQueryAppliedDirectiveArgumentthat is part of a fully formed schema.booleanhasSetValue()static QueryAppliedDirectiveArgument.BuildernewArgument()static QueryAppliedDirectiveArgument.BuildernewArgument(QueryAppliedDirectiveArgument existing)java.lang.StringtoString()QueryAppliedDirectiveArgumenttransform(java.util.function.Consumer<QueryAppliedDirectiveArgument.Builder> builderConsumer)This helps you transform the current GraphQLArgument into another one by starting a builder with all the current values and allows you to transform it how you want.
-
-
-
Method Detail
-
getName
@NotNull public @NotNull java.lang.String getName()
-
getType
@NotNull public @NotNull GraphQLInputType getType()
-
hasSetValue
public boolean hasSetValue()
-
getArgumentValue
@NotNull public @NotNull InputValueWithState getArgumentValue()
- Returns:
- an input value with state for an applied directive argument
-
getValue
@Nullable public <T> T getValue()
This swill give out an internal java value based on the semantics captured in theInputValueWithStatefromgetArgumentValue()Note : You MUST only call this on aQueryAppliedDirectiveArgumentthat is part of a fully formed schema. We need all the types to be resolved in order for this work correctly. Note: This method will return null if the value is not set or explicitly set to null. If you want to know the difference when "not set" and "set to null" then you can't use this method. Rather you should usegetArgumentValue()and use theInputValueWithState.isNotSet()methods to decide how to handle those values.- Type Parameters:
T- the type you want it cast as- Returns:
- a value of type T which is the java value of the argument
-
getDescription
@Nullable public @Nullable java.lang.String getDescription()
This will always be null. Applied arguments have no description- Returns:
- always null
-
getDefinition
@Nullable public @Nullable Argument getDefinition()
-
transform
public QueryAppliedDirectiveArgument transform(java.util.function.Consumer<QueryAppliedDirectiveArgument.Builder> builderConsumer)
This helps you transform the current GraphQLArgument 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
-
newArgument
public static QueryAppliedDirectiveArgument.Builder newArgument()
-
newArgument
public static QueryAppliedDirectiveArgument.Builder newArgument(QueryAppliedDirectiveArgument existing)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-