Class QueryAppliedDirectiveArgument

java.lang.Object
graphql.execution.directives.QueryAppliedDirectiveArgument

@PublicApi public class QueryAppliedDirectiveArgument extends Object
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

  • Method Details

    • getName

      public @NonNull String getName()
    • getType

      public @NonNull GraphQLInputType getType()
    • hasSetValue

      public boolean hasSetValue()
    • getArgumentValue

      public @NonNull InputValueWithState 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 the InputValueWithState from getArgumentValue() Note : You MUST only call this on a QueryAppliedDirectiveArgument 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 use getArgumentValue() and use the InputValueWithState.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

      public @Nullable String getDescription()
      This will always be null. Applied arguments have no description
      Returns:
      always null
    • getDefinition

      public @Nullable Argument getDefinition()
    • transform

      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

    • toString

      public String toString()
      Overrides:
      toString in class Object