Documentation
¶
Index ¶
Constants ¶
View Source
const ( ContentTypeJSON = "application/json" ContentTypeGraphQL = "application/graphql" ContentTypeFormURLEncoded = "application/x-www-form-urlencoded" )
Constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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"`
}
RequestOptions options
func GetRequestOptions ¶
func GetRequestOptions(r *http.Request) *RequestOptions
GetRequestOptions Parses a http.Request into GraphQL request options struct without clearning the body
func NewRequestOptions ¶
func NewRequestOptions(r *http.Request) *RequestOptions
NewRequestOptions Parses a http.Request into GraphQL request options struct
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) ContextHandler ¶
ContextHandler provides an entrypoint into executing graphQL queries with a user-provided context.
Click to show internal directories.
Click to hide internal directories.