@envelop/depth-limit 2.0.0-alpha-4ba70ab.0 → 2.0.0-alpha-d0d0776.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.
- package/index.js +5 -3
- package/package.json +19 -7
package/index.js
CHANGED
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const depthLimit = require('graphql-depth-limit');
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
+
|
|
9
|
+
const depthLimit__default = /*#__PURE__*/_interopDefaultLegacy(depthLimit);
|
|
8
10
|
|
|
9
11
|
const useDepthLimit = (config) => {
|
|
10
12
|
const ignore = config.ignore || [];
|
|
11
|
-
const checkFn =
|
|
13
|
+
const checkFn = depthLimit__default["default"](config.maxDepth, { ignore });
|
|
12
14
|
return {
|
|
13
15
|
onValidate({ addValidationRule }) {
|
|
14
16
|
addValidationRule(checkFn);
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@envelop/depth-limit",
|
|
3
|
-
"version": "2.0.0-alpha-
|
|
3
|
+
"version": "2.0.0-alpha-d0d0776.0",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@envelop/core": "
|
|
6
|
+
"@envelop/core": "3.0.0-alpha-d0d0776.0",
|
|
7
7
|
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
14
|
-
"url": "https://github.com/
|
|
14
|
+
"url": "https://github.com/n1ru4l/envelop.git",
|
|
15
15
|
"directory": "packages/plugins/depth-limit"
|
|
16
16
|
},
|
|
17
17
|
"author": "Dotan Simha <dotansimha@gmail.com>",
|
|
@@ -24,12 +24,24 @@
|
|
|
24
24
|
},
|
|
25
25
|
"exports": {
|
|
26
26
|
".": {
|
|
27
|
-
"require":
|
|
28
|
-
|
|
27
|
+
"require": {
|
|
28
|
+
"default": "./index.js",
|
|
29
|
+
"types": "./index.d.ts"
|
|
30
|
+
},
|
|
31
|
+
"import": {
|
|
32
|
+
"default": "./index.mjs",
|
|
33
|
+
"types": "./index.d.ts"
|
|
34
|
+
}
|
|
29
35
|
},
|
|
30
36
|
"./*": {
|
|
31
|
-
"require":
|
|
32
|
-
|
|
37
|
+
"require": {
|
|
38
|
+
"default": "./*.js",
|
|
39
|
+
"types": "./*.d.ts"
|
|
40
|
+
},
|
|
41
|
+
"import": {
|
|
42
|
+
"default": "./*.mjs",
|
|
43
|
+
"types": "./*.d.ts"
|
|
44
|
+
}
|
|
33
45
|
},
|
|
34
46
|
"./package.json": "./package.json"
|
|
35
47
|
}
|