Class IncrementalPayload

  • Direct Known Subclasses:
    DeferPayload, StreamPayload

    @ExperimentalApi
    public abstract class IncrementalPayload
    extends java.lang.Object
    Represents a payload that can be resolved after the initial response.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected IncrementalPayload​(java.util.List<java.lang.Object> path, java.lang.String label, java.util.List<GraphQLError> errors, java.util.Map<java.lang.Object,​java.lang.Object> extensions)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.Object errorsToSpec​(java.util.List<GraphQLError> errors)  
      @Nullable java.util.List<GraphQLError> getErrors()  
      @Nullable java.util.Map<java.lang.Object,​java.lang.Object> getExtensions()  
      @Nullable java.lang.String getLabel()  
      java.util.List<java.lang.Object> getPath()  
      java.util.Map<java.lang.String,​java.lang.Object> toSpecification()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IncrementalPayload

        protected IncrementalPayload​(java.util.List<java.lang.Object> path,
                                     java.lang.String label,
                                     java.util.List<GraphQLError> errors,
                                     java.util.Map<java.lang.Object,​java.lang.Object> extensions)
    • Method Detail

      • getPath

        public java.util.List<java.lang.Object> getPath()
        Returns:
        list of field names and indices from root to the location of the corresponding `@defer` or `@stream` directive.
      • getLabel

        @Nullable
        public @Nullable java.lang.String getLabel()
        Returns:
        value derived from the corresponding `@defer` or `@stream` directive.
      • getErrors

        @Nullable
        public @Nullable java.util.List<GraphQLError> getErrors()
        Returns:
        a list of field errors encountered during execution.
      • getExtensions

        @Nullable
        public @Nullable java.util.Map<java.lang.Object,​java.lang.Object> getExtensions()
        Returns:
        a map of extensions or null if there are none
      • toSpecification

        public java.util.Map<java.lang.String,​java.lang.Object> toSpecification()
      • errorsToSpec

        protected java.lang.Object errorsToSpec​(java.util.List<GraphQLError> errors)