graphql

package
v0.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2024 License: MPL-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNetworkConnection = errors.New("network connection error")
	ErrInvalidQuery      = errors.New("invalid query")
)

Functions

func Handlers

func Handlers(cfg *config.GraphQLMode, schema *graphql.Schema, serverURL *url.URL, shutdown chan os.Signal, logger *logrus.Logger, proxy proxy.Pool, wsClient proxy.WebSocketClient, deniedTokens *denylist.DeniedTokens, AllowedIPCache *allowiplist.AllowedIPsType) fasthttp.RequestHandler

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func (*Handler) GraphQLHandle

func (h *Handler) GraphQLHandle(ctx *fasthttp.RequestCtx) error

GraphQLHandle performs complexity checks to the GraphQL query and proxy request to the backend if all checks are passed

func (*Handler) HandleWebSocketProxy

func (h *Handler) HandleWebSocketProxy(ctx *fasthttp.RequestCtx) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL