Class GraphQLHandler
- java.lang.Object
-
- io.vertx.reactivex.ext.web.handler.graphql.GraphQLHandler
-
- All Implemented Interfaces:
Handler<RoutingContext>
public class GraphQLHandler extends Object implements Handler<RoutingContext>
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<GraphQLHandler>__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description GraphQLHandler(GraphQLHandler delegate)GraphQLHandler(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description GraphQLHandlerbeforeExecute(Handler<ExecutionInputBuilderWithContext<RoutingContext>> config)Set a callback to invoke before executing a GraphQL query.static GraphQLHandlercreate(graphql.GraphQL graphQL)Create a newGraphQLHandlerthat will use the providedgraphQLobject to execute queries.static GraphQLHandlercreate(graphql.GraphQL graphQL, GraphQLHandlerOptions options)Create a newGraphQLHandlerthat will use the providedgraphQLobject to execute queries.GraphQLHandlerdataLoaderRegistry(Function<RoutingContext,org.dataloader.DataLoaderRegistry> factory)Deprecated.booleanequals(Object o)GraphQLHandlergetDelegate()static RoutingContextgetRoutingContext(graphql.GraphQLContext graphQlContext)Retrieves the from the .voidhandle(RoutingContext event)Something has happened, so handle it.inthashCode()GraphQLHandlerlocale(Function<RoutingContext,Locale> factory)Deprecated.static GraphQLHandlernewInstance(GraphQLHandler arg)GraphQLHandlerqueryContext(Function<RoutingContext,Object> factory)Deprecated.StringtoString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<GraphQLHandler> __TYPE_ARG
-
-
Constructor Detail
-
GraphQLHandler
public GraphQLHandler(GraphQLHandler delegate)
-
GraphQLHandler
public GraphQLHandler(Object delegate)
-
-
Method Detail
-
getDelegate
public GraphQLHandler getDelegate()
-
handle
public void handle(RoutingContext event)
Something has happened, so handle it.- Specified by:
handlein interfaceHandler<RoutingContext>- Parameters:
event- the event to handle
-
queryContext
@Deprecated public GraphQLHandler queryContext(Function<RoutingContext,Object> factory)
Deprecated.Customize the query context object. The providedfactorymethod will be invoked for each incoming GraphQL request.- Parameters:
factory-- Returns:
- a reference to this, so the API can be used fluently
-
beforeExecute
public GraphQLHandler beforeExecute(Handler<ExecutionInputBuilderWithContext<RoutingContext>> config)
Set a callback to invoke before executing a GraphQL query.- Parameters:
config- the callback to invoke- Returns:
- a reference to this, so the API can be used fluently
-
create
public static GraphQLHandler create(graphql.GraphQL graphQL)
Create a newGraphQLHandlerthat will use the providedgraphQLobject to execute queries.The handler will be configured with default
GraphQLHandlerOptions.- Parameters:
graphQL-- Returns:
-
create
public static GraphQLHandler create(graphql.GraphQL graphQL, GraphQLHandlerOptions options)
Create a newGraphQLHandlerthat will use the providedgraphQLobject to execute queries.The handler will be configured with the given
options.- Parameters:
graphQL-options- options for configuring theGraphQLHandler- Returns:
-
getRoutingContext
public static RoutingContext getRoutingContext(graphql.GraphQLContext graphQlContext)
Retrieves the from the .- Parameters:
graphQlContext- the GraphQL context object- Returns:
- the
-
dataLoaderRegistry
@Deprecated public GraphQLHandler dataLoaderRegistry(Function<RoutingContext,org.dataloader.DataLoaderRegistry> factory)
Deprecated.Customize the . The providedfactorymethod will be invoked for each incoming GraphQL request.- Parameters:
factory-- Returns:
- a reference to this, so the API can be used fluently
-
locale
@Deprecated public GraphQLHandler locale(Function<RoutingContext,Locale> factory)
Deprecated.Customize the passed to the GraphQL execution engine. The providedfactorymethod will be invoked for each incoming GraphQL request.- Parameters:
factory-- Returns:
- a reference to this, so the API can be used fluently
-
newInstance
public static GraphQLHandler newInstance(GraphQLHandler arg)
-
-