Documentation ¶
Index ¶
- type GraphQLWS
- func (sp *GraphQLWS) Address() wss.Address
- func (sp *GraphQLWS) Close() error
- func (sp *GraphQLWS) HandleGraphQLWSServiceRequest(r *GraphQLWSServiceRequest)
- func (sp *GraphQLWS) SendOriginRequest(r *wss.OriginRequest) error
- func (sp *GraphQLWS) SendServiceRequest(address wss.Address, r *wss.ServiceRequest) error
- func (sp *GraphQLWS) ServeHTTP(w http.ResponseWriter, r *http.Request)
- type GraphQLWSCluster
- type GraphQLWSOrigin
- type GraphQLWSOriginFunc
- type GraphQLWSOriginRequest
- type GraphQLWSOriginResponse
- type GraphQLWSPublishRequest
- type GraphQLWSResult
- type GraphQLWSServiceRequest
- type GraphQLWSStartRequest
- type GraphQLWSSubscription
- type GraphQLWSSubscriptionKeepAliveRequest
- type GraphQLWSSubscriptionQueryRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GraphQLWS ¶
type GraphQLWS struct { Origin GraphQLWSOrigin Cluster GraphQLWSCluster KeepAliveInterval time.Duration Logger logrus.FieldLogger // contains filtered or unexported fields }
GraphQLWS implements the graphql-ws subprotocol. It can be used as a middle layer between the websocket service and an origin to provide a more efficient, higher level interface to the origin.
func (*GraphQLWS) HandleGraphQLWSServiceRequest ¶
func (sp *GraphQLWS) HandleGraphQLWSServiceRequest(r *GraphQLWSServiceRequest)
func (*GraphQLWS) SendOriginRequest ¶
func (sp *GraphQLWS) SendOriginRequest(r *wss.OriginRequest) error
func (*GraphQLWS) SendServiceRequest ¶
type GraphQLWSCluster ¶
type GraphQLWSOrigin ¶
type GraphQLWSOrigin interface {
SendGraphQLWSOriginRequest(*GraphQLWSOriginRequest) (*GraphQLWSOriginResponse, error)
}
type GraphQLWSOriginFunc ¶
type GraphQLWSOriginFunc func(*GraphQLWSOriginRequest) (*GraphQLWSOriginResponse, error)
func (GraphQLWSOriginFunc) SendGraphQLWSServiceRequest ¶
func (f GraphQLWSOriginFunc) SendGraphQLWSServiceRequest(r *GraphQLWSOriginRequest) (*GraphQLWSOriginResponse, error)
type GraphQLWSOriginRequest ¶
type GraphQLWSOriginRequest struct { Sender wss.Address StartRequest *GraphQLWSStartRequest SubscriptionQueryRequest *GraphQLWSSubscriptionQueryRequest SubscriptionKeepAliveRequest *GraphQLWSSubscriptionKeepAliveRequest }
type GraphQLWSOriginResponse ¶
type GraphQLWSOriginResponse struct { Error string Result *GraphQLWSResult Subscription *GraphQLWSSubscription }
type GraphQLWSPublishRequest ¶
type GraphQLWSPublishRequest struct { Subscribers []wss.Address Keys []string Context json.RawMessage }
type GraphQLWSResult ¶
type GraphQLWSResult struct { Data json.RawMessage Errors json.RawMessage `json:"Errors,omitempty"` }
type GraphQLWSServiceRequest ¶
type GraphQLWSServiceRequest struct { WebSocketServiceRequest *wss.ServiceRequest PublishRequest *GraphQLWSPublishRequest }
type GraphQLWSStartRequest ¶
type GraphQLWSStartRequest struct { Query string Variables json.RawMessage OperationName string }
type GraphQLWSSubscription ¶
type GraphQLWSSubscription struct { // A digest that uniquely identifies the inputs to the query. This is used to batch query // execution. Generally, this should be a hash of the normalized query, variables, and // operation name. InputDigest string InputContext json.RawMessage // A list of keys that will be used to trigger this subscription's execution in the future. Keys []string }
type GraphQLWSSubscriptionKeepAliveRequest ¶
type GraphQLWSSubscriptionKeepAliveRequest struct {
Keys []string
}
type GraphQLWSSubscriptionQueryRequest ¶
type GraphQLWSSubscriptionQueryRequest struct { Query string Variables json.RawMessage OperationName string Context json.RawMessage InputContext json.RawMessage }
Click to show internal directories.
Click to hide internal directories.