Versions in this module Expand all Collapse all v0 v0.1.1 Feb 27, 2021 v0.1.0 Jan 1, 2021 Changes in this version + func ErrorsFromGraphQLErrors(errors []gqlerrors.FormattedError) []error + func NewHandler(config HandlerConfig) http.Handler + func NewLogger(prefix string) *log.Entry + type AuthenticateFunc func(token string) (interface{}, error) + type Connection interface + ID func() string + SendData func(string, *DataMessagePayload) + SendError func(error) + User func() interface{} + func NewConnection(ws *websocket.Conn, config ConnectionConfig) Connection + type ConnectionConfig struct + Authenticate AuthenticateFunc + EventHandlers ConnectionEventHandlers + type ConnectionEventHandlers struct + Close func(Connection) + StartOperation func(Connection, string, *StartMessagePayload) []error + StopOperation func(Connection, string) + type ConnectionSubscriptions map[string]*Subscription + type DataMessagePayload struct + Data interface{} + Errors []error + type HandlerConfig struct + Authenticate AuthenticateFunc + SubscriptionManager SubscriptionManager + type InitMessagePayload struct + AuthToken string + type OperationMessage struct + ID string + Payload interface{} + Type string + func (msg OperationMessage) String() string + type StartMessagePayload struct + OperationName string + Query string + Variables map[string]interface{} + type Subscription struct + Connection Connection + Document *ast.Document + Fields []string + ID string + OperationName string + Query string + SendData SubscriptionSendDataFunc + Variables map[string]interface{} + func (s *Subscription) MatchesField(field string) bool + type SubscriptionManager interface + AddSubscription func(Connection, *Subscription) []error + RemoveSubscription func(Connection, *Subscription) + RemoveSubscriptions func(Connection) + Subscriptions func() sync.Map + func NewSubscriptionManager(schema *graphql.Schema) SubscriptionManager + func NewSubscriptionManagerWithLogger(schema *graphql.Schema, logger *log.Entry) SubscriptionManager + type SubscriptionSendDataFunc func(*DataMessagePayload) + type Subscriptions sync.Map