@graphql-eslint/eslint-plugin 3.8.0-alpha-269d044.0 → 3.8.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 +4 -2
- package/index.mjs +4 -2
- package/package.json +1 -1
package/index.js
CHANGED
@@ -3883,7 +3883,8 @@ function getReachableTypes(schema) {
|
|
3883
3883
|
graphql.visit(astNode, visitor);
|
3884
3884
|
}
|
3885
3885
|
}
|
3886
|
-
else {
|
3886
|
+
else if (type.astNode) {
|
3887
|
+
// astNode can be undefined for ID, String, Boolean
|
3887
3888
|
graphql.visit(type.astNode, visitor);
|
3888
3889
|
}
|
3889
3890
|
};
|
@@ -3902,7 +3903,8 @@ function getReachableTypes(schema) {
|
|
3902
3903
|
schema.getMutationType(),
|
3903
3904
|
schema.getSubscriptionType(),
|
3904
3905
|
]) {
|
3905
|
-
if
|
3906
|
+
// if schema don't have Query type, schema.astNode will be undefined
|
3907
|
+
if (type === null || type === void 0 ? void 0 : type.astNode) {
|
3906
3908
|
graphql.visit(type.astNode, visitor);
|
3907
3909
|
}
|
3908
3910
|
}
|
package/index.mjs
CHANGED
@@ -3877,7 +3877,8 @@ function getReachableTypes(schema) {
|
|
3877
3877
|
visit(astNode, visitor);
|
3878
3878
|
}
|
3879
3879
|
}
|
3880
|
-
else {
|
3880
|
+
else if (type.astNode) {
|
3881
|
+
// astNode can be undefined for ID, String, Boolean
|
3881
3882
|
visit(type.astNode, visitor);
|
3882
3883
|
}
|
3883
3884
|
};
|
@@ -3896,7 +3897,8 @@ function getReachableTypes(schema) {
|
|
3896
3897
|
schema.getMutationType(),
|
3897
3898
|
schema.getSubscriptionType(),
|
3898
3899
|
]) {
|
3899
|
-
if
|
3900
|
+
// if schema don't have Query type, schema.astNode will be undefined
|
3901
|
+
if (type === null || type === void 0 ? void 0 : type.astNode) {
|
3900
3902
|
visit(type.astNode, visitor);
|
3901
3903
|
}
|
3902
3904
|
}
|