public interface GraphQLHandler extends Handler<RoutingContext>
Route handler for GraphQL requests.| Modifier and Type | Method and Description |
|---|---|
static GraphQLHandler |
create(graphql.GraphQL graphQL)
Create a new
GraphQLHandler that will use the provided graphQL object to execute queries. |
static GraphQLHandler |
create(graphql.GraphQL graphQL,
GraphQLHandlerOptions options)
Create a new
GraphQLHandler that will use the provided graphQL object to execute queries. |
GraphQLHandler |
dataLoaderRegistry(java.util.function.Function<RoutingContext,org.dataloader.DataLoaderRegistry> factory)
Customize the
DataLoaderRegistry. |
GraphQLHandler |
graphiQLRequestHeaders(java.util.function.Function<RoutingContext,MultiMap> factory)
Customize the HTTP headers to add to GraphQL requests sent by the GraphiQL user interface.
|
GraphQLHandler |
queryContext(java.util.function.Function<RoutingContext,Object> factory)
Customize the query context object.
|
static GraphQLHandler create(graphql.GraphQL graphQL)
GraphQLHandler that will use the provided graphQL object to execute queries.
The handler will be configured with default options.
static GraphQLHandler create(graphql.GraphQL graphQL, GraphQLHandlerOptions options)
GraphQLHandler that will use the provided graphQL object to execute queries.
The handler will be configured with the given options.
options - options for configuring the GraphQLHandlerGraphQLHandler queryContext(java.util.function.Function<RoutingContext,Object> factory)
factory method will be invoked for each incoming GraphQL request.GraphQLHandler dataLoaderRegistry(java.util.function.Function<RoutingContext,org.dataloader.DataLoaderRegistry> factory)
DataLoaderRegistry.
The provided factory method will be invoked for each incoming GraphQL request.GraphQLHandler graphiQLRequestHeaders(java.util.function.Function<RoutingContext,MultiMap> factory)
GraphiQLOptions.getHeaders().
This can be useful if, for example, the server is protected by authentication.
Copyright © 2019 Eclipse. All rights reserved.