Documentation ¶
Index ¶
- func NewServer(service factory.ServiceFactory, opts ...OptionFunc) factory.AppServerFactory
- type Handler
- type Option
- type OptionFunc
- func AddDirectiveFunc(directiveName string, handlerFunc types.DirectiveFunc) OptionFunc
- func SetDebugMode(debugMode bool) OptionFunc
- func SetDisableIntrospection(disableIntrospection bool) OptionFunc
- func SetHTTPPort(port uint16) OptionFunc
- func SetJaegerMaxPacketSize(max int) OptionFunc
- func SetRootHTTPHandler(rootHandler http.Handler) OptionFunc
- func SetRootPath(rootPath string) OptionFunc
- func SetRootResolver(resolver interfaces.GraphQLHandler) OptionFunc
- func SetSchemaSource(schema []byte) OptionFunc
- func SetSharedListener(sharedListener cmux.CMux) OptionFunc
- func SetTLSConfig(tlsConfig *tls.Config) OptionFunc
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
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 ConstructHandlerFromService ¶ added in v1.14.5
func ConstructHandlerFromService(service factory.ServiceFactory, opt Option) Handler
ConstructHandlerFromService for create public graphql handler (maybe inject to rest handler)
func NewHandler ¶
NewHandler init new graphql http handler
type Option ¶ added in v1.12.0
type Option struct { DisableIntrospection bool RootPath string // contains filtered or unexported fields }
Option gql server
type OptionFunc ¶ added in v1.7.4
type OptionFunc func(*Option)
OptionFunc type
func AddDirectiveFunc ¶ added in v1.12.0
func AddDirectiveFunc(directiveName string, handlerFunc types.DirectiveFunc) OptionFunc
AddDirectiveFunc option func
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 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 SetRootResolver ¶ added in v1.15.9
func SetRootResolver(resolver interfaces.GraphQLHandler) OptionFunc
SetRootResolver option func
func SetSchemaSource ¶ added in v1.17.9
func SetSchemaSource(schema []byte) OptionFunc
SetSchemaSource option func
func SetSharedListener ¶ added in v1.7.4
func SetSharedListener(sharedListener cmux.CMux) OptionFunc
SetSharedListener option func
func SetTLSConfig ¶ added in v1.17.0
func SetTLSConfig(tlsConfig *tls.Config) OptionFunc
SetTLSConfig option func
Source Files ¶
Click to show internal directories.
Click to hide internal directories.