Interface InvocationHandler


public interface InvocationHandler
Invocation handler that allows execution of GraphQL requests without a WebServer.
  • Method Details

    • create

      static InvocationHandler create(graphql.schema.GraphQLSchema schema)
      Create a handler for GraphQL schema.
      Parameters:
      schema - schema to use
      Returns:
      a new invocation handler
    • builder

      static InvocationHandler.Builder builder()
      Fluent API builder to configure the invocation handler.
      Returns:
      a new builder
    • execute

      default Map<String,Object> execute(String query)
      Execute a GraphQL query.
      Parameters:
      query - query string
      Returns:
      GraphQL result
    • execute

      Map<String,Object> execute(String query, String operationName, Map<String,Object> variables)
      Execute a GraphQL query.
      Parameters:
      query - query string
      operationName - operation name
      variables - variables to use (optional)
      Returns:
      GraphQL result
    • schemaString

      String schemaString()
      The schema of this GraphQL endpoint.
      Returns:
      schema as a string
    • defaultErrorMessage

      String defaultErrorMessage()
      Configured default error message.
      Returns:
      default error message
    • blacklistedExceptions

      Set<String> blacklistedExceptions()
      Configured set of exceptions that are blacklisted.
      Returns:
      blacklisted exception class set
    • whitelistedExceptions

      Set<String> whitelistedExceptions()
      Configured set of exceptions that are whitelisted.
      Returns:
      whitelisted exception class set