@envelop/apollo-server-errors 3.4.0-alpha-26c4ae2.0 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +26 -0
  2. package/package.json +3 -3
package/README.md ADDED
@@ -0,0 +1,26 @@
1
+ ## `@envelop/apollo-server-errors`
2
+
3
+ This plugin exposes the same error structure as `apollo-server`. Use this plugin if you are moving to Envelop, and wish to get a compatibility layer for your errors, to make sure the clients receive the same output.
4
+
5
+ ## Getting Started
6
+
7
+ ```
8
+ yarn add @envelop/apollo-server-errors
9
+ ```
10
+
11
+ ## Usage Example
12
+
13
+ ```ts
14
+ import { envelop } from '@envelop/core';
15
+ import { useApolloServerErrors } from '@envelop/apollo-server-errors';
16
+
17
+ const getEnveloped = envelop({
18
+ plugins: [
19
+ // ... other plugins ...
20
+ useApolloServerErrors({ // All fields are optional, and should match what you pass today to ApolloServer
21
+ debug: true, //
22
+ formatError: () => ...
23
+ }),
24
+ ],
25
+ });
26
+ ```
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@envelop/apollo-server-errors",
3
- "version": "3.4.0-alpha-26c4ae2.0",
3
+ "version": "3.4.0",
4
4
  "sideEffects": false,
5
5
  "peerDependencies": {
6
- "@envelop/core": "2.4.0-alpha-26c4ae2.0",
6
+ "@envelop/core": "^2.4.0",
7
7
  "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0"
8
8
  },
9
9
  "dependencies": {
10
- "apollo-server-errors": "3.3.0"
10
+ "apollo-server-errors": "^3.3.1"
11
11
  },
12
12
  "repository": {
13
13
  "type": "git",