Documentation ¶
Index ¶
- Constants
- func NewDefaultServer(es graphql.ExecutableSchema) *handler.Server
- func RegisterPrinter(printer Printer)
- func SetupHTTP2GraphQLMapping(operation RESTOperationMappingType, selection RESTSelectionMappingType, ...)
- type ArgNameArgTypePair
- type DELETE
- type ErrorCode
- type GET
- type Options
- type POST
- type Printer
- type RESTArgumentsMappingType
- type RESTOperationMappingType
- type RESTResponse
- type RESTSelectionMappingType
Constants ¶
View Source
const ( ErrDecodeJson = 422 ErrInvalidParam = 400 )
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(operation RESTOperationMappingType, selection RESTSelectionMappingType, arguments RESTArgumentsMappingType, argInputs RESTArgumentsMappingType)
Types ¶
type ArgNameArgTypePair ¶ added in v0.0.9
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 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 RESTArgumentsMappingType ¶ added in v0.0.9
type RESTArgumentsMappingType map[string]ArgNameArgTypePair
GraphQL Operation => Operation Arguments Pair of <ArgName,ArgType>
type RESTOperationMappingType ¶ added in v0.0.9
1. Global Declaration REST URL => GraphQL Operation
type RESTResponse ¶ added in v0.0.9
type RESTResponse struct { Code int `json:"code"` Message string `json:"message,omitempty"` Data json.RawMessage `json:"data"` }
RESTResponse is response struct for RESTful API call @see graphql.Response
type RESTSelectionMappingType ¶ added in v0.0.9
GraphQL Operation => Fields Selection
Click to show internal directories.
Click to hide internal directories.