Documentation
¶
Index ¶
Constants ¶
View Source
const ( ContentTypeJSON = "application/json" ContentTypeGraphQL = "application/graphql" ContentTypeFormURLEncoded = "application/x-www-form-urlencoded" )
Shortcuts for the Content-Type header
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
Handler structure
func (*Handler) ContextHandler ¶
ContextHandler provides an entrypoint into executing graphQL queries with a user-provided context.
type RequestParameters ¶
type RequestParameters 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"`
}
RequestParameters from query like " /graphql?query=getUser($id:ID){lastName}&variables={"id":"4"} "
func NewRequestParameters ¶
func NewRequestParameters(r *http.Request) *RequestParameters
NewRequestParameters Parses a http.Request into GraphQL request options struct
type RequestParametersCompatibility ¶
type RequestParametersCompatibility struct {
Query string `json:"query" url:"query" schema:"query"`
Variables string `json:"variables" url:"variables" schema:"variables"`
OperationName string `json:"operationName" url:"operationName" schema:"operationName"`
}
RequestParametersCompatibility represents an workaround for getting`variables` as a JSON string
Click to show internal directories.
Click to hide internal directories.