Documentation ¶
Index ¶
- Constants
- func ConvertToGraphQlBackendValidationError(ctx context.Context, err ExtendedValidationError) *gqlerror.Error
- func ConvertToGraphQlError(ctx context.Context, err ExtendedError) *gqlerror.Error
- func CreateGraphQlError(ctx context.Context, msg string, status string, errCode int) *gqlerror.Error
- func CreateGraphQlErrorWithPlaceholders(ctx context.Context, msg string, status string, errCode int, ...) *gqlerror.Error
- func GetError(errs []error) error
- type ClientError
- type ExtendedError
- type ExtendedValidationError
- type GraphQlServer
- type ModuleConfig
Constants ¶
View Source
const GraphQlPanic application.ActionErrorKey = `GraphQlPanic`
Variables ¶
This section is empty.
Functions ¶
func ConvertToGraphQlBackendValidationError ¶
func ConvertToGraphQlBackendValidationError( ctx context.Context, err ExtendedValidationError, ) *gqlerror.Error
func ConvertToGraphQlError ¶
func ConvertToGraphQlError( ctx context.Context, err ExtendedError, ) *gqlerror.Error
func CreateGraphQlError ¶
Types ¶
type ClientError ¶
type ClientError struct {
// contains filtered or unexported fields
}
func (*ClientError) ErrCode ¶
func (m *ClientError) ErrCode() int
func (*ClientError) Error ¶
func (m *ClientError) Error() string
func (*ClientError) Msg ¶
func (m *ClientError) Msg() string
func (*ClientError) Status ¶
func (m *ClientError) Status() string
type ExtendedError ¶
type ExtendedValidationError ¶
type ExtendedValidationError interface { ExtendedError Errors() map[string]string Extra() map[string]interface{} }
type GraphQlServer ¶
type GraphQlServer struct {
// contains filtered or unexported fields
}
func NewGraphQLServer ¶
func NewGraphQLServer( config *ModuleConfig, logger application.Logger, es graphql.ExecutableSchema, ) *GraphQlServer
func (*GraphQlServer) ApiHandler ¶
func (f *GraphQlServer) ApiHandler() http.HandlerFunc
func (GraphQlServer) GetServer ¶
func (f GraphQlServer) GetServer() *handler.Server
func (*GraphQlServer) PlaygroundHandler ¶
func (f *GraphQlServer) PlaygroundHandler(title string, endpoint string) http.HandlerFunc
type ModuleConfig ¶
type ModuleConfig struct {
// contains filtered or unexported fields
}
func NewModuleConfig ¶
func NewModuleConfig() *ModuleConfig
func (*ModuleConfig) InitConfig ¶
func (s *ModuleConfig) InitConfig(config application.Config) error
func (*ModuleConfig) ModuleRoutes ¶
func (s *ModuleConfig) ModuleRoutes() []application.RouteInfo
func (*ModuleConfig) OnStart ¶
func (s *ModuleConfig) OnStart() error
func (*ModuleConfig) ProvidedServices ¶
func (s *ModuleConfig) ProvidedServices() []interface{}
func (*ModuleConfig) SetContainer ¶
func (s *ModuleConfig) SetContainer(container *dig.Container)
Click to show internal directories.
Click to hide internal directories.