Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
func Handler(schema Schema) http.HandlerFunc
Handler creates an HTTP handler for GraphQL requests Works with both net/http and Gin (via gin.WrapH)
func PlaygroundHandler ¶
func PlaygroundHandler(endpoint string) http.HandlerFunc
PlaygroundHandler creates an HTTP handler that serves a GraphQL playground Uses Apollo Sandbox by default (most modern and stable)
func PlaygroundHandlerWithType ¶
func PlaygroundHandlerWithType(endpoint string, playgroundType PlaygroundType) http.HandlerFunc
PlaygroundHandlerWithType creates a playground handler with a specific type
Types ¶
type PlaygroundType ¶
type PlaygroundType string
PlaygroundType determines which playground interface to use
const ( PlaygroundTypeApolloSandbox PlaygroundType = "apollo" // Apollo Sandbox (recommended) PlaygroundTypeGraphiQL PlaygroundType = "graphiql" // GraphiQL (stable) PlaygroundTypePlayground PlaygroundType = "playground" // GraphQL Playground (legacy) )
Click to show internal directories.
Click to hide internal directories.