Documentation ¶
Index ¶
- func FieldASTsToNodeASTs(fieldASTs []*ast.Field) []ast.Node
- func Forbidden(msg string) error
- func InternalError(msg string) error
- func Unauthorized(msg string) error
- func UserInputError(arguments []string) error
- type BadArgumentError
- type Error
- func NewError(message string, nodes []ast.Node, stack string, source *source.Source, ...) *Error
- func NewErrorWithPath(message string, nodes []ast.Node, stack string, source *source.Source, ...) *Error
- func NewLocatedError(err interface{}, nodes []ast.Node) *Error
- func NewSyntaxError(s *source.Source, position int, description string) *Error
- type ExtendedError
- type ForbiddenError
- type FormattedError
- type FormattedErrors
- type InternalServerError
- type UnauthorizedError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InternalError ¶ added in v0.7.10
func Unauthorized ¶ added in v0.7.10
func UserInputError ¶ added in v0.7.10
Types ¶
type BadArgumentError ¶ added in v0.7.10
type BadArgumentError struct {
// contains filtered or unexported fields
}
func (*BadArgumentError) Error ¶ added in v0.7.10
func (e *BadArgumentError) Error() string
func (*BadArgumentError) Extensions ¶ added in v0.7.10
func (*BadArgumentError) Extensions() map[string]interface{}
type Error ¶
type Error struct { Message string Stack string Nodes []ast.Node Source *source.Source Positions []int Locations []location.SourceLocation OriginalError error Path []interface{} }
func NewErrorWithPath ¶ added in v0.7.6
func NewLocatedError ¶
NewLocatedError creates a graphql.Error with location info @deprecated 0.4.18 Already exists in `graphql.NewLocatedError()`
func NewSyntaxError ¶
type ExtendedError ¶ added in v0.7.6
type ForbiddenError ¶ added in v0.7.10
type ForbiddenError struct {
// contains filtered or unexported fields
}
func (*ForbiddenError) Error ¶ added in v0.7.10
func (e *ForbiddenError) Error() string
func (*ForbiddenError) Extensions ¶ added in v0.7.10
func (*ForbiddenError) Extensions() map[string]interface{}
type FormattedError ¶
type FormattedError struct { Message string `json:"message"` Locations []location.SourceLocation `json:"locations"` Path []interface{} `json:"path,omitempty"` Extensions map[string]interface{} `json:"extensions,omitempty"` // contains filtered or unexported fields }
func FormatError ¶
func FormatError(err error) FormattedError
func FormatErrors ¶
func FormatErrors(errs ...error) []FormattedError
func NewFormattedError ¶
func NewFormattedError(message string) FormattedError
func (FormattedError) Error ¶
func (g FormattedError) Error() string
func (FormattedError) OriginalError ¶ added in v0.7.7
func (g FormattedError) OriginalError() error
type FormattedErrors ¶
type FormattedErrors []FormattedError
func (FormattedErrors) Len ¶
func (errs FormattedErrors) Len() int
func (FormattedErrors) Less ¶
func (errs FormattedErrors) Less(i, j int) bool
func (FormattedErrors) Swap ¶
func (errs FormattedErrors) Swap(i, j int)
type InternalServerError ¶ added in v0.7.10
type InternalServerError struct {
// contains filtered or unexported fields
}
func (*InternalServerError) Error ¶ added in v0.7.10
func (e *InternalServerError) Error() string
func (*InternalServerError) Extensions ¶ added in v0.7.10
func (*InternalServerError) Extensions() map[string]interface{}
type UnauthorizedError ¶ added in v0.7.10
type UnauthorizedError struct {
// contains filtered or unexported fields
}
func (*UnauthorizedError) Error ¶ added in v0.7.10
func (e *UnauthorizedError) Error() string
func (*UnauthorizedError) Extensions ¶ added in v0.7.10
func (*UnauthorizedError) Extensions() map[string]interface{}
Click to show internal directories.
Click to hide internal directories.