Package graphql.execution.directives
Class QueryAppliedDirectiveArgument
java.lang.Object
graphql.execution.directives.QueryAppliedDirectiveArgument
This represents the argument values that can be placed on an
QueryAppliedDirective
.
You can think of them as 'instances' of GraphQLArgument
, when applied to a directive on a query element
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Argument
private final String
private final GraphQLInputType
private final InputValueWithState
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
QueryAppliedDirectiveArgument
(String name, InputValueWithState value, GraphQLInputType type, Argument definition) -
Method Summary
Modifier and TypeMethodDescription@NotNull InputValueWithState
@Nullable Argument
@Nullable String
This will always be null.@NotNull String
getName()
@NotNull GraphQLInputType
getType()
<T> T
getValue()
This swill give out an internal java value based on the semantics captured in theInputValueWithState
fromgetArgumentValue()
Note : You MUST only call this on aQueryAppliedDirectiveArgument
that is part of a fully formed schema.boolean
newArgument
(QueryAppliedDirectiveArgument existing) toString()
transform
(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.
-
Field Details
-
name
-
value
-
originalType
-
definition
-
-
Constructor Details
-
QueryAppliedDirectiveArgument
private QueryAppliedDirectiveArgument(String name, InputValueWithState value, GraphQLInputType type, Argument definition)
-
-
Method Details
-
getName
-
getType
-
hasSetValue
public boolean hasSetValue() -
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 theInputValueWithState
fromgetArgumentValue()
Note : You MUST only call this on aQueryAppliedDirectiveArgument
that 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
This will always be null. Applied arguments have no description- Returns:
- always null
-
getDefinition
-
transform
public QueryAppliedDirectiveArgument transform(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
-
newArgument
public static QueryAppliedDirectiveArgument.Builder newArgument(QueryAppliedDirectiveArgument existing) -
toString
-