handle-graphql-errors-js
v1.0.2
Published
This package provides a helper function that allows errors to be surfaced in a more meaningful way after they are routed through the proxy.
Downloads
2
Readme
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]