Documentation ¶
Index ¶
- func Authentication(r *http.Request, f AuthenticateFunc) func(conn *connection)
- func Connect(connectionID string, ws wsConnection, service GraphQLService, ...)
- func ReadLimit(limit int64) func(conn *connection)
- func WriteTimeout(d time.Duration) func(conn *connection)
- type AuthenticateFunc
- type GraphQLService
- type Middleware
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Authentication ¶
func Authentication(r *http.Request, f AuthenticateFunc) func(conn *connection)
func Connect ¶
func Connect(connectionID string, ws wsConnection, service GraphQLService, options ...func(conn *connection))
Connect implements the apollographql subscriptions-transport-ws protocol@v0.9.4 https://github.com/apollographql/subscriptions-transport-ws/blob/v0.9.4/PROTOCOL.md
func ReadLimit ¶
func ReadLimit(limit int64) func(conn *connection)
ReadLimit limits the maximum size of incoming messages
func WriteTimeout ¶
WriteTimeout sets a timeout for outgoing messages
Types ¶
type AuthenticateFunc ¶
type GraphQLService ¶
type GraphQLService interface {
Subscribe(ctx context.Context, document string, operationName string, variableValues map[string]interface{}) (payloads <-chan interface{}, err error)
}
GraphQLService interface
type Middleware ¶
type Middleware struct {
// contains filtered or unexported fields
}
func NewMiddleware ¶
func NewMiddleware(service GraphQLService, authenticate func(context.Context, string, string) (context.Context, error)) *Middleware
Click to show internal directories.
Click to hide internal directories.