https://github.com/getstation/apollo-server-plugin-error
apollo-server plugin that handle errors
https://github.com/getstation/apollo-server-plugin-error
Last synced: about 2 months ago
JSON representation
apollo-server plugin that handle errors
- Host: GitHub
- URL: https://github.com/getstation/apollo-server-plugin-error
- Owner: getstation
- License: mit
- Created: 2020-04-07T12:18:06.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-06-25T11:47:38.000Z (almost 4 years ago)
- Last Synced: 2025-03-13T03:43:34.648Z (over 1 year ago)
- Language: TypeScript
- Size: 34.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Usage
```typescript
import { ApolloServerPluginError } from 'apollo-server-plugin-error';
...
const server = new ApolloServer({
...,
plugins: [
new ApolloServerPluginError((error) => {
// here you handle the error as you want
console.error(error);
})
],
});
```
## Install
```shell script
# via npm
npm install apollo-server-plugin-error
# or via yarn
yarn add apollo-server-plugin-error
```