Documentation ¶
Overview ¶
Package http handles GraphQL HTTP Requests including WebSocket Upgrades.
Index ¶
- func HandleWebsocket(done chan bool, errChan chan error, conn net.Conn, ...)deprecated
- func HandleWebsocketWithInitFunc(done chan bool, errChan chan error, conn net.Conn, ...)deprecated
- func NewGraphqlHTTPHandlerFunc(executionHandler *execution.Handler, logger log.Logger, ...) http.Handler
- type GraphQLHTTPRequestHandler
- type WebsocketSubscriptionClientdeprecated
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleWebsocket
deprecated
func HandleWebsocket(done chan bool, errChan chan error, conn net.Conn, executorPool subscription.ExecutorPool, logger abstractlogger.Logger)
HandleWebsocket will handle a websocket connection.
Deprecated: This HandleWebsocket is deprecated. Use github.com/wundergraph/graphql-go-tools/pkg/subscription/websocket instead.
func HandleWebsocketWithInitFunc
deprecated
added in
v1.57.2
func HandleWebsocketWithInitFunc( done chan bool, errChan chan error, conn net.Conn, executorPool subscription.ExecutorPool, logger abstractlogger.Logger, initFunc subscription.WebsocketInitFunc, )
HandleWebsocketWithInitFunc will handle a websocket connection with the ability to provide an InitFunc.
Deprecated: This HandleWebsocketWithInitFunc is deprecated. Use github.com/wundergraph/graphql-go-tools/pkg/subscription/websocket instead.
Types ¶
type GraphQLHTTPRequestHandler ¶
type GraphQLHTTPRequestHandler struct {
// contains filtered or unexported fields
}
func (*GraphQLHTTPRequestHandler) ServeHTTP ¶
func (g *GraphQLHTTPRequestHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type WebsocketSubscriptionClient
deprecated
type WebsocketSubscriptionClient struct {
// contains filtered or unexported fields
}
WebsocketSubscriptionClient is an actual implementation of the subscription client interface.
Deprecated: This WebsocketSubscriptionClient is deprecated. Use github.com/wundergraph/graphql-go-tools/pkg/subscription/websocket instead.
func NewWebsocketSubscriptionClient
deprecated
func NewWebsocketSubscriptionClient(logger abstractlogger.Logger, clientConn net.Conn) *WebsocketSubscriptionClient
NewWebsocketSubscriptionClient will create a new websocket subscription client.
Deprecated: This NewWebsocketSubscriptionClient is deprecated. Use github.com/wundergraph/graphql-go-tools/pkg/subscription/websocket instead.
func (*WebsocketSubscriptionClient) Disconnect ¶
func (w *WebsocketSubscriptionClient) Disconnect() error
Disconnect will close the websocket connection.
func (*WebsocketSubscriptionClient) IsConnected ¶
func (w *WebsocketSubscriptionClient) IsConnected() bool
IsConnected will indicate if the websocket conenction is still established.
func (*WebsocketSubscriptionClient) ReadFromClient ¶
func (w *WebsocketSubscriptionClient) ReadFromClient() (message *subscription.Message, err error)
ReadFromClient will read a subscription message from the websocket client.
func (*WebsocketSubscriptionClient) WriteToClient ¶
func (w *WebsocketSubscriptionClient) WriteToClient(message subscription.Message) error
WriteToClient will write a subscription message to the websocket client.