@graphcommerce/graphql-codegen-markdown-docs 6.2.0-canary.9 → 6.2.0-canary.90
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 +178 -0
- package/dist/index.js +13 -2
- package/package.json +11 -9
- package/src/graphql.ts +1 -1
- package/src/index.ts +15 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,183 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 6.2.0-canary.90
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#2034](https://github.com/graphcommerce-org/graphcommerce/pull/2034) [`6fca47484`](https://github.com/graphcommerce-org/graphcommerce/commit/6fca474847fe52f004a6ac0abbd88492512b46ad) - Pre-resolve the customFetch in mesh config ([@paales](https://github.com/paales))
|
|
8
|
+
|
|
9
|
+
## 6.2.0-canary.89
|
|
10
|
+
|
|
11
|
+
## 6.2.0-canary.88
|
|
12
|
+
|
|
13
|
+
## 6.2.0-canary.87
|
|
14
|
+
|
|
15
|
+
## 6.2.0-canary.86
|
|
16
|
+
|
|
17
|
+
## 6.2.0-canary.85
|
|
18
|
+
|
|
19
|
+
## 6.2.0-canary.84
|
|
20
|
+
|
|
21
|
+
## 6.2.0-canary.83
|
|
22
|
+
|
|
23
|
+
## 6.2.0-canary.82
|
|
24
|
+
|
|
25
|
+
## 6.2.0-canary.81
|
|
26
|
+
|
|
27
|
+
## 6.2.0-canary.80
|
|
28
|
+
|
|
29
|
+
## 6.2.0-canary.79
|
|
30
|
+
|
|
31
|
+
## 6.2.0-canary.78
|
|
32
|
+
|
|
33
|
+
## 6.2.0-canary.77
|
|
34
|
+
|
|
35
|
+
## 6.2.0-canary.76
|
|
36
|
+
|
|
37
|
+
## 6.2.0-canary.75
|
|
38
|
+
|
|
39
|
+
## 6.2.0-canary.74
|
|
40
|
+
|
|
41
|
+
## 6.2.0-canary.73
|
|
42
|
+
|
|
43
|
+
## 6.2.0-canary.72
|
|
44
|
+
|
|
45
|
+
## 6.2.0-canary.71
|
|
46
|
+
|
|
47
|
+
## 6.2.0-canary.70
|
|
48
|
+
|
|
49
|
+
## 6.2.0-canary.69
|
|
50
|
+
|
|
51
|
+
### Patch Changes
|
|
52
|
+
|
|
53
|
+
- [#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))
|
|
54
|
+
|
|
55
|
+
## 6.2.0-canary.68
|
|
56
|
+
|
|
57
|
+
## 6.2.0-canary.67
|
|
58
|
+
|
|
59
|
+
## 6.2.0-canary.66
|
|
60
|
+
|
|
61
|
+
## 6.2.0-canary.65
|
|
62
|
+
|
|
63
|
+
## 6.2.0-canary.64
|
|
64
|
+
|
|
65
|
+
## 6.2.0-canary.63
|
|
66
|
+
|
|
67
|
+
## 6.2.0-canary.62
|
|
68
|
+
|
|
69
|
+
## 6.2.0-canary.61
|
|
70
|
+
|
|
71
|
+
## 6.2.0-canary.60
|
|
72
|
+
|
|
73
|
+
## 6.2.0-canary.59
|
|
74
|
+
|
|
75
|
+
## 6.2.0-canary.58
|
|
76
|
+
|
|
77
|
+
## 6.2.0-canary.57
|
|
78
|
+
|
|
79
|
+
## 6.2.0-canary.56
|
|
80
|
+
|
|
81
|
+
## 6.2.0-canary.55
|
|
82
|
+
|
|
83
|
+
## 6.2.0-canary.54
|
|
84
|
+
|
|
85
|
+
## 6.2.0-canary.53
|
|
86
|
+
|
|
87
|
+
## 6.2.0-canary.52
|
|
88
|
+
|
|
89
|
+
## 6.2.0-canary.51
|
|
90
|
+
|
|
91
|
+
## 6.2.0-canary.50
|
|
92
|
+
|
|
93
|
+
## 6.2.0-canary.49
|
|
94
|
+
|
|
95
|
+
### Patch Changes
|
|
96
|
+
|
|
97
|
+
- [#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))
|
|
98
|
+
|
|
99
|
+
## 6.2.0-canary.48
|
|
100
|
+
|
|
101
|
+
## 6.2.0-canary.47
|
|
102
|
+
|
|
103
|
+
## 6.2.0-canary.46
|
|
104
|
+
|
|
105
|
+
## 6.2.0-canary.45
|
|
106
|
+
|
|
107
|
+
## 6.2.0-canary.44
|
|
108
|
+
|
|
109
|
+
## 6.2.0-canary.43
|
|
110
|
+
|
|
111
|
+
## 6.2.0-canary.42
|
|
112
|
+
|
|
113
|
+
## 6.2.0-canary.41
|
|
114
|
+
|
|
115
|
+
### Patch Changes
|
|
116
|
+
|
|
117
|
+
- [#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))
|
|
118
|
+
|
|
119
|
+
## 6.2.0-canary.40
|
|
120
|
+
|
|
121
|
+
## 6.2.0-canary.39
|
|
122
|
+
|
|
123
|
+
## 6.2.0-canary.38
|
|
124
|
+
|
|
125
|
+
## 6.2.0-canary.37
|
|
126
|
+
|
|
127
|
+
## 6.2.0-canary.36
|
|
128
|
+
|
|
129
|
+
## 6.2.0-canary.35
|
|
130
|
+
|
|
131
|
+
## 6.2.0-canary.34
|
|
132
|
+
|
|
133
|
+
## 6.2.0-canary.33
|
|
134
|
+
|
|
135
|
+
## 6.2.0-canary.32
|
|
136
|
+
|
|
137
|
+
## 6.2.0-canary.31
|
|
138
|
+
|
|
139
|
+
## 6.2.0-canary.30
|
|
140
|
+
|
|
141
|
+
## 6.2.0-canary.29
|
|
142
|
+
|
|
143
|
+
## 6.2.0-canary.28
|
|
144
|
+
|
|
145
|
+
## 6.2.0-canary.27
|
|
146
|
+
|
|
147
|
+
## 6.2.0-canary.26
|
|
148
|
+
|
|
149
|
+
## 6.2.0-canary.25
|
|
150
|
+
|
|
151
|
+
## 6.2.0-canary.24
|
|
152
|
+
|
|
153
|
+
## 6.2.0-canary.23
|
|
154
|
+
|
|
155
|
+
## 6.2.0-canary.22
|
|
156
|
+
|
|
157
|
+
## 6.2.0-canary.21
|
|
158
|
+
|
|
159
|
+
## 6.2.0-canary.20
|
|
160
|
+
|
|
161
|
+
## 6.2.0-canary.19
|
|
162
|
+
|
|
163
|
+
## 6.2.0-canary.18
|
|
164
|
+
|
|
165
|
+
## 6.2.0-canary.17
|
|
166
|
+
|
|
167
|
+
## 6.2.0-canary.16
|
|
168
|
+
|
|
169
|
+
## 6.2.0-canary.15
|
|
170
|
+
|
|
171
|
+
## 6.2.0-canary.14
|
|
172
|
+
|
|
173
|
+
## 6.2.0-canary.13
|
|
174
|
+
|
|
175
|
+
## 6.2.0-canary.12
|
|
176
|
+
|
|
177
|
+
## 6.2.0-canary.11
|
|
178
|
+
|
|
179
|
+
## 6.2.0-canary.10
|
|
180
|
+
|
|
3
181
|
## 6.2.0-canary.9
|
|
4
182
|
|
|
5
183
|
## 6.2.0-canary.8
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,11 @@ exports.plugin = void 0;
|
|
|
4
4
|
const plugin_helpers_1 = require("@graphql-codegen/plugin-helpers");
|
|
5
5
|
const graphql_1 = require("graphql");
|
|
6
6
|
/** Converts input type to markdown document. */
|
|
7
|
-
const plugin = (schema,
|
|
7
|
+
const plugin = (schema,
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9
|
+
_documents,
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
11
|
+
config) => {
|
|
8
12
|
const astNode = (0, plugin_helpers_1.getCachedDocumentNodeFromSchema)(schema);
|
|
9
13
|
const enumStings = new Map();
|
|
10
14
|
const descriptionText = (node) => {
|
|
@@ -25,12 +29,19 @@ const plugin = (schema, _documents, config) => {
|
|
|
25
29
|
leave: (node) => possibleScalars.includes(node.name) ? node.name : `[${node.name}](#${node.name})`,
|
|
26
30
|
},
|
|
27
31
|
StringValue: { leave: (node) => node.value },
|
|
32
|
+
BooleanValue: { leave: (node) => node.value },
|
|
33
|
+
EnumValue: { leave: (node) => node.value },
|
|
34
|
+
IntValue: { leave: (node) => node.value },
|
|
35
|
+
FloatValue: { leave: (node) => node.value },
|
|
28
36
|
ListType: { leave: (node) => `[${node.type}]` },
|
|
29
37
|
NonNullType: {
|
|
30
38
|
leave: (node) => `${node.type}!`,
|
|
31
39
|
},
|
|
32
40
|
InputValueDefinition: {
|
|
33
|
-
leave: (node) =>
|
|
41
|
+
leave: (node) => {
|
|
42
|
+
const defaultValue = node.defaultValue ? ` (default: ${node.defaultValue})` : '';
|
|
43
|
+
return `\`${node.name}: ${node.type}${defaultValue}\`${descriptionText(node)}`;
|
|
44
|
+
},
|
|
34
45
|
},
|
|
35
46
|
InputObjectTypeDefinition: {
|
|
36
47
|
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.
|
|
5
|
+
"version": "6.2.0-canary.90",
|
|
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.
|
|
25
|
-
"@graphcommerce/prettier-config-pwa": "6.2.0-canary.
|
|
26
|
-
"@graphcommerce/typescript-config-pwa": "6.2.0-canary.
|
|
24
|
+
"@graphcommerce/eslint-config-pwa": "6.2.0-canary.90",
|
|
25
|
+
"@graphcommerce/prettier-config-pwa": "6.2.0-canary.90",
|
|
26
|
+
"@graphcommerce/typescript-config-pwa": "6.2.0-canary.90"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@graphql-codegen/add": "
|
|
30
|
-
"@graphql-codegen/plugin-helpers": "
|
|
31
|
-
"@graphql-codegen/visitor-plugin-common": "
|
|
32
|
-
"@graphql-tools/utils": "^
|
|
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/graphql.ts
CHANGED
|
@@ -12,7 +12,7 @@ export const isNamedType = (typ?: TypeNode): typ is NamedTypeNode => typ?.kind =
|
|
|
12
12
|
|
|
13
13
|
export const isInput = (kind: string) => kind.includes('Input')
|
|
14
14
|
|
|
15
|
-
type ObjectTypeDefinitionFn = (node: ObjectTypeDefinitionNode) =>
|
|
15
|
+
type ObjectTypeDefinitionFn = (node: ObjectTypeDefinitionNode) => unknown
|
|
16
16
|
|
|
17
17
|
export const ObjectTypeDefinitionBuilder = (
|
|
18
18
|
useObjectTypes: boolean | undefined,
|
package/src/index.ts
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
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
|
|
|
6
9
|
/** Converts input type to markdown document. */
|
|
7
10
|
export const plugin: PluginFunction<MarkdownDocsPluginConfig, Types.ComplexPluginOutput> = (
|
|
8
11
|
schema: GraphQLSchema,
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9
13
|
_documents: Types.DocumentFile[],
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10
15
|
config: MarkdownDocsPluginConfig,
|
|
11
16
|
): Types.ComplexPluginOutput => {
|
|
12
17
|
const astNode = getCachedDocumentNodeFromSchema(schema)
|
|
@@ -35,12 +40,19 @@ export const plugin: PluginFunction<MarkdownDocsPluginConfig, Types.ComplexPlugi
|
|
|
35
40
|
possibleScalars.includes(node.name) ? node.name : `[${node.name}](#${node.name})`,
|
|
36
41
|
}, // String, Boolean, GraphCommerceDebugConfig, etc.
|
|
37
42
|
StringValue: { leave: (node) => node.value },
|
|
43
|
+
BooleanValue: { leave: (node) => node.value },
|
|
44
|
+
EnumValue: { leave: (node) => node.value },
|
|
45
|
+
IntValue: { leave: (node) => node.value },
|
|
46
|
+
FloatValue: { leave: (node) => node.value },
|
|
38
47
|
ListType: { leave: (node) => `[${node.type}]` },
|
|
39
48
|
NonNullType: {
|
|
40
49
|
leave: (node) => `${node.type}!`,
|
|
41
50
|
},
|
|
42
51
|
InputValueDefinition: {
|
|
43
|
-
leave: (node) =>
|
|
52
|
+
leave: (node) => {
|
|
53
|
+
const defaultValue = node.defaultValue ? ` (default: ${node.defaultValue})` : ''
|
|
54
|
+
return `\`${node.name}: ${node.type}${defaultValue}\`${descriptionText(node)}`
|
|
55
|
+
},
|
|
44
56
|
},
|
|
45
57
|
InputObjectTypeDefinition: {
|
|
46
58
|
enter: (node) => ({
|