interface GraphqlFormattedError
Since 0.1.0

Formatted GraphQL error as returned to the client.

This matches the GraphQL-over-HTTP spec shape. The plugin masks internal errors before formatting.

Properties

message: string

Human-readable error message.

optional
locations: Array<{ line: number; column: number; }>

Optional locations in the query document.

optional
path: Array<string | number>

Optional path to the field where the error occurred.

optional
extensions: Record<string, unknown>

Optional extensions for application-specific error codes.

Usage

import { type GraphqlFormattedError } from "graphql-plugin/src/index.ts";