@graphql-codegen/typescript-operations 6.0.3 → 6.0.4
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/cjs/visitor.js +2 -1
- package/esm/visitor.js +2 -1
- package/package.json +3 -3
package/cjs/visitor.js
CHANGED
|
@@ -191,7 +191,8 @@ class TypeScriptDocumentsVisitor extends visitor_plugin_common_1.BaseDocumentsVi
|
|
|
191
191
|
continue;
|
|
192
192
|
}
|
|
193
193
|
if (typeNode.type === 'ListType') {
|
|
194
|
-
|
|
194
|
+
const listModifier = this.config.immutableTypes ? 'ReadonlyArray' : 'Array';
|
|
195
|
+
typePart = `${listModifier}<${typePart}>`;
|
|
195
196
|
if (!typeNode.isNonNullable) {
|
|
196
197
|
typePart = (0, visitor_plugin_common_1.printTypeScriptMaybeType)({
|
|
197
198
|
type: typePart,
|
package/esm/visitor.js
CHANGED
|
@@ -187,7 +187,8 @@ export class TypeScriptDocumentsVisitor extends BaseDocumentsVisitor {
|
|
|
187
187
|
continue;
|
|
188
188
|
}
|
|
189
189
|
if (typeNode.type === 'ListType') {
|
|
190
|
-
|
|
190
|
+
const listModifier = this.config.immutableTypes ? 'ReadonlyArray' : 'Array';
|
|
191
|
+
typePart = `${listModifier}<${typePart}>`;
|
|
191
192
|
if (!typeNode.isNonNullable) {
|
|
192
193
|
typePart = printTypeScriptMaybeType({
|
|
193
194
|
type: typePart,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-codegen/typescript-operations",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.4",
|
|
4
4
|
"description": "GraphQL Code Generator plugin for generating TypeScript types for GraphQL queries, mutations, subscriptions and fragments",
|
|
5
5
|
"peerDependenciesMeta": {
|
|
6
6
|
"graphql-sock": {
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"auto-bind": "^5.0.0",
|
|
16
16
|
"tslib": "^2.8.0",
|
|
17
17
|
"@graphql-codegen/plugin-helpers": "^7.0.1",
|
|
18
|
-
"@graphql-codegen/
|
|
19
|
-
"@graphql-codegen/
|
|
18
|
+
"@graphql-codegen/visitor-plugin-common": "^7.1.0",
|
|
19
|
+
"@graphql-codegen/schema-ast": "^6.0.1"
|
|
20
20
|
},
|
|
21
21
|
"repository": {
|
|
22
22
|
"type": "git",
|