-
public interface InvocationHandler
Invocation handler that allows execution of GraphQL requests without a WebServer.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
InvocationHandler.Builder
Fluent API builder to configure the invocation handler.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Set<String>
blacklistedExceptions()
Configured set of exceptions that are blacklisted.static InvocationHandler.Builder
builder()
Fluent API builder to configure the invocation handler.static InvocationHandler
create(graphql.schema.GraphQLSchema schema)
Create a handler for GraphQL schema.String
defaultErrorMessage()
Configured default error message.default Map<String,Object>
execute(String query)
Execute a GraphQL query.Map<String,Object>
execute(String query, String operationName, Map<String,Object> variables)
Execute a GraphQL query.String
schemaString()
The schema of this GraphQL endpoint.Set<String>
whitelistedExceptions()
Configured set of exceptions that are whitelisted.
-
-
-
Method Detail
-
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 stringoperationName
- operation namevariables
- 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
-
-