@graphql-codegen/typescript-graphql-request 4.4.9 → 4.4.11
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 +2 -4
- package/index.mjs +2 -4
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -24,10 +24,8 @@ class GraphQLRequestVisitor extends visitorPluginCommon.ClientSideBaseVisitor {
|
|
|
24
24
|
const typeImport = this.config.useTypeImports ? 'import type' : 'import';
|
|
25
25
|
this._additionalImports.push(`${typeImport} { GraphQLClient } from 'graphql-request';`);
|
|
26
26
|
this._additionalImports.push(`${typeImport} * as Dom from 'graphql-request/dist/types.dom';`);
|
|
27
|
-
if (this.config.rawRequest) {
|
|
28
|
-
|
|
29
|
-
this._additionalImports.push(`import { print } from 'graphql'`);
|
|
30
|
-
}
|
|
27
|
+
if (this.config.rawRequest && this.config.documentMode !== visitorPluginCommon.DocumentMode.string) {
|
|
28
|
+
this._additionalImports.push(`import { print } from 'graphql'`);
|
|
31
29
|
}
|
|
32
30
|
}
|
|
33
31
|
OperationDefinition(node) {
|
package/index.mjs
CHANGED
|
@@ -18,10 +18,8 @@ class GraphQLRequestVisitor extends ClientSideBaseVisitor {
|
|
|
18
18
|
const typeImport = this.config.useTypeImports ? 'import type' : 'import';
|
|
19
19
|
this._additionalImports.push(`${typeImport} { GraphQLClient } from 'graphql-request';`);
|
|
20
20
|
this._additionalImports.push(`${typeImport} * as Dom from 'graphql-request/dist/types.dom';`);
|
|
21
|
-
if (this.config.rawRequest) {
|
|
22
|
-
|
|
23
|
-
this._additionalImports.push(`import { print } from 'graphql'`);
|
|
24
|
-
}
|
|
21
|
+
if (this.config.rawRequest && this.config.documentMode !== DocumentMode.string) {
|
|
22
|
+
this._additionalImports.push(`import { print } from 'graphql'`);
|
|
25
23
|
}
|
|
26
24
|
}
|
|
27
25
|
OperationDefinition(node) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-codegen/typescript-graphql-request",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.11",
|
|
4
4
|
"description": "GraphQL Code Generator plugin for generating a ready-to-use SDK based on graphql-request and 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",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@graphql-codegen/plugin-helpers": "^2.4.0",
|
|
12
|
-
"@graphql-codegen/visitor-plugin-common": "2.
|
|
12
|
+
"@graphql-codegen/visitor-plugin-common": "2.10.0",
|
|
13
13
|
"auto-bind": "~4.0.0",
|
|
14
14
|
"tslib": "~2.4.0"
|
|
15
15
|
},
|