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 -
Method Summary
Modifier and TypeMethodDescription@NonNull InputValueWithState
@Nullable Argument
@Nullable String
This will always be null.@NonNull String
getName()
@NonNull GraphQLInputType
getType()
<T> @Nullable 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.
-
Method Details
-
getName
-
getType
-
hasSetValue
public boolean hasSetValue() -
getArgumentValue
- Returns:
- an input value with state for an applied directive argument
-
getValue
public <T> @Nullable 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
-