Documentation ¶
Index ¶
Constants ¶
View Source
const ( ContentTypeJSON = "application/json" ContentTypeGraphQL = "application/graphql" ContentTypeFormURLEncoded = "application/x-www-form-urlencoded" )
Constants
Variables ¶
View Source
var GraphiqlVersion = "0.13.2"
GraphiqlVersion is the current version of GraphiQL
View Source
var PlaygroundVersion = "1.7.20"
PlaygroundVersion the default version to use
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Schema *graphql.Schema Pretty bool GraphiQLConfig *GraphiQLConfig PlaygroundConfig *PlaygroundConfig RootObjectFn RootObjectFn ResultCallbackFn ResultCallbackFn FormatErrorFn func(err error) gqlerrors.FormattedError }
Config configuration
type GraphiQLConfig ¶
GraphiQLConfig a configuration for graphiql
func NewDefaultGraphiQLConfig ¶
func NewDefaultGraphiQLConfig() *GraphiQLConfig
NewDefaultGraphiQLConfig creates a new default config
type Handler ¶
Handler handler
func (*Handler) ContextHandler ¶
ContextHandler provides an entrypoint into executing graphQL queries with a user-provided context.
type PlaygroundConfig ¶
PlaygroundConfig playground configuration
func NewDefaultPlaygroundConfig ¶
func NewDefaultPlaygroundConfig() *PlaygroundConfig
NewDefaultPlaygroundConfig creates a new default config
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 NewRequestOptions ¶
func NewRequestOptions(r *http.Request) *RequestOptions
NewRequestOptions Parses a http.Request into GraphQL request options struct
Click to show internal directories.
Click to hide internal directories.