Class GraphQLHandler
- java.lang.Object
-
- io.vertx.reactivex.ext.web.handler.graphql.GraphQLHandler
-
- All Implemented Interfaces:
io.vertx.core.Handler<RoutingContext>
public class GraphQLHandler extends Object implements io.vertx.core.Handler<RoutingContext>
ARoutehandler for GraphQL requests. NOTE: This class has been automatically generated from theoriginalnon RX-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<GraphQLHandler>__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description GraphQLHandler(io.vertx.ext.web.handler.graphql.GraphQLHandler delegate)GraphQLHandler(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description GraphQLHandlerbeforeExecute(io.vertx.core.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, io.vertx.ext.web.handler.graphql.GraphQLHandlerOptions options)Create a newGraphQLHandlerthat will use the providedgraphQLobject to execute queries.GraphQLHandlerdataLoaderRegistry(Function<RoutingContext,org.dataloader.DataLoaderRegistry> factory)Deprecated.booleanequals(Object o)io.vertx.ext.web.handler.graphql.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(io.vertx.ext.web.handler.graphql.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(io.vertx.ext.web.handler.graphql.GraphQLHandler delegate)
-
GraphQLHandler
public GraphQLHandler(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.ext.web.handler.graphql.GraphQLHandler getDelegate()
-
handle
public void handle(RoutingContext event)
Something has happened, so handle it.- Specified by:
handlein interfaceio.vertx.core.Handler<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(io.vertx.core.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, io.vertx.ext.web.handler.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(io.vertx.ext.web.handler.graphql.GraphQLHandler arg)
-
-