@graphql-markdown/helpers 1.2.5 → 1.2.7

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/README.md CHANGED
@@ -17,12 +17,21 @@ npm install @graphql-markdown/helpers
17
17
 
18
18
  ## Usage
19
19
 
20
- ### Custom directive description
20
+ ### Directive-based decorators
21
+
22
+ ```ts
23
+ import { withDirective } from "@graphql-markdown/helpers";
24
+
25
+ const decorator = withDirective("deprecated", (directive, options, context) => {
26
+ // render decorator content derived from the directive's definition
27
+ });
28
+ ```
29
+
30
+ ### Directive description helper
21
31
 
22
32
  ```js
23
33
  import { directiveDescriptor } from "@graphql-markdown/helpers";
24
34
 
25
- // customDirective.version.descriptor in your GraphQL-Config
26
35
  export default (directive, type) =>
27
36
  directiveDescriptor(
28
37
  directive,
@@ -31,30 +40,18 @@ export default (directive, type) =>
31
40
  );
32
41
  ```
33
42
 
34
- ### Custom directive badge
43
+ ### Directive badge helper
35
44
 
36
45
  ```js
37
46
  import { directiveTag } from "@graphql-markdown/helpers";
38
47
 
39
- // customDirective.auth.tag in your GraphQL-Config
40
48
  export default (directive, type) =>
41
49
  directiveTag(directive, type, "badge--warning");
42
50
  ```
43
51
 
44
- ### Directive-based decorators
45
-
46
- ```ts
47
- import { withDirective } from "@graphql-markdown/helpers";
48
-
49
- const decorator = withDirective("deprecated", (directive, options, context) => {
50
- // render decorator content derived from the directive's definition
51
- });
52
- ```
53
-
54
52
  ## Documentation
55
53
 
56
- - [Custom Directives](https://graphql-markdown.dev/docs/advanced/custom-directive)
57
- - [Decorators](https://graphql-markdown.dev/docs/advanced/decorators)
54
+ - [Decorators](https://graphql-markdown.dev/docs/customize/decorators)
58
55
 
59
56
  ## License
60
57
 
@@ -1,10 +1,3 @@
1
- /**
2
- * Custom directive `descriptor` helper.
3
- *
4
- * @see [Option `customDirective.[directive].descriptor`](https://graphql-markdown.dev/docs/advanced/custom-directive#descriptor)
5
- *
6
- * @packageDocumentation
7
- */
8
1
  import type { GraphQLDirective } from "@graphql-markdown/types";
9
2
  /**
10
3
  * Helper for rendering custom description from schema directive on type.
@@ -1 +1 @@
1
- {"version":3,"file":"descriptor.d.ts","sourceRoot":"","sources":["../../src/directives/descriptor.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAMhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AACH,eAAO,MAAM,mBAAmB,cACnB,gBAAgB,SACpB,OAAO,wBACQ,MAAM,KAC3B,MAQF,CAAC"}
1
+ {"version":3,"file":"descriptor.d.ts","sourceRoot":"","sources":["../../src/directives/descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAMhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AACH,eAAO,MAAM,mBAAmB,cACnB,gBAAgB,SACpB,OAAO,wBACQ,MAAM,KAC3B,MAQF,CAAC"}
@@ -1,11 +1,4 @@
1
1
  "use strict";
2
- /**
3
- * Custom directive `descriptor` helper.
4
- *
5
- * @see [Option `customDirective.[directive].descriptor`](https://graphql-markdown.dev/docs/advanced/custom-directive#descriptor)
6
- *
7
- * @packageDocumentation
8
- */
9
2
  Object.defineProperty(exports, "__esModule", { value: true });
10
3
  exports.directiveDescriptor = void 0;
11
4
  const graphql_1 = require("@graphql-markdown/graphql");
@@ -1,10 +1,3 @@
1
- /**
2
- * Custom directive `tag` helper.
3
- *
4
- * @see [Option `customDirective.[directive].tag`](https://graphql-markdown.dev/docs/advanced/custom-directive#tag)
5
- *
6
- * @packageDocumentation
7
- */
8
1
  import type { Badge, GraphQLDirective } from "@graphql-markdown/types";
9
2
  /**
10
3
  * Helper for rendering custom description from schema directive on type.
@@ -1 +1 @@
1
- {"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../../src/directives/tag.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEvE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,eAAO,MAAM,YAAY,cACZ,gBAAgB,SACpB,OAAO,cACH,MAAM,KAChB,KAKF,CAAC"}
1
+ {"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../../src/directives/tag.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEvE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,eAAO,MAAM,YAAY,cACZ,gBAAgB,SACpB,OAAO,cACH,MAAM,KAChB,KAKF,CAAC"}
@@ -1,11 +1,4 @@
1
1
  "use strict";
2
- /**
3
- * Custom directive `tag` helper.
4
- *
5
- * @see [Option `customDirective.[directive].tag`](https://graphql-markdown.dev/docs/advanced/custom-directive#tag)
6
- *
7
- * @packageDocumentation
8
- */
9
2
  Object.defineProperty(exports, "__esModule", { value: true });
10
3
  exports.directiveTag = void 0;
11
4
  /**
@@ -1,8 +1,6 @@
1
1
  /**
2
2
  * `decorators` render helper for directive-definition-only content.
3
3
  *
4
- * @see [Migrating from `customDirective`](https://graphql-markdown.dev/docs/advanced/decorators#migrating-from-customdirective)
5
- *
6
4
  * @packageDocumentation
7
5
  */
8
6
  import type { DecoratorContext, DecoratorRenderer, GraphQLDirective, Maybe, PrintTypeOptions } from "@graphql-markdown/types";
@@ -1 +1 @@
1
- {"version":3,"file":"with-directive.d.ts","sourceRoot":"","sources":["../../src/directives/with-directive.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,KAAK,EACL,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AAIjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,aAAa,SAClB,MAAM,UACJ,CACN,SAAS,EAAE,gBAAgB,EAC3B,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,gBAAgB,KACtB,KAAK,CAAC,MAAM,CAAC,KACjB,iBASF,CAAC"}
1
+ {"version":3,"file":"with-directive.d.ts","sourceRoot":"","sources":["../../src/directives/with-directive.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,KAAK,EACL,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AAIjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,aAAa,SAClB,MAAM,UACJ,CACN,SAAS,EAAE,gBAAgB,EAC3B,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,gBAAgB,KACtB,KAAK,CAAC,MAAM,CAAC,KACjB,iBASF,CAAC"}
@@ -2,8 +2,6 @@
2
2
  /**
3
3
  * `decorators` render helper for directive-definition-only content.
4
4
  *
5
- * @see [Migrating from `customDirective`](https://graphql-markdown.dev/docs/advanced/decorators#migrating-from-customdirective)
6
- *
7
5
  * @packageDocumentation
8
6
  */
9
7
  Object.defineProperty(exports, "__esModule", { value: true });
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.2.5",
8
+ "version": "1.2.7",
9
9
  "license": "MIT",
10
10
  "repository": {
11
11
  "type": "git",
@@ -65,9 +65,9 @@
65
65
  "test:watch": "vitest --watch"
66
66
  },
67
67
  "dependencies": {
68
- "@graphql-markdown/graphql": "^1.3.5",
69
- "@graphql-markdown/types": "^1.17.1",
70
- "@graphql-markdown/utils": "^1.14.2"
68
+ "@graphql-markdown/graphql": "^1.4.0",
69
+ "@graphql-markdown/types": "^1.19.0",
70
+ "@graphql-markdown/utils": "^1.14.4"
71
71
  },
72
72
  "devDependencies": {
73
73
  "@graphql-markdown/tooling-config": "^1.0.0"