@graphql-codegen/typescript-apollo-angular 3.4.6 → 3.4.9
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/config.d.ts +11 -11
- package/index.js +2 -1
- package/index.mjs +2 -1
- package/package.json +3 -3
package/config.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export interface ApolloAngularRawPluginConfig extends RawClientSideBasePluginCon
|
|
|
14
14
|
* @default 2
|
|
15
15
|
*
|
|
16
16
|
* @exampleMarkdown
|
|
17
|
-
* ```
|
|
17
|
+
* ```yaml
|
|
18
18
|
* config:
|
|
19
19
|
* apolloAngularVersion: 1
|
|
20
20
|
* ```
|
|
@@ -24,7 +24,7 @@ export interface ApolloAngularRawPluginConfig extends RawClientSideBasePluginCon
|
|
|
24
24
|
* @description Allows to define `ngModule` as part of the plugin's config so it's globally available.
|
|
25
25
|
*
|
|
26
26
|
* @exampleMarkdown
|
|
27
|
-
* ```
|
|
27
|
+
* ```yaml
|
|
28
28
|
* config:
|
|
29
29
|
* ngModule: ./path/to/module#MyModule
|
|
30
30
|
* ```
|
|
@@ -34,7 +34,7 @@ export interface ApolloAngularRawPluginConfig extends RawClientSideBasePluginCon
|
|
|
34
34
|
* @description Defined the global value of `namedClient`.
|
|
35
35
|
*
|
|
36
36
|
* @exampleMarkdown
|
|
37
|
-
* ```
|
|
37
|
+
* ```yaml
|
|
38
38
|
* config:
|
|
39
39
|
* namedClient: 'customName'
|
|
40
40
|
* ```
|
|
@@ -44,7 +44,7 @@ export interface ApolloAngularRawPluginConfig extends RawClientSideBasePluginCon
|
|
|
44
44
|
* @description Defined the global value of `serviceName`.
|
|
45
45
|
*
|
|
46
46
|
* @exampleMarkdown
|
|
47
|
-
* ```
|
|
47
|
+
* ```yaml
|
|
48
48
|
* config:
|
|
49
49
|
* serviceName: 'MySDK'
|
|
50
50
|
* ```
|
|
@@ -54,7 +54,7 @@ export interface ApolloAngularRawPluginConfig extends RawClientSideBasePluginCon
|
|
|
54
54
|
* @description Defined the global value of `serviceProvidedInRoot`.
|
|
55
55
|
*
|
|
56
56
|
* @exampleMarkdown
|
|
57
|
-
* ```
|
|
57
|
+
* ```yaml
|
|
58
58
|
* config:
|
|
59
59
|
* serviceProvidedInRoot: false
|
|
60
60
|
* ```
|
|
@@ -64,7 +64,7 @@ export interface ApolloAngularRawPluginConfig extends RawClientSideBasePluginCon
|
|
|
64
64
|
* @description Define the Injector of the SDK class.
|
|
65
65
|
*
|
|
66
66
|
* @exampleMarkdown
|
|
67
|
-
* ```
|
|
67
|
+
* ```yaml
|
|
68
68
|
* config:
|
|
69
69
|
* serviceProvidedIn: ./path/to/module#MyModule
|
|
70
70
|
* ```
|
|
@@ -80,7 +80,7 @@ export interface ApolloAngularRawPluginConfig extends RawClientSideBasePluginCon
|
|
|
80
80
|
* @default GQL
|
|
81
81
|
*
|
|
82
82
|
* @exampleMarkdown
|
|
83
|
-
* ```
|
|
83
|
+
* ```yaml
|
|
84
84
|
* config:
|
|
85
85
|
* querySuffix: 'QueryService'
|
|
86
86
|
* ```
|
|
@@ -91,7 +91,7 @@ export interface ApolloAngularRawPluginConfig extends RawClientSideBasePluginCon
|
|
|
91
91
|
* @default GQL
|
|
92
92
|
*
|
|
93
93
|
* @exampleMarkdown
|
|
94
|
-
* ```
|
|
94
|
+
* ```yaml
|
|
95
95
|
* config:
|
|
96
96
|
* mutationSuffix: 'MutationService'
|
|
97
97
|
* ```
|
|
@@ -102,7 +102,7 @@ export interface ApolloAngularRawPluginConfig extends RawClientSideBasePluginCon
|
|
|
102
102
|
* @default GQL
|
|
103
103
|
*
|
|
104
104
|
* @exampleMarkdown
|
|
105
|
-
* ```
|
|
105
|
+
* ```yaml
|
|
106
106
|
* config:
|
|
107
107
|
* subscriptionSuffix: 'SubscriptionService'
|
|
108
108
|
* ```
|
|
@@ -118,7 +118,7 @@ export interface ApolloAngularRawPluginConfig extends RawClientSideBasePluginCon
|
|
|
118
118
|
* @default []
|
|
119
119
|
*
|
|
120
120
|
* @exampleMarkdown
|
|
121
|
-
* ```
|
|
121
|
+
* ```yaml
|
|
122
122
|
* config:
|
|
123
123
|
* additionalDI
|
|
124
124
|
* - 'testService: TestService'
|
|
@@ -131,7 +131,7 @@ export interface ApolloAngularRawPluginConfig extends RawClientSideBasePluginCon
|
|
|
131
131
|
* @default false
|
|
132
132
|
*
|
|
133
133
|
* @exampleMarkdown
|
|
134
|
-
* ```
|
|
134
|
+
* ```yaml
|
|
135
135
|
* config:
|
|
136
136
|
* addExplicitOverride: true
|
|
137
137
|
* ```
|
package/index.js
CHANGED
|
@@ -203,6 +203,7 @@ class ApolloAngularVisitor extends visitorPluginCommon.ClientSideBaseVisitor {
|
|
|
203
203
|
operationVariablesTypes,
|
|
204
204
|
serviceName,
|
|
205
205
|
});
|
|
206
|
+
const namedClient = this._namedClient(node);
|
|
206
207
|
operationResultType = this._externalImportPrefix + operationResultType;
|
|
207
208
|
operationVariablesTypes = this._externalImportPrefix + operationVariablesTypes;
|
|
208
209
|
const content = `
|
|
@@ -211,7 +212,7 @@ class ApolloAngularVisitor extends visitorPluginCommon.ClientSideBaseVisitor {
|
|
|
211
212
|
})
|
|
212
213
|
export class ${serviceName} extends Apollo.${operationType}<${operationResultType}, ${operationVariablesTypes}> {
|
|
213
214
|
${this.config.addExplicitOverride ? 'override ' : ''}document = ${this._getDocumentNodeVariable(node, documentVariableName)};
|
|
214
|
-
${this.
|
|
215
|
+
${namedClient !== '' ? (this.config.addExplicitOverride ? 'override ' : '') + namedClient : ''}
|
|
215
216
|
constructor(${this.dependencyInjections}) {
|
|
216
217
|
super(${this.dependencyInjectionArgs});
|
|
217
218
|
}
|
package/index.mjs
CHANGED
|
@@ -197,6 +197,7 @@ class ApolloAngularVisitor extends ClientSideBaseVisitor {
|
|
|
197
197
|
operationVariablesTypes,
|
|
198
198
|
serviceName,
|
|
199
199
|
});
|
|
200
|
+
const namedClient = this._namedClient(node);
|
|
200
201
|
operationResultType = this._externalImportPrefix + operationResultType;
|
|
201
202
|
operationVariablesTypes = this._externalImportPrefix + operationVariablesTypes;
|
|
202
203
|
const content = `
|
|
@@ -205,7 +206,7 @@ class ApolloAngularVisitor extends ClientSideBaseVisitor {
|
|
|
205
206
|
})
|
|
206
207
|
export class ${serviceName} extends Apollo.${operationType}<${operationResultType}, ${operationVariablesTypes}> {
|
|
207
208
|
${this.config.addExplicitOverride ? 'override ' : ''}document = ${this._getDocumentNodeVariable(node, documentVariableName)};
|
|
208
|
-
${this.
|
|
209
|
+
${namedClient !== '' ? (this.config.addExplicitOverride ? 'override ' : '') + namedClient : ''}
|
|
209
210
|
constructor(${this.dependencyInjections}) {
|
|
210
211
|
super(${this.dependencyInjectionArgs});
|
|
211
212
|
}
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-codegen/typescript-apollo-angular",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.9",
|
|
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.
|
|
10
|
+
"@graphql-codegen/visitor-plugin-common": "2.7.6",
|
|
11
11
|
"auto-bind": "~4.0.0",
|
|
12
12
|
"change-case-all": "1.0.14",
|
|
13
|
-
"tslib": "~2.
|
|
13
|
+
"tslib": "~2.4.0"
|
|
14
14
|
},
|
|
15
15
|
"repository": {
|
|
16
16
|
"type": "git",
|