Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromContext ¶
FromContext extracts the *gin.Context from a resolver's context.Context. Returns the gin.Context and true if found, or nil and false otherwise.
func Handler ¶
func Handler(schema gql.Schema) gin.HandlerFunc
Handler returns a gin.HandlerFunc that executes GraphQL queries against the given schema. Supports POST (JSON body) and GET (query parameters).
POST body format:
{"query": "...", "variables": {...}, "operationName": "..."}
GET query parameters: ?query=...&variables={...}&operationName=...
Responses follow the GraphQL over HTTP specification:
{"data": ..., "errors": [...]}
func Playground ¶
func Playground(title, endpoint string) gin.HandlerFunc
Playground returns a gin.HandlerFunc that serves the GraphiQL IDE. title appears in the browser tab; endpoint is the URL of the GraphQL handler (e.g., "/graphql").
Types ¶
Click to show internal directories.
Click to hide internal directories.