runtime

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetadataPrefix = "gqlgateway-"
)

Variables

This section is empty.

Functions

func AnnotateContext

func AnnotateContext(ctx context.Context, req *http.Request) (context.Context, error)

func Context

func Context(ctx context.Context) context.Context

func GrpcTimeout

func GrpcTimeout(ctx context.Context) time.Duration

Types

type ServeMux

type ServeMux struct {
	// contains filtered or unexported fields
}

func NewServeMux

func NewServeMux() (*ServeMux, error)

func (*ServeMux) AddField

func (s *ServeMux) AddField(typename, name string, field *graphql.Field)

func (*ServeMux) AddLoader

func (s *ServeMux) AddLoader(key string, loader dataloader.BatchFunc)

AddLoader TODO: data loader

func (*ServeMux) AddMutation

func (s *ServeMux) AddMutation(name string, field *graphql.Field)

func (*ServeMux) AddObjectType

func (s *ServeMux) AddObjectType(obj *graphql.Object)

func (*ServeMux) AddQuery

func (s *ServeMux) AddQuery(name string, field *graphql.Field)

func (*ServeMux) AddSubscribe

func (s *ServeMux) AddSubscribe(name string, field *graphql.Field)

func (*ServeMux) ServeHTTP

func (s *ServeMux) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*ServeMux) Use

func (s *ServeMux) Use(middlewares ...func(http.Handler) http.Handler)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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