gqlerrors

package
v0.7.10 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2020 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FieldASTsToNodeASTs

func FieldASTsToNodeASTs(fieldASTs []*ast.Field) []ast.Node

func Forbidden added in v0.7.10

func Forbidden(msg string) error

func InternalError added in v0.7.10

func InternalError(msg string) error

func Unauthorized added in v0.7.10

func Unauthorized(msg string) error

func UserInputError added in v0.7.10

func UserInputError(arguments []string) error

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 NewError

func NewError(message string, nodes []ast.Node, stack string, source *source.Source, positions []int, origError error) *Error

func NewErrorWithPath added in v0.7.6

func NewErrorWithPath(message string, nodes []ast.Node, stack string, source *source.Source, positions []int, path []interface{}, origError error) *Error

func NewLocatedError

func NewLocatedError(err interface{}, nodes []ast.Node) *Error

NewLocatedError creates a graphql.Error with location info @deprecated 0.4.18 Already exists in `graphql.NewLocatedError()`

func NewSyntaxError

func NewSyntaxError(s *source.Source, position int, description string) *Error

func (Error) Error

func (g Error) Error() string

implements Golang's built-in `error` interface

type ExtendedError added in v0.7.6

type ExtendedError interface {
	error
	Extensions() map[string]interface{}
}

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{}

Jump to

Keyboard shortcuts

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