Documentation
¶
Index ¶
- Constants
- Variables
- type ChanMgr
- type ContextFunc
- type FormatErrorFunc
- type Option
- func WithContextFunc(f ContextFunc) Option
- func WithFormatErrorFunc(f FormatErrorFunc) Option
- func WithGraphiQLOptions(o *ide.GraphiQLOptions) Option
- func WithLogger(l logger.Logger) 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 RequestOptions
- type ResultCallbackFunc
- type ResultChan
- type RootValueFunc
- type Server
- type WSOptions
Constants ¶
View Source
const ( ContentTypeJSON = "application/json" ContentTypeGraphQL = "application/graphql" ContentTypeFormURLEncoded = "application/x-www-form-urlencoded" )
Constants
Variables ¶
View Source
var (
ConnKey interface{} = "conn"
)
Functions ¶
This section is empty.
Types ¶
type ChanMgr ¶
type ChanMgr struct {
// contains filtered or unexported fields
}
func (*ChanMgr) Add ¶
func (c *ChanMgr) Add(rc *ResultChan)
type FormatErrorFunc ¶
type FormatErrorFunc func(err error) gqlerrors.FormattedError
type Option ¶
type Option func(opts *serverOptions)
func WithContextFunc ¶
func WithContextFunc(f ContextFunc) Option
func WithFormatErrorFunc ¶
func WithFormatErrorFunc(f FormatErrorFunc) Option
func WithGraphiQLOptions ¶
func WithGraphiQLOptions(o *ide.GraphiQLOptions) Option
func WithLogger ¶
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 RequestOptions ¶
type RequestOptions struct {
Query string `json:"query" url:"query" schema:"query"`
Variables map[string]interface{} `json:"variables" url:"variables" schema:"variables"`
OperationName string `json:"operationName" url:"operationName" schema:"operationName"`
}
RequestOptions options
func GetRequestOptions ¶
func GetRequestOptions(r *http.Request) *RequestOptions
GetRequestOptions Parses a http.Request into GraphQL request options struct without clearning the body
func NewRequestOptions ¶
func NewRequestOptions(r *http.Request) *RequestOptions
NewRequestOptions Parses a http.Request into GraphQL request options struct
type ResultCallbackFunc ¶
type ResultChan ¶
type ResultChan struct {
// contains filtered or unexported fields
}
type RootValueFunc ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) ContextHandler ¶
ContextHandler provides an entrypoint into executing graphQL queries with a user-provided context.
type WSOptions ¶
type WSOptions struct {
AuthenticateFunc connection.AuthenticateFunc
}
Click to show internal directories.
Click to hide internal directories.