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 |
locale(java.util.function.Function<RoutingContext,Locale> factory)
Customize the
Locale passed to the GraphQL execution engine. |
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 GraphQLHandler
GraphQLHandler 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 locale(java.util.function.Function<RoutingContext,Locale> factory)
Locale
passed to the GraphQL execution engine.
The provided factory
method will be invoked for each incoming GraphQL request.Copyright © 2021 Eclipse. All rights reserved.