Documentation
¶
Index ¶
- type ContextFunc
- type FormatErrorFunc
- type Option
- func WithContextFunc(f ContextFunc) Option
- func WithFormatErrorFunc(f FormatErrorFunc) Option
- func WithGraphiQLOptions(o *ide.GraphiQLOptions) Option
- func WithLogFunc(l logger.LogFunc) Option
- func WithPlaygroundOptions(o *ide.PlaygroundOptions) Option
- func WithPretty() Option
- func WithResultCallbackFunc(f ResultCallbackFunc) Option
- func WithRootValueFunc(f RootValueFunc) Option
- func WithWebsocketContextFunc(f ContextFunc) Option
- type Options
- type RequestType
- type ResultCallbackFunc
- type RootValueFunc
- type Roots
- type WSOptions
- type WSRootsFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContextFunc ¶
type ContextFunc func(t RequestType, r *http.Request) context.Context
type FormatErrorFunc ¶
type FormatErrorFunc func(err error) gqlerrors.FormattedError
type Option ¶
type Option func(opts *Options)
func WithContextFunc ¶
func WithContextFunc(f ContextFunc) Option
func WithFormatErrorFunc ¶
func WithFormatErrorFunc(f FormatErrorFunc) Option
func WithGraphiQLOptions ¶
func WithGraphiQLOptions(o *ide.GraphiQLOptions) Option
func WithLogFunc ¶
func WithPlaygroundOptions ¶
func WithPlaygroundOptions(o *ide.PlaygroundOptions) Option
func WithPretty ¶
func WithPretty() Option
func WithResultCallbackFunc ¶
func WithResultCallbackFunc(f ResultCallbackFunc) Option
func WithRootValueFunc ¶
func WithRootValueFunc(f RootValueFunc) Option
func WithWebsocketContextFunc ¶
func WithWebsocketContextFunc(f ContextFunc) Option
type Options ¶
type Options struct {
Pretty bool
RootValueFunc RootValueFunc
WSRootsFunc WSRootsFunc
FormatErrorFunc FormatErrorFunc
ContextFunc ContextFunc
WSContextFunc ContextFunc
ResultCallbackFunc ResultCallbackFunc
LogFunc logger.LogFunc
WS *WSOptions
Playground *ide.PlaygroundOptions
GraphiQL *ide.GraphiQLOptions
}
type RequestType ¶
type RequestType string
const ( RequestTypeHTTP RequestType = "http" RequestTypeWS RequestType = "ws" )
type ResultCallbackFunc ¶
type RootValueFunc ¶
Click to show internal directories.
Click to hide internal directories.