Class GraphQLApolloWsController
java.lang.Object
io.micronaut.configuration.graphql.ws.apollo.GraphQLApolloWsController
@Deprecated(since="4.0")
@ServerWebSocket(value="${graphql.graphql-apollo-ws.path:/graphql-ws}",
                 subprotocols="graphql-ws")
@Requires(property="graphql.graphql-apollo-ws.enabled",
          value="true",
          defaultValue="false")
public class GraphQLApolloWsController
extends Object
Deprecated.
The Apollo subscriptions-transport-ws protocol is deprecated and its usage should be replaced with the new graphql-ws implementation.
The GraphQL websocket controller handling GraphQL requests.
 Implementation of https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md
- Since:
 - 1.3
 - Author:
 - Gerard Klijs
 
- 
Constructor Summary
ConstructorsConstructorDescriptionGraphQLApolloWsController(GraphQLApolloWsMessageHandler messageHandler, io.micronaut.configuration.graphql.ws.apollo.GraphQLApolloWsState state, GraphQLJsonSerializer graphQLJsonSerializer) Deprecated.Default constructor. - 
Method Summary
Modifier and TypeMethodDescriptionorg.reactivestreams.Publisher<GraphQLApolloWsResponse>onClose(io.micronaut.websocket.WebSocketSession session, io.micronaut.websocket.CloseReason closeReason) Deprecated.Called when the websocket is closed.org.reactivestreams.Publisher<GraphQLApolloWsResponse>Deprecated.Called when there is an error with the websocket, this probably means the connection is lost, but hasn't been properly closed.org.reactivestreams.Publisher<GraphQLApolloWsResponse>Deprecated.Called on every message received from the client.voidonOpen(io.micronaut.websocket.WebSocketSession session, io.micronaut.http.HttpRequest request) Deprecated.Called when the connection is opened. 
- 
Constructor Details
- 
GraphQLApolloWsController
public GraphQLApolloWsController(GraphQLApolloWsMessageHandler messageHandler, io.micronaut.configuration.graphql.ws.apollo.GraphQLApolloWsState state, GraphQLJsonSerializer graphQLJsonSerializer) Deprecated.Default constructor.- Parameters:
 messageHandler- theGraphQLApolloWsMessageHandlerinstancestate- theGraphQLApolloWsStateinstancegraphQLJsonSerializer- theGraphQLJsonSerializerinstance
 
 - 
 - 
Method Details
- 
onOpen
@OnOpen public void onOpen(io.micronaut.websocket.WebSocketSession session, io.micronaut.http.HttpRequest request) Deprecated.Called when the connection is opened. We store the original request, since it might be needed for the GraphQLInvocation.- Parameters:
 session- WebSocketSessionrequest- HttpRequest
 - 
onMessage
@OnMessage public org.reactivestreams.Publisher<GraphQLApolloWsResponse> onMessage(String message, io.micronaut.websocket.WebSocketSession session) Deprecated.Called on every message received from the client.- Parameters:
 message- Message received from a clientsession- WebSocketSession- Returns:
 Publisher<GraphQLApolloWsResponse>
 - 
onClose
@OnClose public org.reactivestreams.Publisher<GraphQLApolloWsResponse> onClose(io.micronaut.websocket.WebSocketSession session, io.micronaut.websocket.CloseReason closeReason) Deprecated.Called when the websocket is closed.- Parameters:
 session- WebSocketSessioncloseReason- CloseReason- Returns:
 Publisher<GraphQLApolloWsResponse>
 - 
onError
@OnError public org.reactivestreams.Publisher<GraphQLApolloWsResponse> onError(io.micronaut.websocket.WebSocketSession session, Throwable t) Deprecated.Called when there is an error with the websocket, this probably means the connection is lost, but hasn't been properly closed.- Parameters:
 session- WebSocketSessiont- Throwable, the cause of the error- Returns:
 Publisher<GraphQLApolloWsResponse>
 
 -