Class GraphQLWsResponse
- java.lang.Object
-
- io.micronaut.configuration.graphql.ws.GraphQLWsResponse
-
public class GraphQLWsResponse extends java.lang.ObjectClass to handle the message to and from the websocket.- Since:
- 1.3
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGraphQLWsResponse.ServerTypeTypes of messages send to the client.
-
Constructor Summary
Constructors Constructor Description GraphQLWsResponse(GraphQLWsResponse.ServerType serverType)Constructor for messages with just the type, like errors.GraphQLWsResponse(GraphQLWsResponse.ServerType serverType, java.lang.String id)Constructor for messages with only serverType and id, like the stop message.GraphQLWsResponse(GraphQLWsResponse.ServerType serverType, java.lang.String id, GraphQLResponseBody payload)Constructor having all the types, like a graphql query response.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetId()Get the id.GraphQLResponseBodygetPayload()Get the payload.java.lang.StringgetType()Get the type.
-
-
-
Constructor Detail
-
GraphQLWsResponse
public GraphQLWsResponse(GraphQLWsResponse.ServerType serverType)
Constructor for messages with just the type, like errors.- Parameters:
serverType- type as serverType
-
GraphQLWsResponse
public GraphQLWsResponse(GraphQLWsResponse.ServerType serverType, @Nullable java.lang.String id)
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 java.lang.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 Detail
-
getType
public java.lang.String getType()
Get the type.- Returns:
- the type of message as string
-
getId
@Nullable public java.lang.String getId()
Get the id.- Returns:
- id as string
-
getPayload
@Nullable public GraphQLResponseBody getPayload()
Get the payload.- Returns:
- result of the query
-
-