Back to godoc.org

Package gqlerror

v2.1.0
Latest Go to latest

The latest major version is v2.

Published: Sep 9, 2020 | License: MIT | Module: github.com/vektah/gqlparser/v2

Index

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 https://facebook.github.io/graphql/draft/#sec-Errors

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

func (err Error) Unwrap() error

type List

type List []*Error

func (List) Error

func (errs List) Error() string

type Location

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

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier