gqlerrors

package
v0.4.18 Latest Latest
Warning

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

Go to latest
Published: May 30, 2016 License: MIT Imports: 8 Imported by: 29

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FieldASTsToNodeASTs

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

Types

type Error

type Error struct {
	Message       string
	Stack         string
	Nodes         []ast.Node
	Source        *source.Source
	Positions     []int
	Locations     []location.SourceLocation
	OriginalError error
}

func NewError

func NewError(message string, nodes []ast.Node, stack string, source *source.Source, positions []int, 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 FormattedError

type FormattedError struct {
	Message   string                    `json:"message"`
	Locations []location.SourceLocation `json:"locations"`
}

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

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)

Jump to

Keyboard shortcuts

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