Documentation ¶
Overview ¶
You can use the "packr clean" command to clean up this, and any other packr generated files.
Index ¶
Constants ¶
View Source
const ( ContentTypeJSON = "application/json" ContentTypeGraphQL = "application/graphql" ContentTypeFormURLEncoded = "application/x-www-form-urlencoded" )
Variables ¶
View Source
var ( Endpoint string = "" SubscriptionEndpoint string = "" BasePath string = "" )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Schema *graphql.Schema Pretty bool GraphiQL bool Playground bool RootObjectFn RootObjectFn ResultCallbackFn ResultCallbackFn FormatErrorFn func(err error) gqlerrors.FormattedError }
type Handler ¶
func (*Handler) ServeHTTP ¶
func (h *Handler) ServeHTTP(reqCtx *fasthttp.RequestCtx)
ServeHTTP provides an entrypoint into executing graphQL queries.
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"` }
func NewRequestOptions ¶
func NewRequestOptions(r *fasthttp.Request) *RequestOptions
NewRequestOptions Parses a http.Request into GraphQL request options struct
type ResultCallbackFn ¶ added in v0.2.2
type RootObjectFn ¶ added in v0.2.2
type RootObjectFn func(reqCtx *fasthttp.RequestCtx) map[string]interface{}
RootObjectFn allows a user to generate a RootObject per request
Click to show internal directories.
Click to hide internal directories.