api

package
v0.0.0-...-f2ae4e3 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2022 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GqlHandler

func GqlHandler(gCtx global.Context, loader *loaders.Loaders) func(ctx *fasthttp.RequestCtx)

func New

func New(gCtx global.Context) <-chan struct{}

Types

type Response

type Response struct {
	Error   string `json:"error,omitempty"`
	Message string `json:"message,omitempty"`
	Reason  string `json:"reason,omitempty"`
	ReturnSignal
}

type ReturnSignal

type ReturnSignal struct {
	Status   int `json:"status,omitempty"`
	Response *graphql.Response
}

func ProcessExecution

func ProcessExecution(params *graphql.RawParams, exec graphql.GraphExecutor, baseContext context.Context) ReturnSignal

type Wrapper

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

func NewDefaultWrapper

func NewDefaultWrapper(es graphql.ExecutableSchema) *Wrapper

func NewWrapper

func NewWrapper(es graphql.ExecutableSchema) *Wrapper

func (*Wrapper) AroundFields

func (s *Wrapper) AroundFields(f graphql.FieldMiddleware)

AroundFields is a convenience method for creating an extension that only implements field middleware

func (*Wrapper) AroundOperations

func (s *Wrapper) AroundOperations(f graphql.OperationMiddleware)

AroundOperations is a convenience method for creating an extension that only implements operation middleware

func (*Wrapper) AroundResponses

func (s *Wrapper) AroundResponses(f graphql.ResponseMiddleware)

AroundResponses is a convenience method for creating an extension that only implements response middleware

func (*Wrapper) Process

func (s *Wrapper) Process(ctx context.Context, params graphql.RawParams) (resp Response)

func (*Wrapper) SetErrorPresenter

func (s *Wrapper) SetErrorPresenter(f graphql.ErrorPresenterFunc)

func (*Wrapper) SetQueryCache

func (s *Wrapper) SetQueryCache(cache graphql.Cache)

func (*Wrapper) SetRecoverFunc

func (s *Wrapper) SetRecoverFunc(f graphql.RecoverFunc)

func (*Wrapper) Use

func (s *Wrapper) Use(extension graphql.HandlerExtension)

Jump to

Keyboard shortcuts

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