Interface GraphQLError


public interface GraphQLError
GraphQLError
Example to create an instance using the builder pattern

     GraphQLError graphQLError = GraphQLError.builder()
             .message("{message}")
             .plusLocations(locationsBuilder -> locationsBuilder)
             .extensions(extensionsBuilder -> extensionsBuilder)
             .build()
 
  • Method Details

    • getMessage

      @NotNull @NotNull String getMessage()
      Returns:
      message
    • getLocations

      @NotNull @Valid @NotNull @Valid List<GraphQLErrorLocation> getLocations()
      Returns:
      locations
    • getPath

      List<Object> getPath()
      Returns:
      path
    • getExtensions

      @NotNull @Valid @NotNull @Valid GraphQLErrorObject getExtensions()

      Represents a single error.

      Returns:
      extensions
    • setMessage

      void setMessage(String message)
      set message
      Parameters:
      message - value to be set
    • setLocations

      void setLocations(GraphQLErrorLocation... locations)
      set locations
      Parameters:
      locations - values to be set
    • setLocations

      void setLocations(List<GraphQLErrorLocation> locations)
      set locations
      Parameters:
      locations - values to be set
    • setPath

      void setPath(Object... path)
      set path
      Parameters:
      path - values to be set
    • setPath

      void setPath(List<Object> path)
      set path
      Parameters:
      path - values to be set
    • setExtensions

      void setExtensions(GraphQLErrorObject extensions)

      Represents a single error.

      Parameters:
      extensions - value to be set
    • of

      static GraphQLError of()
      factory method
      Returns:
      instance of GraphQLError
    • of

      static GraphQLError of(GraphQLError template)
      factory method to create a shallow copy GraphQLError
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static GraphQLError deepCopy(@Nullable GraphQLError template)
      factory method to create a deep copy of GraphQLError
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static GraphQLErrorBuilder builder()
      builder factory method for GraphQLError
      Returns:
      builder
    • builder

      static GraphQLErrorBuilder builder(GraphQLError template)
      create builder for GraphQLError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withGraphQLError

      default <T> T withGraphQLError(Function<GraphQLError,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<GraphQLError> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference