handlerx

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2023 License: MIT Imports: 23 Imported by: 3

Documentation

Index

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 ArgTypeMap map[string]StringMap

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 (DELETE) Supports

func (h DELETE) Supports(r *http.Request) bool

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 (GET) Supports

func (h GET) Supports(r *http.Request) bool

type GraphqlResponse added in v0.1.14

type GraphqlResponse struct {
	*graphql.Response
	Total *int64 `json:"total,omitempty"`
}

type Options

type Options struct{}

Options responds to http OPTIONS and HEAD requests

func (Options) Do

func (Options) Supports

func (o Options) Supports(r *http.Request) bool

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 (POST) Supports

func (h POST) Supports(r *http.Request) bool

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

type ResponseContext struct {
	context.Context
	// contains filtered or unexported fields
}

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

type StringMap added in v0.0.20

type StringMap map[string]string

1. Global Declaration

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL