@graphql-eslint/eslint-plugin 4.0.0-alpha.13 → 4.0.0-alpha.14
Sign up to get free protection for your applications and to get access to all the features.
package/cjs/meta.js
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
|
5
5
|
|
6
6
|
|
7
|
+
|
7
8
|
var _graphql = require('graphql');
|
8
9
|
var _lodashlowercase = require('lodash.lowercase'); var _lodashlowercase2 = _interopRequireDefault(_lodashlowercase);
|
9
10
|
var _cachejs = require('../../cache.js');
|
@@ -67,10 +68,8 @@ function getReachableTypes(schema) {
|
|
67
68
|
for (const node of schema.getDirectives())
|
68
69
|
if (node.locations.some((location) => RequestDirectiveLocations.has(location))) {
|
69
70
|
reachableTypes.add(node.name);
|
70
|
-
for (const arg of node.args)
|
71
|
-
|
72
|
-
argTypeName && reachableTypes.add(argTypeName);
|
73
|
-
}
|
71
|
+
for (const arg of node.args)
|
72
|
+
reachableTypes.add(_graphql.getNamedType.call(void 0, arg.type).name);
|
74
73
|
}
|
75
74
|
return reachableTypesCache.set(schema, reachableTypes), reachableTypes;
|
76
75
|
}
|
package/esm/meta.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import "../../chunk-UIAXBAMD.js";
|
2
2
|
import {
|
3
3
|
DirectiveLocation,
|
4
|
+
getNamedType,
|
4
5
|
isInterfaceType,
|
5
6
|
Kind,
|
6
7
|
visit
|
@@ -67,10 +68,8 @@ function getReachableTypes(schema) {
|
|
67
68
|
for (const node of schema.getDirectives())
|
68
69
|
if (node.locations.some((location) => RequestDirectiveLocations.has(location))) {
|
69
70
|
reachableTypes.add(node.name);
|
70
|
-
for (const arg of node.args)
|
71
|
-
|
72
|
-
argTypeName && reachableTypes.add(argTypeName);
|
73
|
-
}
|
71
|
+
for (const arg of node.args)
|
72
|
+
reachableTypes.add(getNamedType(arg.type).name);
|
74
73
|
}
|
75
74
|
return reachableTypesCache.set(schema, reachableTypes), reachableTypes;
|
76
75
|
}
|
package/index.browser.js
CHANGED
@@ -3241,6 +3241,7 @@ var NO_TYPENAME_PREFIX = "NO_TYPENAME_PREFIX", rule14 = {
|
|
3241
3241
|
// src/rules/no-unreachable-types/index.ts
|
3242
3242
|
import {
|
3243
3243
|
DirectiveLocation,
|
3244
|
+
getNamedType,
|
3244
3245
|
isInterfaceType,
|
3245
3246
|
Kind as Kind12,
|
3246
3247
|
visit as visit5
|
@@ -3305,10 +3306,8 @@ function getReachableTypes(schema16) {
|
|
3305
3306
|
for (let node of schema16.getDirectives())
|
3306
3307
|
if (node.locations.some((location) => RequestDirectiveLocations.has(location))) {
|
3307
3308
|
reachableTypes.add(node.name);
|
3308
|
-
for (let arg of node.args)
|
3309
|
-
|
3310
|
-
argTypeName && reachableTypes.add(argTypeName);
|
3311
|
-
}
|
3309
|
+
for (let arg of node.args)
|
3310
|
+
reachableTypes.add(getNamedType(arg.type).name);
|
3312
3311
|
}
|
3313
3312
|
return reachableTypesCache.set(schema16, reachableTypes), reachableTypes;
|
3314
3313
|
}
|