gqlerror

package
v2.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2022 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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) As added in v2.2.1

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

func (List) Error

func (errs List) Error() string

func (List) Is added in v2.2.1

func (errs List) Is(target error) bool

type Location

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

Jump to

Keyboard shortcuts

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