graphqlserver

package
v1.7.8 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(service factory.ServiceFactory, opts ...OptionFunc) factory.AppServerFactory

NewServer create new GraphQL server

func SetRootSubscription

func SetRootSubscription(subsRootResolver interface{})

SetRootSubscription public function this public method made because cannot create dynamic method for embedded struct (issue https://github.com/golang/go/issues/15924) and subscription in graphql cannot subscribe to at most one subscription at a time

Types

type Handler

type Handler interface {
	ServeGraphQL() http.HandlerFunc
	ServePlayground(resp http.ResponseWriter, req *http.Request)
	ServeVoyager(resp http.ResponseWriter, req *http.Request)
}

Handler interface

func NewHandler

func NewHandler(service factory.ServiceFactory, disableIntrospection bool) Handler

NewHandler for create public graphql handler (maybe inject to rest handler)

type OptionFunc added in v1.7.4

type OptionFunc func(*option)

OptionFunc type

func SetDebugMode added in v1.7.4

func SetDebugMode(debugMode bool) OptionFunc

SetDebugMode option func

func SetDisableIntrospection added in v1.7.4

func SetDisableIntrospection(disableIntrospection bool) OptionFunc

SetDisableIntrospection option func

func SetHTTPPort added in v1.7.4

func SetHTTPPort(port uint16) OptionFunc

SetHTTPPort option func

func SetJaegerMaxPacketSize added in v1.7.4

func SetJaegerMaxPacketSize(max int) OptionFunc

SetJaegerMaxPacketSize option func

func SetRootHTTPHandler added in v1.7.4

func SetRootHTTPHandler(rootHandler http.Handler) OptionFunc

SetRootHTTPHandler option func

func SetRootPath added in v1.7.4

func SetRootPath(rootPath string) OptionFunc

SetRootPath option func

func SetSharedListener added in v1.7.4

func SetSharedListener(sharedListener cmux.CMux) OptionFunc

SetSharedListener option func

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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