Class QueryAppliedDirective


  • @PublicApi
    public class QueryAppliedDirective
    extends java.lang.Object
    An applied directive represents the instance of a directive that is applied to a query element such as a field or fragment.

    Originally graphql-java re-used the GraphQLDirective and GraphQLArgument classes to do both purposes. This was a modelling mistake. New QueryAppliedDirective and QueryAppliedDirectiveArgument classes have been introduced to better model when a directive is applied to a query element, as opposed to its schema definition itself.

    See http://graphql.org/learn/queries/#directives for more details on the concept.

    • Method Detail

      • getName

        @NotNull
        public @NotNull java.lang.String getName()
      • getDescription

        @Nullable
        public @Nullable java.lang.String getDescription()
      • getDefinition

        @Nullable
        public @Nullable Directive getDefinition()
      • toString

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

        public QueryAppliedDirective transform​(java.util.function.Consumer<QueryAppliedDirective.Builder> builderConsumer)
        This helps you transform the current GraphQLDirective 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