@graphql-eslint/eslint-plugin 3.19.0 → 3.19.1-alpha-20230523165338-ec582f8

Sign up to get free protection for your applications and to get access to all the features.
@@ -55,12 +55,12 @@ exports.rule = {
55
55
  continue;
56
56
  const name = field.gqlType.gqlType.name.value;
57
57
  const type = schema.getType(name);
58
- const resultType = type ? (0, utils_js_1.getNodeName)(type.astNode) : '';
58
+ const resultType = (type === null || type === void 0 ? void 0 : type.astNode) ? (0, utils_js_1.getNodeName)(type.astNode) : type === null || type === void 0 ? void 0 : type.name;
59
59
  context.report({
60
60
  node: field.gqlType,
61
61
  messageId: RULE_ID,
62
62
  data: {
63
- resultType,
63
+ resultType: resultType || '',
64
64
  rootType: (0, utils_js_1.getNodeName)(node),
65
65
  },
66
66
  suggest: [
@@ -52,12 +52,12 @@ export const rule = {
52
52
  continue;
53
53
  const name = field.gqlType.gqlType.name.value;
54
54
  const type = schema.getType(name);
55
- const resultType = type ? getNodeName(type.astNode) : '';
55
+ const resultType = (type === null || type === void 0 ? void 0 : type.astNode) ? getNodeName(type.astNode) : type === null || type === void 0 ? void 0 : type.name;
56
56
  context.report({
57
57
  node: field.gqlType,
58
58
  messageId: RULE_ID,
59
59
  data: {
60
- resultType,
60
+ resultType: resultType || '',
61
61
  rootType: getNodeName(node),
62
62
  },
63
63
  suggest: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-eslint/eslint-plugin",
3
- "version": "3.19.0",
3
+ "version": "3.19.1-alpha-20230523165338-ec582f8",
4
4
  "description": "GraphQL plugin for ESLint",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {