handle-graphql-errors-js
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

handleGraphQLErrors

This package provides a helper function that allows errors to be surfaced in a more meaningful way after they are routed through the proxy.

The graphql proxy modifies errors from the connected service due to a bug in Apollo. As a workaround, we are able to add an "originalErrors" property in the graphql error's extensions object that has that otherwise lost data.

Local Development

Below is a list of commands you will probably find useful.

npm start

Runs the project in development/watch mode. Your project will be rebuilt upon changes. TSDX has a special logger for you convenience. Error messages are pretty printed and formatted for compatibility VS Code's Problems tab.

npm run build or yarn build

Bundles the package to the dist folder. The package is optimized and bundled with Rollup into multiple formats (CommonJS, UMD, and ES Module).

npm test or yarn test

Runs the test watcher (Jest) in an interactive mode. By default, runs tests related to files changed since the last commit.

This package was created using (tsdx)[https://github.com/jaredpalmer/tsdx]

Readme

Keywords

none

Package Sidebar

Install

npm i handle-graphql-errors-js

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

38.2 kB

Total Files

13

Last publish

Collaborators

  • julianjurai