@graphql-codegen/typescript-graphql-request 7.0.1 → 7.1.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/cjs/visitor.js CHANGED
@@ -16,8 +16,8 @@ class GraphQLRequestVisitor extends visitor_plugin_common_1.ClientSideBaseVisito
16
16
  });
17
17
  this._operationsToInclude = [];
18
18
  (0, auto_bind_1.default)(this);
19
- const typeImport = this.config.useTypeImports ? 'import type' : 'import';
20
- this._additionalImports.push(`${typeImport} { GraphQLClient, RequestOptions } from 'graphql-request';`);
19
+ const typeImport = this.config.useTypeImports ? 'type ' : '';
20
+ this._additionalImports.push(`import { ${typeImport}GraphQLClient, type RequestOptions } from 'graphql-request';`);
21
21
  if (this.config.rawRequest) {
22
22
  if (this.config.documentMode !== visitor_plugin_common_1.DocumentMode.string) {
23
23
  this._additionalImports.push(`import { GraphQLError, print } from 'graphql'`);
package/esm/visitor.js CHANGED
@@ -12,8 +12,8 @@ export class GraphQLRequestVisitor extends ClientSideBaseVisitor {
12
12
  });
13
13
  this._operationsToInclude = [];
14
14
  autoBind(this);
15
- const typeImport = this.config.useTypeImports ? 'import type' : 'import';
16
- this._additionalImports.push(`${typeImport} { GraphQLClient, RequestOptions } from 'graphql-request';`);
15
+ const typeImport = this.config.useTypeImports ? 'type ' : '';
16
+ this._additionalImports.push(`import { ${typeImport}GraphQLClient, type RequestOptions } from 'graphql-request';`);
17
17
  if (this.config.rawRequest) {
18
18
  if (this.config.documentMode !== DocumentMode.string) {
19
19
  this._additionalImports.push(`import { GraphQLError, print } from 'graphql'`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-codegen/typescript-graphql-request",
3
- "version": "7.0.1",
3
+ "version": "7.1.0",
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",