Class GraphQLWsResponse
java.lang.Object
io.micronaut.configuration.graphql.ws.GraphQLWsResponse
Class to handle the message to and from the websocket.
- Since:
- 1.3
- Author:
- Gerard Klijs
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumTypes of messages send to the client. -
Constructor Summary
ConstructorsConstructorDescriptionGraphQLWsResponse(GraphQLWsResponse.ServerType serverType) Constructor for messages with just the type, like errors.GraphQLWsResponse(GraphQLWsResponse.ServerType serverType, String id) Constructor for messages with only serverType and id, like the stop message.GraphQLWsResponse(GraphQLWsResponse.ServerType serverType, String id, GraphQLResponseBody payload) Constructor having all the types, like a graphql query response. -
Method Summary
-
Constructor Details
-
GraphQLWsResponse
Constructor for messages with just the type, like errors.- Parameters:
serverType- type as serverType
-
GraphQLWsResponse
Constructor for messages with only serverType and id, like the stop message.- Parameters:
serverType- serverType as serverTypeid- id as string
-
GraphQLWsResponse
public GraphQLWsResponse(GraphQLWsResponse.ServerType serverType, @Nullable String id, @Nullable GraphQLResponseBody payload) Constructor having all the types, like a graphql query response.- Parameters:
serverType- serverType as stringid- id as stringpayload- payload as string
-
-
Method Details
-
getType
Get the type.- Returns:
- the type of message as string
-
getId
Get the id.- Returns:
- id as string
-
getPayload
Get the payload.- Returns:
- result of the query
-