@graphcommerce/graphql-codegen-markdown-docs 6.2.0-canary.8 → 6.2.0-canary.80

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,161 @@
1
1
  # Change Log
2
2
 
3
+ ## 6.2.0-canary.80
4
+
5
+ ## 6.2.0-canary.79
6
+
7
+ ## 6.2.0-canary.78
8
+
9
+ ## 6.2.0-canary.77
10
+
11
+ ## 6.2.0-canary.76
12
+
13
+ ## 6.2.0-canary.75
14
+
15
+ ## 6.2.0-canary.74
16
+
17
+ ## 6.2.0-canary.73
18
+
19
+ ## 6.2.0-canary.72
20
+
21
+ ## 6.2.0-canary.71
22
+
23
+ ## 6.2.0-canary.70
24
+
25
+ ## 6.2.0-canary.69
26
+
27
+ ### Patch Changes
28
+
29
+ - [#2012](https://github.com/graphcommerce-org/graphcommerce/pull/2012) [`1dbb3ae13`](https://github.com/graphcommerce-org/graphcommerce/commit/1dbb3ae13553992ee1ed77f375375560f28c418c) - Upgrade graphql to 16.7.1, add graphql as peer dependency ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
30
+
31
+ ## 6.2.0-canary.68
32
+
33
+ ## 6.2.0-canary.67
34
+
35
+ ## 6.2.0-canary.66
36
+
37
+ ## 6.2.0-canary.65
38
+
39
+ ## 6.2.0-canary.64
40
+
41
+ ## 6.2.0-canary.63
42
+
43
+ ## 6.2.0-canary.62
44
+
45
+ ## 6.2.0-canary.61
46
+
47
+ ## 6.2.0-canary.60
48
+
49
+ ## 6.2.0-canary.59
50
+
51
+ ## 6.2.0-canary.58
52
+
53
+ ## 6.2.0-canary.57
54
+
55
+ ## 6.2.0-canary.56
56
+
57
+ ## 6.2.0-canary.55
58
+
59
+ ## 6.2.0-canary.54
60
+
61
+ ## 6.2.0-canary.53
62
+
63
+ ## 6.2.0-canary.52
64
+
65
+ ## 6.2.0-canary.51
66
+
67
+ ## 6.2.0-canary.50
68
+
69
+ ## 6.2.0-canary.49
70
+
71
+ ### Patch Changes
72
+
73
+ - [#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))
74
+
75
+ ## 6.2.0-canary.48
76
+
77
+ ## 6.2.0-canary.47
78
+
79
+ ## 6.2.0-canary.46
80
+
81
+ ## 6.2.0-canary.45
82
+
83
+ ## 6.2.0-canary.44
84
+
85
+ ## 6.2.0-canary.43
86
+
87
+ ## 6.2.0-canary.42
88
+
89
+ ## 6.2.0-canary.41
90
+
91
+ ### Patch Changes
92
+
93
+ - [#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))
94
+
95
+ ## 6.2.0-canary.40
96
+
97
+ ## 6.2.0-canary.39
98
+
99
+ ## 6.2.0-canary.38
100
+
101
+ ## 6.2.0-canary.37
102
+
103
+ ## 6.2.0-canary.36
104
+
105
+ ## 6.2.0-canary.35
106
+
107
+ ## 6.2.0-canary.34
108
+
109
+ ## 6.2.0-canary.33
110
+
111
+ ## 6.2.0-canary.32
112
+
113
+ ## 6.2.0-canary.31
114
+
115
+ ## 6.2.0-canary.30
116
+
117
+ ## 6.2.0-canary.29
118
+
119
+ ## 6.2.0-canary.28
120
+
121
+ ## 6.2.0-canary.27
122
+
123
+ ## 6.2.0-canary.26
124
+
125
+ ## 6.2.0-canary.25
126
+
127
+ ## 6.2.0-canary.24
128
+
129
+ ## 6.2.0-canary.23
130
+
131
+ ## 6.2.0-canary.22
132
+
133
+ ## 6.2.0-canary.21
134
+
135
+ ## 6.2.0-canary.20
136
+
137
+ ## 6.2.0-canary.19
138
+
139
+ ## 6.2.0-canary.18
140
+
141
+ ## 6.2.0-canary.17
142
+
143
+ ## 6.2.0-canary.16
144
+
145
+ ## 6.2.0-canary.15
146
+
147
+ ## 6.2.0-canary.14
148
+
149
+ ## 6.2.0-canary.13
150
+
151
+ ## 6.2.0-canary.12
152
+
153
+ ## 6.2.0-canary.11
154
+
155
+ ## 6.2.0-canary.10
156
+
157
+ ## 6.2.0-canary.9
158
+
3
159
  ## 6.2.0-canary.8
4
160
 
5
161
  ## 6.2.0-canary.7
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.8",
5
+ "version": "6.2.0-canary.80",
6
6
  "sideEffects": false,
7
7
  "type": "commonjs",
8
8
  "main": "dist/index.js",
@@ -21,17 +21,19 @@
21
21
  }
22
22
  },
23
23
  "devDependencies": {
24
- "@graphcommerce/eslint-config-pwa": "6.2.0-canary.8",
25
- "@graphcommerce/prettier-config-pwa": "6.2.0-canary.8",
26
- "@graphcommerce/typescript-config-pwa": "6.2.0-canary.8"
24
+ "@graphcommerce/eslint-config-pwa": "6.2.0-canary.80",
25
+ "@graphcommerce/prettier-config-pwa": "6.2.0-canary.80",
26
+ "@graphcommerce/typescript-config-pwa": "6.2.0-canary.80"
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
- "graphql": "16.6.0",
35
34
  "parse-filepath": "^1.0.2"
35
+ },
36
+ "peerDependencies": {
37
+ "graphql": "^16.7.1"
36
38
  }
37
39
  }
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) => ({