public interface GraphQLHandler extends Handler<RoutingContext>
Route
handler for GraphQL requests.Modifier and Type | Method and Description |
---|---|
GraphQLHandler |
beforeExecute(Handler<ExecutionInputBuilderWithContext<RoutingContext>> config)
Set a callback to invoke before executing a GraphQL query.
|
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)
Deprecated.
as of 4.2, use
beforeExecute(Handler) instead |
static RoutingContext |
getRoutingContext(graphql.GraphQLContext graphQlContext)
Deprecated.
invoke
GraphQLContext.get(Object) with RoutingContext class object instead. |
GraphQLHandler |
locale(java.util.function.Function<RoutingContext,Locale> factory)
Deprecated.
as of 4.2, use
beforeExecute(Handler) instead |
GraphQLHandler |
queryContext(java.util.function.Function<RoutingContext,Object> factory)
Deprecated.
as of 4.2, use
beforeExecute(Handler) instead |
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
@Deprecated static RoutingContext getRoutingContext(graphql.GraphQLContext graphQlContext)
GraphQLContext.get(Object)
with RoutingContext
class object instead.RoutingContext
from the GraphQLContext
.graphQlContext
- the GraphQL context objectRoutingContext
@Deprecated GraphQLHandler queryContext(java.util.function.Function<RoutingContext,Object> factory)
beforeExecute(Handler)
insteadfactory
method will be invoked for each incoming GraphQL request.@Deprecated GraphQLHandler dataLoaderRegistry(java.util.function.Function<RoutingContext,org.dataloader.DataLoaderRegistry> factory)
beforeExecute(Handler)
insteadDataLoaderRegistry
.
The provided factory
method will be invoked for each incoming GraphQL request.@Deprecated GraphQLHandler locale(java.util.function.Function<RoutingContext,Locale> factory)
beforeExecute(Handler)
insteadLocale
passed to the GraphQL execution engine.
The provided factory
method will be invoked for each incoming GraphQL request.GraphQLHandler beforeExecute(Handler<ExecutionInputBuilderWithContext<RoutingContext>> config)
config
- the callback to invokeCopyright © 2024 Eclipse. All rights reserved.