@envelop/disable-introspection 2.0.0 → 2.0.1-alpha-7ca7cb8.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 +12 -0
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -18,3 +18,15 @@ const getEnveloped = envelop({
18
18
  plugins: [useDisableIntrospection()],
19
19
  });
20
20
  ```
21
+
22
+ ## Optional configuration
23
+
24
+ The plugin optionally accepts a configuration object:
25
+
26
+ ```
27
+ {
28
+ disableIf?: ({contest, params}) => boolean
29
+ }
30
+ ```
31
+
32
+ - `disableIf`: A function that allow you to evaluate the need to disable introspection, based on the incoming operation. If introspection needs to be disabled/enabled based on the dynamic parameter (GraphQL operation, or, incoming request/headers), use this function to determine when introspection needs to be disabled. Return true for disabling the introspection for the incoming operation, or false to allow introspection.
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@envelop/disable-introspection",
3
- "version": "2.0.0",
3
+ "version": "2.0.1-alpha-7ca7cb8.0",
4
4
  "sideEffects": false,
5
5
  "peerDependencies": {
6
- "@envelop/core": "^1.7.0",
6
+ "@envelop/core": "1.7.2-alpha-7ca7cb8.0",
7
7
  "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0"
8
8
  },
9
9
  "repository": {