Documentation ¶
Overview ¶
Package playground is a http.Handler hosting the GraphQL Playground application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // PathPrefix is a prefix you intend to put in front of all handlers PathPrefix string // PlaygroundPath is the Path where the playground website should be hosted PlaygroundPath string // GraphqlEndpointPath is the Path where the http Handler for synchronous (Query,Mutation) GraphQL requests should be hosted GraphqlEndpointPath string // GraphQLSubscriptionEndpointPath is the Path where the http Handler for asynchronous (Subscription) GraphQL requests should be hosted GraphQLSubscriptionEndpointPath string }
Config is the configuration Object to instruct ConfigureHandlers on how to setup all the http Handlers for the playground
type HandlerConfig ¶
type HandlerConfig struct { // Path is where the handler should be hosted Path string // Handler is the http.HandlerFunc that should be hosted on the corresponding Path Handler http.HandlerFunc }
HandlerConfig is the configuration Object for playground http Handlers
type Handlers ¶
type Handlers []HandlerConfig
Handlers is an array of HandlerConfig The playground expects that you make all assigned Handlers available on the corresponding Path
type Playground ¶
type Playground struct {
// contains filtered or unexported fields
}
Playground manages the configuration of all HTTP handlers responsible for serving the GraphQL Playground
func (*Playground) Handlers ¶
func (p *Playground) Handlers() (handlers Handlers, err error)
Handlers configures and returns all Handlers for the Playground
Click to show internal directories.
Click to hide internal directories.