@graphql-codegen/typescript-apollo-angular 3.4.9 → 3.4.11-alpha-df7bf6266.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.
Files changed (3) hide show
  1. package/index.js +3 -5
  2. package/index.mjs +3 -5
  3. package/package.json +2 -2
package/index.js CHANGED
@@ -164,7 +164,7 @@ class ApolloAngularVisitor extends visitorPluginCommon.ClientSideBaseVisitor {
164
164
  if (this._operationHasDirective(operation, 'NgModule')) {
165
165
  return this._extractNgModule(operation).module;
166
166
  }
167
- else if (this.config.ngModule) {
167
+ if (this.config.ngModule) {
168
168
  return this._parseNgModule(this.config.ngModule).module;
169
169
  }
170
170
  return `'root'`;
@@ -173,12 +173,10 @@ class ApolloAngularVisitor extends visitorPluginCommon.ClientSideBaseVisitor {
173
173
  if (this.config.importDocumentNodeExternallyFrom === 'near-operation-file') {
174
174
  return `Operations.${documentVariableName}`;
175
175
  }
176
- else if (this.config.importOperationTypesFrom) {
176
+ if (this.config.importOperationTypesFrom) {
177
177
  return `${this.config.importOperationTypesFrom}.${documentVariableName}`;
178
178
  }
179
- else {
180
- return documentVariableName;
181
- }
179
+ return documentVariableName;
182
180
  }
183
181
  _operationSuffix(operationType) {
184
182
  const defaultSuffix = 'GQL';
package/index.mjs CHANGED
@@ -158,7 +158,7 @@ class ApolloAngularVisitor extends ClientSideBaseVisitor {
158
158
  if (this._operationHasDirective(operation, 'NgModule')) {
159
159
  return this._extractNgModule(operation).module;
160
160
  }
161
- else if (this.config.ngModule) {
161
+ if (this.config.ngModule) {
162
162
  return this._parseNgModule(this.config.ngModule).module;
163
163
  }
164
164
  return `'root'`;
@@ -167,12 +167,10 @@ class ApolloAngularVisitor extends ClientSideBaseVisitor {
167
167
  if (this.config.importDocumentNodeExternallyFrom === 'near-operation-file') {
168
168
  return `Operations.${documentVariableName}`;
169
169
  }
170
- else if (this.config.importOperationTypesFrom) {
170
+ if (this.config.importOperationTypesFrom) {
171
171
  return `${this.config.importOperationTypesFrom}.${documentVariableName}`;
172
172
  }
173
- else {
174
- return documentVariableName;
175
- }
173
+ return documentVariableName;
176
174
  }
177
175
  _operationSuffix(operationType) {
178
176
  const defaultSuffix = 'GQL';
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@graphql-codegen/typescript-apollo-angular",
3
- "version": "3.4.9",
3
+ "version": "3.4.11-alpha-df7bf6266.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 || ^16.0.0"
7
7
  },
8
8
  "dependencies": {
9
9
  "@graphql-codegen/plugin-helpers": "^2.4.0",
10
- "@graphql-codegen/visitor-plugin-common": "2.7.6",
10
+ "@graphql-codegen/visitor-plugin-common": "2.9.0-alpha-df7bf6266.0",
11
11
  "auto-bind": "~4.0.0",
12
12
  "change-case-all": "1.0.14",
13
13
  "tslib": "~2.4.0"