func GetInitPayload(ctx context.Context) transport.InitPayload
func GraphQL(exec graphql.ExecutableSchema, options ...Option) http.HandlerFunc
Deprecated: switch to graphql/handler.New
func Playground(title string, endpoint string) http.HandlerFunc
Deprecated: use playground.Handler instead
Deprecated: switch to graphql/handler.New
type Config struct {
// contains filtered or unexported fields
}
Deprecated: use transport.InitPayload instead
type InitPayload = transport.InitPayload
Deprecated: switch to graphql/handler.New
type Option func(cfg *Config)
func CacheSize(size int) Option
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(limit int) Option
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 func(ctx context.Context) int) Option
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(cache PersistedQueryCache) Option
Add cache that will hold queries for automatic persisted queries (APQ) Deprecated: switch to graphql/handler.New
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(enabled bool) Option
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(recover graphql.RecoverFunc) Option
Deprecated: switch to graphql/handler.New
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(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(size int64) Option
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(size int64) Option
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(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(duration time.Duration) Option
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
func WebsocketPingPongDuration(duration time.Duration) Option
func WebsocketUpgrader(upgrader websocket.Upgrader) Option
Deprecated: switch to graphql/handler.New
type PersistedQueryCache interface { Add(ctx context.Context, hash string, query string) Get(ctx context.Context, hash string) (string, bool) }