Class QueryAppliedDirectiveArgument


  • @PublicApi
    public class QueryAppliedDirectiveArgument
    extends java.lang.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 Detail

      • getName

        @NotNull
        public @NotNull java.lang.String getName()
      • 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 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

        @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
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object