@graphcommerce/graphql-codegen-markdown-docs 6.2.0-canary.6 → 6.2.0-canary.61

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/CHANGELOG.md CHANGED
@@ -1,5 +1,123 @@
1
1
  # Change Log
2
2
 
3
+ ## 6.2.0-canary.61
4
+
5
+ ## 6.2.0-canary.60
6
+
7
+ ## 6.2.0-canary.59
8
+
9
+ ## 6.2.0-canary.58
10
+
11
+ ## 6.2.0-canary.57
12
+
13
+ ## 6.2.0-canary.56
14
+
15
+ ## 6.2.0-canary.55
16
+
17
+ ## 6.2.0-canary.54
18
+
19
+ ## 6.2.0-canary.53
20
+
21
+ ## 6.2.0-canary.52
22
+
23
+ ## 6.2.0-canary.51
24
+
25
+ ## 6.2.0-canary.50
26
+
27
+ ## 6.2.0-canary.49
28
+
29
+ ### Patch Changes
30
+
31
+ - [#1959](https://github.com/graphcommerce-org/graphcommerce/pull/1959) [`d0809b132`](https://github.com/graphcommerce-org/graphcommerce/commit/d0809b132a0e4cbdfeb86164f6c16a89ebecd987) - Added support for default values in the Config.graphqls files for the documentation ([@JoshuaS98](https://github.com/JoshuaS98))
32
+
33
+ ## 6.2.0-canary.48
34
+
35
+ ## 6.2.0-canary.47
36
+
37
+ ## 6.2.0-canary.46
38
+
39
+ ## 6.2.0-canary.45
40
+
41
+ ## 6.2.0-canary.44
42
+
43
+ ## 6.2.0-canary.43
44
+
45
+ ## 6.2.0-canary.42
46
+
47
+ ## 6.2.0-canary.41
48
+
49
+ ### Patch Changes
50
+
51
+ - [#1960](https://github.com/graphcommerce-org/graphcommerce/pull/1960) [`86e14569b`](https://github.com/graphcommerce-org/graphcommerce/commit/86e14569b1f68f73be7f93b614e36b382c5debff) - Updated to the latest release of GraphQL codegen and solve compatibility issues with our own generator ([@paales](https://github.com/paales))
52
+
53
+ ## 6.2.0-canary.40
54
+
55
+ ## 6.2.0-canary.39
56
+
57
+ ## 6.2.0-canary.38
58
+
59
+ ## 6.2.0-canary.37
60
+
61
+ ## 6.2.0-canary.36
62
+
63
+ ## 6.2.0-canary.35
64
+
65
+ ## 6.2.0-canary.34
66
+
67
+ ## 6.2.0-canary.33
68
+
69
+ ## 6.2.0-canary.32
70
+
71
+ ## 6.2.0-canary.31
72
+
73
+ ## 6.2.0-canary.30
74
+
75
+ ## 6.2.0-canary.29
76
+
77
+ ## 6.2.0-canary.28
78
+
79
+ ## 6.2.0-canary.27
80
+
81
+ ## 6.2.0-canary.26
82
+
83
+ ## 6.2.0-canary.25
84
+
85
+ ## 6.2.0-canary.24
86
+
87
+ ## 6.2.0-canary.23
88
+
89
+ ## 6.2.0-canary.22
90
+
91
+ ## 6.2.0-canary.21
92
+
93
+ ## 6.2.0-canary.20
94
+
95
+ ## 6.2.0-canary.19
96
+
97
+ ## 6.2.0-canary.18
98
+
99
+ ## 6.2.0-canary.17
100
+
101
+ ## 6.2.0-canary.16
102
+
103
+ ## 6.2.0-canary.15
104
+
105
+ ## 6.2.0-canary.14
106
+
107
+ ## 6.2.0-canary.13
108
+
109
+ ## 6.2.0-canary.12
110
+
111
+ ## 6.2.0-canary.11
112
+
113
+ ## 6.2.0-canary.10
114
+
115
+ ## 6.2.0-canary.9
116
+
117
+ ## 6.2.0-canary.8
118
+
119
+ ## 6.2.0-canary.7
120
+
3
121
  ## 6.2.0-canary.6
4
122
 
5
123
  ## 6.1.1-canary.5
package/dist/index.js CHANGED
@@ -25,12 +25,19 @@ const plugin = (schema, _documents, config) => {
25
25
  leave: (node) => possibleScalars.includes(node.name) ? node.name : `[${node.name}](#${node.name})`,
26
26
  },
27
27
  StringValue: { leave: (node) => node.value },
28
+ BooleanValue: { leave: (node) => node.value },
29
+ EnumValue: { leave: (node) => node.value },
30
+ IntValue: { leave: (node) => node.value },
31
+ FloatValue: { leave: (node) => node.value },
28
32
  ListType: { leave: (node) => `[${node.type}]` },
29
33
  NonNullType: {
30
34
  leave: (node) => `${node.type}!`,
31
35
  },
32
36
  InputValueDefinition: {
33
- leave: (node) => `\`${node.name}: ${node.type}\`${descriptionText(node)}`,
37
+ leave: (node) => {
38
+ const defaultValue = node.defaultValue ? ` (default: ${node.defaultValue})` : '';
39
+ return `\`${node.name}: ${node.type}${defaultValue}\`${descriptionText(node)}`;
40
+ },
34
41
  },
35
42
  InputObjectTypeDefinition: {
36
43
  enter: (node) => ({
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/graphql-codegen-markdown-docs",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "6.2.0-canary.6",
5
+ "version": "6.2.0-canary.61",
6
6
  "sideEffects": false,
7
7
  "type": "commonjs",
8
8
  "main": "dist/index.js",
@@ -21,15 +21,15 @@
21
21
  }
22
22
  },
23
23
  "devDependencies": {
24
- "@graphcommerce/eslint-config-pwa": "6.2.0-canary.6",
25
- "@graphcommerce/prettier-config-pwa": "6.2.0-canary.6",
26
- "@graphcommerce/typescript-config-pwa": "6.2.0-canary.6"
24
+ "@graphcommerce/eslint-config-pwa": "6.2.0-canary.61",
25
+ "@graphcommerce/prettier-config-pwa": "6.2.0-canary.61",
26
+ "@graphcommerce/typescript-config-pwa": "6.2.0-canary.61"
27
27
  },
28
28
  "dependencies": {
29
- "@graphql-codegen/add": "4.0.1",
30
- "@graphql-codegen/plugin-helpers": "4.1.0",
31
- "@graphql-codegen/visitor-plugin-common": "3.0.2",
32
- "@graphql-tools/utils": "^9.2.1",
29
+ "@graphql-codegen/add": "5.0.0",
30
+ "@graphql-codegen/plugin-helpers": "5.0.0",
31
+ "@graphql-codegen/visitor-plugin-common": "4.0.0",
32
+ "@graphql-tools/utils": "^10.0.1",
33
33
  "@types/parse-filepath": "^1.0.0",
34
34
  "graphql": "16.6.0",
35
35
  "parse-filepath": "^1.0.2"
package/src/index.ts CHANGED
@@ -1,5 +1,8 @@
1
- import { PluginFunction, Types } from '@graphql-codegen/plugin-helpers'
2
- import { getCachedDocumentNodeFromSchema } from '@graphql-codegen/plugin-helpers'
1
+ import {
2
+ PluginFunction,
3
+ Types,
4
+ getCachedDocumentNodeFromSchema,
5
+ } from '@graphql-codegen/plugin-helpers'
3
6
  import { GraphQLSchema, visit } from 'graphql'
4
7
  import { MarkdownDocsPluginConfig } from './config'
5
8
 
@@ -35,12 +38,19 @@ export const plugin: PluginFunction<MarkdownDocsPluginConfig, Types.ComplexPlugi
35
38
  possibleScalars.includes(node.name) ? node.name : `[${node.name}](#${node.name})`,
36
39
  }, // String, Boolean, GraphCommerceDebugConfig, etc.
37
40
  StringValue: { leave: (node) => node.value },
41
+ BooleanValue: { leave: (node) => node.value },
42
+ EnumValue: { leave: (node) => node.value },
43
+ IntValue: { leave: (node) => node.value },
44
+ FloatValue: { leave: (node) => node.value },
38
45
  ListType: { leave: (node) => `[${node.type}]` },
39
46
  NonNullType: {
40
47
  leave: (node) => `${node.type}!`,
41
48
  },
42
49
  InputValueDefinition: {
43
- leave: (node) => `\`${node.name}: ${node.type}\`${descriptionText(node)}`,
50
+ leave: (node) => {
51
+ const defaultValue = node.defaultValue ? ` (default: ${node.defaultValue})` : ''
52
+ return `\`${node.name}: ${node.type}${defaultValue}\`${descriptionText(node)}`
53
+ },
44
54
  },
45
55
  InputObjectTypeDefinition: {
46
56
  enter: (node) => ({