Class GraphQLError

java.lang.Object
com.codename1.backend.graphql.GraphQLError

public final class GraphQLError extends Object

One entry of a response's errors, as a DataFetcherExceptionResolver or a @GraphQlExceptionHandler method returns it. The location and path are the failing field's and are filled in by the engine.

return GraphQLError.newError().errorType(GraphQLError.ErrorType.NOT_FOUND)
        .message("No book " + e.getId()).build();
  • Method Details

    • newError

      public static GraphQLError.Builder newError()
      A builder with no message and the classification DataFetchingException.
    • getMessage

      public String getMessage()
    • getExtensions

      public Map<String,Object> getExtensions()
      The error's extensions, classification included.