@graphql-markdown/printer-legacy 1.1.4 → 1.1.6

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/package.json +1 -1
  2. package/src/index.js +7 -3
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "bugs": {
6
6
  "url": "https://github.com/graphql-markdown/graphql-markdown/issues"
7
7
  },
8
- "version": "1.1.4",
8
+ "version": "1.1.6",
9
9
  "license": "MIT",
10
10
  "main": "src/index.js",
11
11
  "repository": {
package/src/index.js CHANGED
@@ -151,7 +151,7 @@ module.exports = class Printer {
151
151
  return "";
152
152
  }
153
153
  const link = this.toLink(type, type.name, category);
154
- return `[\`${link.text}\`](${link.url}) <Badge className="secondary" text="${category.singular}"/>`;
154
+ return `[\`${link.text}\`](${link.url}) <Badge class="secondary" text="${category.singular}"/>`;
155
155
  }
156
156
 
157
157
  printSection(
@@ -294,7 +294,11 @@ module.exports = class Printer {
294
294
  parentType: undefined,
295
295
  },
296
296
  ) {
297
- if (typeof type === "undefined" || type === null) {
297
+ if (
298
+ typeof type === "undefined" ||
299
+ type === null ||
300
+ hasDirective(type, this.skipDocDirective)
301
+ ) {
298
302
  return "";
299
303
  }
300
304
 
@@ -454,7 +458,7 @@ module.exports = class Printer {
454
458
  const reason = type.deprecationReason
455
459
  ? ": " + escapeMDX(type.deprecationReason)
456
460
  : "";
457
- return `<Badge className="warning" text="DEPRECATED${reason}"/>${MARKDOWN_EOP}`;
461
+ return `<Badge class="warning" text="DEPRECATED${reason}"/>${MARKDOWN_EOP}`;
458
462
  }
459
463
 
460
464
  printDescription(type, noText = NO_DESCRIPTION_TEXT) {