Documentation ¶
Index ¶
Constants ¶
View Source
const ( GQL_CONNECTION_INIT = "connection_init" // Client -> Server GQL_CONNECTION_ACK = "connection_ack" // Server -> Client GQL_CONNECTION_ERROR = "connection_error" // Server -> Client GQL_CONNECTION_KEEP_ALIVE = "ka" // Server -> Client GQL_CONNECTION_TERMINATE = "connection_terminate" // Client -> Server GQL_START = "start" // Client -> Server GQL_DATA = "data" // Server -> Client GQL_ERROR = "error" // Server -> Client GQL_COMPLETE = "complete" // Server -> Client GQL_STOP = "stop" // Client -> Server )
Variables ¶
This section is empty.
Functions ¶
func Listen ¶
func Listen(schema *graphql.Schema, channel *SubscriptionChannel)
Types ¶
type ConnectionContext ¶
type ConnectionContext struct {
// contains filtered or unexported fields
}
type Handler ¶
type Handler struct { Schema *graphql.Schema Channel *SubscriptionChannel }
type OperationMessage ¶
type OperationQuery ¶
type OperationQuery struct { Payload QueryParams `json:"payload"` ID string `json:"id"` OperationType string `json:"type"` }
type QueryParams ¶
type SubscriptionChannel ¶
type SubscriptionChannel chan SubscriptionPayload
type SubscriptionPayload ¶
type SubscriptionPayload struct { Name string Payload interface{} }
Click to show internal directories.
Click to hide internal directories.