gqlerrors

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainMessage added in v2.3.0

func ContainMessage(expected interface{}) types.GomegaMatcher

ContainMessage succeeds if actual is a GraphQL Error that contains the passed-in message.

func ErrWithGraphQLCode

func ErrWithGraphQLCode(mutateOrQueryName string, code interface{}) *errWithGraphQLCodeMatcher

func ErrWithGraphQLMessage

func ErrWithGraphQLMessage(mutateOrQueryName string, message interface{}) *errWithGraphQLMessageMatcher

func ErrWithGraphQLModule

func ErrWithGraphQLModule(mutateOrQueryName string, module interface{}) *errWithGraphQLModuleMatcher

func ErrWithGraphQLValidate

func ErrWithGraphQLValidate(mutateOrQueryName string, field string, rule string) *errWithGraphQLValidatorMatcher

func HaveCode added in v2.3.0

func HaveCode(expected interface{}) types.GomegaMatcher

HaveCode succeeds if actual is a GraphQL Error that have the passed-in code extension.

func HaveMessage added in v2.3.0

func HaveMessage(expected interface{}) types.GomegaMatcher

HaveMessage succeeds if actual is a GraphQL Error that have the passed-in message extension.

func HaveModule added in v2.3.0

func HaveModule(expected interface{}) types.GomegaMatcher

HaveModule succeeds if actual is a GraphQL Error that have the passed-in module extension.

func HaveValidation added in v2.3.0

func HaveValidation(field string, rules ...string) types.GomegaMatcher

HaveValidation succeeds if actual is a GraphQL Error that have the passed-in field validation errors.

Types

type FormattedError

type FormattedError struct {
	Message    string                 `json:"message"`
	Extensions map[string]interface{} `json:"extensions,omitempty"`
}

Jump to

Keyboard shortcuts

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