operationreport

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package operationreport helps generating the errors object for a GraphQL Operation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExternalError

type ExternalError struct {
	Message   string                   `json:"message"`
	Path      ast.Path                 `json:"path"`
	Locations []graphqlerrors.Location `json:"locations"`
}

func ErrAnonymousOperationMustBeTheOnlyOperationInDocument

func ErrAnonymousOperationMustBeTheOnlyOperationInDocument() (err ExternalError)

func ErrArgumentMustBeUnique

func ErrArgumentMustBeUnique(argName ast.ByteSlice) (err ExternalError)

func ErrArgumentNotDefinedOnNode

func ErrArgumentNotDefinedOnNode(argName, node ast.ByteSlice) (err ExternalError)

func ErrArgumentOnFieldMustNotBeNull

func ErrArgumentOnFieldMustNotBeNull(argName, fieldName ast.ByteSlice) (err ExternalError)

func ErrArgumentRequiredOnField

func ErrArgumentRequiredOnField(argName, fieldName ast.ByteSlice) (err ExternalError)

func ErrDifferingFieldsOnPotentiallySameType

func ErrDifferingFieldsOnPotentiallySameType(objectName ast.ByteSlice) (err ExternalError)

func ErrDirectiveMustBeUniquePerLocation

func ErrDirectiveMustBeUniquePerLocation(directiveName ast.ByteSlice) (err ExternalError)

func ErrDirectiveNotAllowedOnNode

func ErrDirectiveNotAllowedOnNode(directiveName, nodeKindName ast.ByteSlice) (err ExternalError)

func ErrDirectiveUndefined

func ErrDirectiveUndefined(directiveName ast.ByteSlice) (err ExternalError)

func ErrDocumentDoesntContainExecutableOperation

func ErrDocumentDoesntContainExecutableOperation() (err ExternalError)

func ErrEntitiesMustNotBeDuplicated

func ErrEntitiesMustNotBeDuplicated(typeName string) (err ExternalError)

func ErrEntityExtensionMustHaveKeyDirective

func ErrEntityExtensionMustHaveKeyDirective(typeName string) (err ExternalError)

func ErrEnumTypeUndefined

func ErrEnumTypeUndefined(enumName ast.ByteSlice) (err ExternalError)

func ErrEnumValueNameMustBeUnique

func ErrEnumValueNameMustBeUnique(enumName, enumValueName ast.ByteSlice) (err ExternalError)

func ErrExtensionOrphansMustResolveInSupergraph

func ErrExtensionOrphansMustResolveInSupergraph(extensionNameBytes []byte) (err ExternalError)

func ErrExtensionWithKeyDirectiveMustExtendEntity

func ErrExtensionWithKeyDirectiveMustExtendEntity(typeName string) (err ExternalError)

func ErrFieldNameMustBeUniqueOnType

func ErrFieldNameMustBeUniqueOnType(fieldName, typeName ast.ByteSlice) (err ExternalError)

func ErrFieldSelectionOnScalar

func ErrFieldSelectionOnScalar(fieldName, scalarTypeName ast.ByteSlice) (err ExternalError)

func ErrFieldSelectionOnUnion

func ErrFieldSelectionOnUnion(fieldName, unionName ast.ByteSlice) (err ExternalError)

func ErrFieldUndefinedOnType

func ErrFieldUndefinedOnType(fieldName, typeName ast.ByteSlice) (err ExternalError)

func ErrFieldsConflict

func ErrFieldsConflict(objectName, leftType, rightType ast.ByteSlice) (err ExternalError)

func ErrFragmentDefinedButNotUsed

func ErrFragmentDefinedButNotUsed(fragmentName ast.ByteSlice) (err ExternalError)

func ErrFragmentDefinitionMustBeUnique

func ErrFragmentDefinitionMustBeUnique(fragmentName ast.ByteSlice) (err ExternalError)

func ErrFragmentDefinitionOnTypeDisallowed

func ErrFragmentDefinitionOnTypeDisallowed(fragmentName, onTypeName ast.ByteSlice) (err ExternalError)

func ErrFragmentSpreadFormsCycle

func ErrFragmentSpreadFormsCycle(spreadName ast.ByteSlice) (err ExternalError)

func ErrFragmentUndefined

func ErrFragmentUndefined(fragmentName ast.ByteSlice) (err ExternalError)

func ErrImplementingTypeDoesNotHaveFields

func ErrImplementingTypeDoesNotHaveFields(typeName ast.ByteSlice) (err ExternalError)

func ErrInlineFragmentOnTypeDisallowed

func ErrInlineFragmentOnTypeDisallowed(onTypeName ast.ByteSlice) (err ExternalError)

func ErrInlineFragmentOnTypeMismatchEnclosingType

func ErrInlineFragmentOnTypeMismatchEnclosingType(fragmentTypeName, enclosingTypeName ast.ByteSlice) (err ExternalError)

func ErrInputObjectTypeUndefined

func ErrInputObjectTypeUndefined(inputObjectName ast.ByteSlice) (err ExternalError)

func ErrInterfaceTypeUndefined

func ErrInterfaceTypeUndefined(interfaceName ast.ByteSlice) (err ExternalError)

func ErrMissingFieldSelectionOnNonScalar

func ErrMissingFieldSelectionOnNonScalar(fieldName, enclosingTypeName ast.ByteSlice) (err ExternalError)

func ErrOnlyOneMutationTypeAllowed

func ErrOnlyOneMutationTypeAllowed() (err ExternalError)

func ErrOnlyOneQueryTypeAllowed

func ErrOnlyOneQueryTypeAllowed() (err ExternalError)

func ErrOnlyOneSubscriptionTypeAllowed

func ErrOnlyOneSubscriptionTypeAllowed() (err ExternalError)

func ErrOperationNameMustBeUnique

func ErrOperationNameMustBeUnique(operationName ast.ByteSlice) (err ExternalError)

func ErrOperationWithProvidedOperationNameNotFound

func ErrOperationWithProvidedOperationNameNotFound(operationName string) (err ExternalError)

func ErrRequiredOperationNameIsMissing

func ErrRequiredOperationNameIsMissing() (err ExternalError)

func ErrResponseOfDifferingTypesMustBeOfSameShape

func ErrResponseOfDifferingTypesMustBeOfSameShape(leftObjectName, rightObjectName ast.ByteSlice) (err ExternalError)

func ErrScalarTypeUndefined

func ErrScalarTypeUndefined(scalarName ast.ByteSlice) (err ExternalError)

func ErrSharedTypesMustBeIdenticalToFederate

func ErrSharedTypesMustBeIdenticalToFederate(typeName string) (err ExternalError)

func ErrSharedTypesMustNotBeExtended

func ErrSharedTypesMustNotBeExtended(typeName string) (err ExternalError)

func ErrSubscriptionMustOnlyHaveOneRootSelection

func ErrSubscriptionMustOnlyHaveOneRootSelection(subscriptionName ast.ByteSlice) (err ExternalError)

func ErrTransitiveInterfaceExtensionImplementingWithoutBody

func ErrTransitiveInterfaceExtensionImplementingWithoutBody(interfaceExtensionName ast.ByteSlice) (err ExternalError)

func ErrTransitiveInterfaceNotImplemented

func ErrTransitiveInterfaceNotImplemented(typeName, transitiveInterfaceName ast.ByteSlice) (err ExternalError)

func ErrTypeBodyMustNotBeEmpty

func ErrTypeBodyMustNotBeEmpty(definitionType, typeName string) (err ExternalError)

func ErrTypeDoesNotImplementFieldFromInterface

func ErrTypeDoesNotImplementFieldFromInterface(typeName, interfaceName, fieldName ast.ByteSlice) (err ExternalError)

func ErrTypeNameMustBeUnique

func ErrTypeNameMustBeUnique(typeName ast.ByteSlice) (err ExternalError)

func ErrTypeUndefined

func ErrTypeUndefined(typeName ast.ByteSlice) (err ExternalError)

func ErrTypesForFieldMismatch

func ErrTypesForFieldMismatch(objectName, leftType, rightType ast.ByteSlice) (err ExternalError)

func ErrUnionMembersMustBeUnique

func ErrUnionMembersMustBeUnique(unionName, memberName ast.ByteSlice) (err ExternalError)

func ErrUnionTypeUndefined

func ErrUnionTypeUndefined(unionName ast.ByteSlice) (err ExternalError)

func ErrValueDoesntSatisfyInputValueDefinition

func ErrValueDoesntSatisfyInputValueDefinition(value, inputType ast.ByteSlice) (err ExternalError)

func ErrVariableDefinedButNeverUsed

func ErrVariableDefinedButNeverUsed(variableName, operationName ast.ByteSlice) (err ExternalError)

func ErrVariableMustBeUnique

func ErrVariableMustBeUnique(variableName, operationName ast.ByteSlice) (err ExternalError)

func ErrVariableNotDefinedOnArgument

func ErrVariableNotDefinedOnArgument(variableName, argumentName ast.ByteSlice) (err ExternalError)

func ErrVariableNotDefinedOnOperation

func ErrVariableNotDefinedOnOperation(variableName, operationName ast.ByteSlice) (err ExternalError)

func ErrVariableOfTypeIsNoValidInputValue

func ErrVariableOfTypeIsNoValidInputValue(variableName, ofTypeName ast.ByteSlice) (err ExternalError)

type Report

type Report struct {
	InternalErrors []error
	ExternalErrors []ExternalError
}

func (*Report) AddExternalError

func (r *Report) AddExternalError(gqlError ExternalError)

func (*Report) AddInternalError

func (r *Report) AddInternalError(err error)

func (Report) Error

func (r Report) Error() string

func (*Report) HasErrors

func (r *Report) HasErrors() bool

func (*Report) Reset

func (r *Report) Reset()

Jump to

Keyboard shortcuts

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