Version: v2.2.0 Latest Latest

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

Go to latest
Published: Apr 13, 2021 License: MIT Imports: 5 Imported by: 167




This section is empty.


This section is empty.


This section is empty.


type Error

type Error struct {
	Message    string                 `json:"message"`
	Path       ast.Path               `json:"path,omitempty"`
	Locations  []Location             `json:"locations,omitempty"`
	Extensions map[string]interface{} `json:"extensions,omitempty"`
	Rule       string                 `json:"-"`
	// contains filtered or unexported fields

Error is the standard graphql error type described in

func ErrorLocf

func ErrorLocf(file string, line int, col int, message string, args ...interface{}) *Error

func ErrorPathf

func ErrorPathf(path ast.Path, message string, args ...interface{}) *Error

func ErrorPosf

func ErrorPosf(pos *ast.Position, message string, args ...interface{}) *Error

func Errorf

func Errorf(message string, args ...interface{}) *Error

func WrapPath

func WrapPath(path ast.Path, err error) *Error

func (*Error) Error

func (err *Error) Error() string

func (*Error) SetFile

func (err *Error) SetFile(file string)

func (Error) Unwrap added in v2.1.0

func (err Error) Unwrap() error

type List

type List []*Error

func (List) As added in v2.2.0

func (errs List) As(target interface{}) bool

func (List) Error

func (errs List) Error() string

func (List) Is added in v2.2.0

func (errs List) Is(target error) bool

type Location

type Location struct {
	Line   int `json:"line,omitempty"`
	Column int `json:"column,omitempty"`

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL