Documentation ¶
Overview ¶
Package operationreport helps generating the errors object for a GraphQL Operation.
Index ¶
- func ExternalErrorMessage(err error, formatFunction FormatExternalErrorMessage) (message string, ok bool)
- func UnwrappedErrorMessage(err error) string
- type ExternalError
- func ErrAnonymousOperationMustBeTheOnlyOperationInDocument() (err ExternalError)
- func ErrArgumentMustBeUnique(argName ast.ByteSlice) (err ExternalError)
- func ErrArgumentNotDefinedOnNode(argName, node ast.ByteSlice) (err ExternalError)
- func ErrArgumentOnFieldMustNotBeNull(argName, fieldName ast.ByteSlice) (err ExternalError)
- func ErrArgumentRequiredOnField(argName, fieldName ast.ByteSlice) (err ExternalError)
- func ErrDifferingFieldsOnPotentiallySameType(objectName ast.ByteSlice) (err ExternalError)
- func ErrDirectiveMustBeUniquePerLocation(directiveName ast.ByteSlice) (err ExternalError)
- func ErrDirectiveNotAllowedOnNode(directiveName, nodeKindName ast.ByteSlice) (err ExternalError)
- func ErrDirectiveUndefined(directiveName ast.ByteSlice) (err ExternalError)
- func ErrDocumentDoesntContainExecutableOperation() (err ExternalError)
- func ErrEntitiesMustNotBeDuplicated(typeName string) (err ExternalError)
- func ErrEntityExtensionMustHaveKeyDirective(typeName string) (err ExternalError)
- func ErrEnumTypeUndefined(enumName ast.ByteSlice) (err ExternalError)
- func ErrEnumValueNameMustBeUnique(enumName, enumValueName ast.ByteSlice) (err ExternalError)
- func ErrExtensionOrphansMustResolveInSupergraph(extensionNameBytes []byte) (err ExternalError)
- func ErrExtensionWithKeyDirectiveMustExtendEntity(typeName string) (err ExternalError)
- func ErrFieldNameMustBeUniqueOnType(fieldName, typeName ast.ByteSlice) (err ExternalError)
- func ErrFieldSelectionOnScalar(fieldName, scalarTypeName ast.ByteSlice) (err ExternalError)
- func ErrFieldSelectionOnUnion(fieldName, unionName ast.ByteSlice) (err ExternalError)
- func ErrFieldUndefinedOnType(fieldName, typeName ast.ByteSlice) (err ExternalError)
- func ErrFieldsConflict(objectName, leftType, rightType ast.ByteSlice) (err ExternalError)
- func ErrFragmentDefinedButNotUsed(fragmentName ast.ByteSlice) (err ExternalError)
- func ErrFragmentDefinitionMustBeUnique(fragmentName ast.ByteSlice) (err ExternalError)
- func ErrFragmentDefinitionOnTypeDisallowed(fragmentName, onTypeName ast.ByteSlice) (err ExternalError)
- func ErrFragmentSpreadFormsCycle(spreadName ast.ByteSlice) (err ExternalError)
- func ErrFragmentUndefined(fragmentName ast.ByteSlice) (err ExternalError)
- func ErrImplementingTypeDoesNotHaveFields(typeName ast.ByteSlice) (err ExternalError)
- func ErrInlineFragmentOnTypeDisallowed(onTypeName ast.ByteSlice) (err ExternalError)
- func ErrInlineFragmentOnTypeMismatchEnclosingType(fragmentTypeName, enclosingTypeName ast.ByteSlice) (err ExternalError)
- func ErrInputObjectTypeUndefined(inputObjectName ast.ByteSlice) (err ExternalError)
- func ErrInterfaceTypeUndefined(interfaceName ast.ByteSlice) (err ExternalError)
- func ErrMissingFieldSelectionOnNonScalar(fieldName, enclosingTypeName ast.ByteSlice) (err ExternalError)
- func ErrOnlyOneMutationTypeAllowed() (err ExternalError)
- func ErrOnlyOneQueryTypeAllowed() (err ExternalError)
- func ErrOnlyOneSubscriptionTypeAllowed() (err ExternalError)
- func ErrOperationNameMustBeUnique(operationName ast.ByteSlice) (err ExternalError)
- func ErrOperationWithProvidedOperationNameNotFound(operationName string) (err ExternalError)
- func ErrRequiredOperationNameIsMissing() (err ExternalError)
- func ErrResponseOfDifferingTypesMustBeOfSameShape(leftObjectName, rightObjectName ast.ByteSlice) (err ExternalError)
- func ErrScalarTypeUndefined(scalarName ast.ByteSlice) (err ExternalError)
- func ErrSharedTypesMustBeIdenticalToFederate(typeName string) (err ExternalError)
- func ErrSharedTypesMustNotBeExtended(typeName string) (err ExternalError)
- func ErrSubscriptionMustOnlyHaveOneRootSelection(subscriptionName ast.ByteSlice) (err ExternalError)
- func ErrTransitiveInterfaceExtensionImplementingWithoutBody(interfaceExtensionName ast.ByteSlice) (err ExternalError)
- func ErrTransitiveInterfaceNotImplemented(typeName, transitiveInterfaceName ast.ByteSlice) (err ExternalError)
- func ErrTypeBodyMustNotBeEmpty(definitionType, typeName string) (err ExternalError)
- func ErrTypeDoesNotImplementFieldFromInterface(typeName, interfaceName, fieldName ast.ByteSlice) (err ExternalError)
- func ErrTypeNameMustBeUnique(typeName ast.ByteSlice) (err ExternalError)
- func ErrTypeUndefined(typeName ast.ByteSlice) (err ExternalError)
- func ErrTypesForFieldMismatch(objectName, leftType, rightType ast.ByteSlice) (err ExternalError)
- func ErrUnionMembersMustBeUnique(unionName, memberName ast.ByteSlice) (err ExternalError)
- func ErrUnionTypeUndefined(unionName ast.ByteSlice) (err ExternalError)
- func ErrValueDoesntSatisfyInputValueDefinition(value, inputType ast.ByteSlice) (err ExternalError)
- func ErrVariableDefinedButNeverUsed(variableName, operationName ast.ByteSlice) (err ExternalError)
- func ErrVariableMustBeUnique(variableName, operationName ast.ByteSlice) (err ExternalError)
- func ErrVariableNotDefinedOnArgument(variableName, argumentName ast.ByteSlice) (err ExternalError)
- func ErrVariableNotDefinedOnOperation(variableName, operationName ast.ByteSlice) (err ExternalError)
- func ErrVariableOfTypeIsNoValidInputValue(variableName, ofTypeName ast.ByteSlice) (err ExternalError)
- type FormatExternalErrorMessage
- type Report
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExternalErrorMessage ¶ added in v1.53.0
func ExternalErrorMessage(err error, formatFunction FormatExternalErrorMessage) (message string, ok bool)
func UnwrappedErrorMessage ¶ added in v1.53.0
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 FormatExternalErrorMessage ¶ added in v1.53.0
type Report ¶
type Report struct { InternalErrors []error ExternalErrors []ExternalError }
func (*Report) AddExternalError ¶
func (r *Report) AddExternalError(gqlError ExternalError)
func (*Report) AddInternalError ¶
Click to show internal directories.
Click to hide internal directories.