@graphql-codegen/typescript-apollo-angular 3.1.3-alpha-a67c75cf5.0 → 3.2.0
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/index.js +9 -3
- package/index.mjs +9 -3
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -169,9 +169,15 @@ class ApolloAngularVisitor extends visitorPluginCommon.ClientSideBaseVisitor {
|
|
|
169
169
|
return `'root'`;
|
|
170
170
|
}
|
|
171
171
|
_getDocumentNodeVariable(node, documentVariableName) {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
172
|
+
if (this.config.importDocumentNodeExternallyFrom === 'near-operation-file') {
|
|
173
|
+
return `Operations.${documentVariableName}`;
|
|
174
|
+
}
|
|
175
|
+
else if (this.config.importOperationTypesFrom) {
|
|
176
|
+
return `${this.config.importOperationTypesFrom}.${documentVariableName}`;
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
return documentVariableName;
|
|
180
|
+
}
|
|
175
181
|
}
|
|
176
182
|
_operationSuffix(operationType) {
|
|
177
183
|
const defaultSuffix = 'GQL';
|
package/index.mjs
CHANGED
|
@@ -163,9 +163,15 @@ class ApolloAngularVisitor extends ClientSideBaseVisitor {
|
|
|
163
163
|
return `'root'`;
|
|
164
164
|
}
|
|
165
165
|
_getDocumentNodeVariable(node, documentVariableName) {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
166
|
+
if (this.config.importDocumentNodeExternallyFrom === 'near-operation-file') {
|
|
167
|
+
return `Operations.${documentVariableName}`;
|
|
168
|
+
}
|
|
169
|
+
else if (this.config.importOperationTypesFrom) {
|
|
170
|
+
return `${this.config.importOperationTypesFrom}.${documentVariableName}`;
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
return documentVariableName;
|
|
174
|
+
}
|
|
169
175
|
}
|
|
170
176
|
_operationSuffix(operationType) {
|
|
171
177
|
const defaultSuffix = 'GQL';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-codegen/typescript-apollo-angular",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "GraphQL Code Generator plugin for generating ready-to-use Angular Components based on GraphQL operations",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@graphql-codegen/plugin-helpers": "^2.1.1",
|
|
11
|
-
"@graphql-codegen/visitor-plugin-common": "2.2.
|
|
11
|
+
"@graphql-codegen/visitor-plugin-common": "2.2.1",
|
|
12
12
|
"auto-bind": "~4.0.0",
|
|
13
13
|
"change-case-all": "1.0.14",
|
|
14
14
|
"tslib": "~2.3.0"
|