Documentation ¶
Index ¶
- func NewDefaultServer(es graphql.ExecutableSchema) *handler.Server
- func RegisterPrinter(printer Printer)
- func SetupHTTP2GraphQLMapping(operations StringMap, selections StringMap, arguments ArgTypeMap, ...)
- type ArgTypeMap
- type DELETE
- type GET
- type GraphqlResponse
- type Options
- type POST
- type Printer
- type RESTResponse
- type ResponseContext
- type StringMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDefaultServer ¶
func NewDefaultServer(es graphql.ExecutableSchema) *handler.Server
func RegisterPrinter ¶ added in v0.0.13
func RegisterPrinter(printer Printer)
func SetupHTTP2GraphQLMapping ¶
func SetupHTTP2GraphQLMapping(operations StringMap, selections StringMap, arguments ArgTypeMap, inputTypes ArgTypeMap, typeKinds StringMap)
Types ¶
type ArgTypeMap ¶ added in v0.0.20
type DELETE ¶
type DELETE struct{}
DELETE implements the DELETE side of the default HTTP transport defined in https://github.com/APIs-guru/graphql-over-http#post
func (DELETE) Do ¶
func (h DELETE) Do(w http.ResponseWriter, r *http.Request, exec graphql.GraphExecutor)
type GET ¶
type GET struct{}
GET implements the GET side of the default HTTP transport defined in https://github.com/APIs-guru/graphql-over-http#get
func (GET) Do ¶
func (h GET) Do(w http.ResponseWriter, r *http.Request, exec graphql.GraphExecutor)
type GraphqlResponse ¶ added in v0.1.14
type Options ¶
type Options struct{}
Options responds to http OPTIONS and HEAD requests
func (Options) Do ¶
func (o Options) Do(w http.ResponseWriter, r *http.Request, exec graphql.GraphExecutor)
type POST ¶
type POST struct{}
POST implements the POST side of the default HTTP transport defined in https://github.com/APIs-guru/graphql-over-http#post
func (POST) Do ¶
func (h POST) Do(w http.ResponseWriter, r *http.Request, exec graphql.GraphExecutor)
type Printer ¶ added in v0.0.13
type Printer interface { Println(v ...interface{}) Printf(format string, v ...interface{}) }
type RESTResponse ¶ added in v0.0.9
type RESTResponse struct { Code int `json:"code"` CodeStr string `json:"codestr,omitempty"` Message string `json:"message,omitempty"` Data json.RawMessage `json:"data"` Total *int64 `json:"total,omitempty"` }
RESTResponse is response struct for RESTful API call @see graphql.Response
type ResponseContext ¶ added in v0.1.14
func GetResponseContext ¶ added in v0.1.14
func GetResponseContext(ctx context.Context) *ResponseContext
func (*ResponseContext) SetTotal ¶ added in v0.1.14
func (c *ResponseContext) SetTotal(total int64)
func (*ResponseContext) Total ¶ added in v0.1.14
func (c *ResponseContext) Total() *int64
Click to show internal directories.
Click to hide internal directories.