public class GraphQLWsResponse
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
GraphQLWsResponse.ServerType
Types of messages send to the client.
|
Constructor and 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.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getId()
Get the id.
|
GraphQLResponseBody |
getPayload()
Get the payload.
|
java.lang.String |
getType()
Get the type.
|
public GraphQLWsResponse(GraphQLWsResponse.ServerType serverType)
serverType
- type as serverTypepublic GraphQLWsResponse(GraphQLWsResponse.ServerType serverType, @Nullable java.lang.String id)
serverType
- serverType as serverTypeid
- id as stringpublic GraphQLWsResponse(GraphQLWsResponse.ServerType serverType, @Nullable java.lang.String id, @Nullable GraphQLResponseBody payload)
serverType
- serverType as stringid
- id as stringpayload
- payload as stringpublic java.lang.String getType()
@Nullable public java.lang.String getId()
@Nullable public GraphQLResponseBody getPayload()