Documentation ¶
Index ¶
- func GetInitPayload(ctx context.Context) transport.InitPayload
- func GraphQL(exec graphql.ExecutableSchema, options ...Option) http.HandlerFuncdeprecated
- func Playground(title, endpoint string) http.HandlerFuncdeprecated
- type Configdeprecated
- type InitPayloaddeprecated
- type Optiondeprecated
- func CacheSize(size int) Option
- func ComplexityLimit(limit int) Option
- func ComplexityLimitFunc(complexityLimitFunc func(ctx context.Context) int) Option
- func EnablePersistedQueryCache(cache PersistedQueryCache) Option
- func ErrorPresenter(f graphql.ErrorPresenterFunc) Option
- func IntrospectionEnabled(enabled bool) Option
- func RecoverFunc(recover graphql.RecoverFunc) Optiondeprecated
- func RequestMiddleware(middleware graphql.ResponseMiddleware) Option
- func ResolverMiddleware(middleware graphql.FieldMiddleware) Option
- func UploadMaxMemory(size int64) Option
- func UploadMaxSize(size int64) Option
- func WebsocketInitFunc(websocketInitFunc transport.WebsocketInitFunc) Option
- func WebsocketKeepAliveDuration(duration time.Duration) Option
- func WebsocketPingPongDuration(duration time.Duration) Option
- func WebsocketUpgrader(upgrader websocket.Upgrader) Optiondeprecated
- type PersistedQueryCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetInitPayload ¶
func GetInitPayload(ctx context.Context) transport.InitPayload
func GraphQL
deprecated
func GraphQL(exec graphql.ExecutableSchema, options ...Option) http.HandlerFunc
Deprecated: switch to graphql/handler.New
func Playground
deprecated
func Playground(title, endpoint string) http.HandlerFunc
Deprecated: use playground.Handler instead
Types ¶
type Config
deprecated
type Config struct {
// contains filtered or unexported fields
}
Deprecated: switch to graphql/handler.New
type InitPayload
deprecated
type InitPayload = transport.InitPayload
Deprecated: use transport.InitPayload instead
type Option
deprecated
type Option func(cfg *Config)
Deprecated: switch to graphql/handler.New
func CacheSize ¶
CacheSize sets the maximum size of the query cache. If size is less than or equal to 0, the cache is disabled. Deprecated: switch to graphql/handler.New
func ComplexityLimit ¶
ComplexityLimit sets a maximum query complexity that is allowed to be executed. If a query is submitted that exceeds the limit, a 422 status code will be returned. Deprecated: switch to graphql/handler.New
func ComplexityLimitFunc ¶
ComplexityLimitFunc allows you to define a function to dynamically set the maximum query complexity that is allowed to be executed. If a query is submitted that exceeds the limit, a 422 status code will be returned. Deprecated: switch to graphql/handler.New
func EnablePersistedQueryCache ¶
func EnablePersistedQueryCache(cache PersistedQueryCache) Option
Add cache that will hold queries for automatic persisted queries (APQ) Deprecated: switch to graphql/handler.New
func ErrorPresenter ¶
func ErrorPresenter(f graphql.ErrorPresenterFunc) Option
ErrorPresenter transforms errors found while resolving into errors that will be returned to the user. It provides a good place to add any extra fields, like error.type, that might be desired by your frontend. Check the default implementation in graphql.DefaultErrorPresenter for an example. Deprecated: switch to graphql/handler.New
func IntrospectionEnabled ¶
IntrospectionEnabled = false will forbid clients from calling introspection endpoints. Can be useful in prod when you don't want clients introspecting the full schema. Deprecated: switch to graphql/handler.New
func RecoverFunc
deprecated
func RecoverFunc(recover graphql.RecoverFunc) Option
Deprecated: switch to graphql/handler.New
func RequestMiddleware ¶
func RequestMiddleware(middleware graphql.ResponseMiddleware) Option
RequestMiddleware allows you to define a function that will be called around the root request, after the query has been parsed. This is useful for logging Deprecated: switch to graphql/handler.New
func ResolverMiddleware ¶
func ResolverMiddleware(middleware graphql.FieldMiddleware) Option
ResolverMiddleware allows you to define a function that will be called around every resolver, useful for logging. Deprecated: switch to graphql/handler.New
func UploadMaxMemory ¶
UploadMaxMemory sets the maximum number of bytes used to parse a request body as multipart/form-data in memory, with the remainder stored on disk in temporary files. Deprecated: switch to graphql/handler.New
func UploadMaxSize ¶
UploadMaxSize sets the maximum number of bytes used to parse a request body as multipart/form-data. Deprecated: switch to graphql/handler.New
func WebsocketInitFunc ¶
func WebsocketInitFunc(websocketInitFunc transport.WebsocketInitFunc) Option
WebsocketInitFunc is called when the server receives connection init message from the client. This can be used to check initial payload to see whether to accept the websocket connection. Deprecated: switch to graphql/handler.New
func WebsocketKeepAliveDuration ¶
WebsocketKeepAliveDuration allows you to reconfigure the keepalive behavior. By default, keepalive is enabled with a DefaultConnectionKeepAlivePingInterval duration. Set handler.connectionKeepAlivePingInterval = 0 to disable keepalive altogether. Deprecated: switch to graphql/handler.New