Documentation
¶
Index ¶
- func CreateQuery(c Config, r *http.Request) (string, string, error)
- func NewWebhookHandler(c Config, gqlHandler http.Handler) http.Handler
- func RecoveryHandler(next http.Handler, logger ErrorLog) http.Handler
- func WithProtocolInContext(next http.Handler) http.Handler
- type Config
- type ErrorLog
- type Handler
- type ResultCallbackFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateQuery ¶ added in v0.10.15
CreateQuery from handler config and request
func NewWebhookHandler ¶ added in v0.9.13
func RecoveryHandler ¶
RecoveryHandler recovers from panics to return Internal Server Error http response
Types ¶
type Config ¶
type Config struct { RouterConfig router.Config Schema *graphql.Schema Pretty bool GraphiQL bool RootObjectFn handler.RootObjectFn CheckOrigin func(req *http.Request) bool }
Config new handler
type ErrorLog ¶
type ErrorLog interface {
Errorf(string, ...interface{})
}
ErrorLog used by recovery handler
Click to show internal directories.
Click to hide internal directories.