Interface GraphQLWSHandlerBuilder
public interface GraphQLWSHandlerBuilder
A builder for
GraphQLWSHandler instances.-
Method Summary
Modifier and TypeMethodDescriptionbeforeExecute(Handler<ExecutionInputBuilderWithContext<Message>> beforeExecuteHandler) Set a callback to invoke before executing a GraphQL query.build()onConnectionInit(Handler<ConnectionInitEvent> connectionInitHandler) Customize the connection initHandler.Customize the messageHandler.onSocketEnd(Handler<ServerWebSocket> endHandler) Customize the endHandler.with(GraphQLWSOptions options) Change theGraphQLWSOptionsto use.
-
Method Details
-
with
Change theGraphQLWSOptionsto use.- Returns:
- a reference to this, so the API can be used fluently
-
onConnectionInit
Customize the connection initHandler. This handler will be called when theMessageType.CONNECTION_INITmessage is received.- Returns:
- a reference to this, so the API can be used fluently
-
beforeExecute
GraphQLWSHandlerBuilder beforeExecute(Handler<ExecutionInputBuilderWithContext<Message>> beforeExecuteHandler) Set a callback to invoke before executing a GraphQL query.- Parameters:
beforeExecuteHandler- the callback to invoke- Returns:
- a reference to this, so the API can be used fluently
-
onMessage
- Returns:
- a reference to this, so the API can be used fluently
-
onSocketEnd
Customize the endHandler. This handler will be called at the end of each websocket connection.- Returns:
- a reference to this, so the API can be used fluently
-
build
GraphQLWSHandler build()- Returns:
- a new instance of
GraphQLWSHandler
-