Documentation
¶
Overview ¶
Package graphql defines the GraphQL messages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ConnectionInit is the message to initialize the connection. (client -> server) ConnectionInit = map[string]interface{}{ "type": "connection_init", } )
Functions ¶
func BuildSubscribeMessage ¶
func BuildSubscribeMessage(payload SubscribeMessagePayload) map[string]interface{}
BuildSubscribeMessage builds a subscribe message.
Types ¶
type ConnectionAckMessage ¶
type ConnectionAckMessage struct { Type string `json:"type"` Payload map[string]interface{} `json:"payload,omitempty"` }
ConnectionAckMessage is the message to acknowledge the connection. (server -> client)
type Query ¶
type Query struct { Query string `json:"query"` Variables map[string]interface{} `json:"variables"` }
Query is the GraphQL query.
This must be serialized to JSON and put in the Data field of the payload.
type SubscribeMessagePayload ¶
type SubscribeMessagePayload struct { Data string `json:"data"` Extensions map[string]interface{} `json:"extensions,omitempty"` }
SubscribeMessagePayload is the payload of the subscribe message.
Click to show internal directories.
Click to hide internal directories.