apollo-errors v1.9.0 is a utility for creating machine-readable custom GraphQL errors for use with Apollo Server. It allows defining typed errors with structured data and internal logging data that can be separated from the client-facing response. The package provides createError() to define error classes, formatError() for server error formatting, and isInstance() for checking error types. It ships TypeScript definitions. The project appears to be in maintenance mode with no recent updates. Compared to alternatives like graphql-errors, it offers explicit data and internalData separation and built-in formatting for Apollo Server.
No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
createError is a named export, not default.
Both ESM and CJS are supported. CJS require works but named imports are preferred for tree-shaking.
The function is exported as isInstance, not isApolloErrorInstance (which is used in documentation examples but not the actual export). Check your imports.
Shows how to define a custom error, configure Apollo Server to use formatError, and log internal data.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.