@graphql-codegen/typescript-graphql-request 4.3.1-alpha-ac95f9557.0 → 4.3.3-alpha-23d229715.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/config.d.ts CHANGED
@@ -1,22 +1,22 @@
1
1
  import { RawClientSideBasePluginConfig } from '@graphql-codegen/visitor-plugin-common';
2
2
  /**
3
- * @description This plugin generates [`graphql-request`](https://www.npmjs.com/package/graphql-request) ready-to-use SDK, which is fully-typed.
3
+ * @description This plugin generates [`graphql-request`](https://npmjs.com/package/graphql-request) ready-to-use SDK, which is fully-typed.
4
4
  */
5
5
  export interface RawGraphQLRequestPluginConfig extends RawClientSideBasePluginConfig {
6
6
  /**
7
- * @description By default the `request` method return the `data` or `errors` key from the response. If you need to access the `extensions` key you can use the `rawRequest` method.
7
+ * @description By default, the `request` method return the `data` or `errors` key from the response. If you need to access the `extensions` key you can use the `rawRequest` method.
8
8
  * @default false
9
9
  *
10
10
  * @exampleMarkdown
11
11
  * ```yml
12
12
  * generates:
13
- * path/to/file.ts:
14
- * plugins:
15
- * - typescript
16
- * - typescript-operations
17
- * - typescript-graphql-request
18
- * config:
19
- * rawRequest: true
13
+ * path/to/file.ts:
14
+ * plugins:
15
+ * - typescript
16
+ * - typescript-operations
17
+ * - typescript-graphql-request
18
+ * config:
19
+ * rawRequest: true
20
20
  * ```
21
21
  */
22
22
  rawRequest?: boolean;
package/index.js CHANGED
@@ -27,7 +27,7 @@ class GraphQLRequestVisitor extends visitorPluginCommon.ClientSideBaseVisitor {
27
27
  if (this.config.rawRequest) {
28
28
  this._additionalImports.push(`${typeImport} { GraphQLError } from 'graphql-request/dist/types';`);
29
29
  if (this.config.documentMode !== visitorPluginCommon.DocumentMode.string) {
30
- this._additionalImports.push(`${typeImport} { print } from 'graphql'`);
30
+ this._additionalImports.push(`import { print } from 'graphql'`);
31
31
  }
32
32
  }
33
33
  }
package/index.mjs CHANGED
@@ -21,7 +21,7 @@ class GraphQLRequestVisitor extends ClientSideBaseVisitor {
21
21
  if (this.config.rawRequest) {
22
22
  this._additionalImports.push(`${typeImport} { GraphQLError } from 'graphql-request/dist/types';`);
23
23
  if (this.config.documentMode !== DocumentMode.string) {
24
- this._additionalImports.push(`${typeImport} { print } from 'graphql'`);
24
+ this._additionalImports.push(`import { print } from 'graphql'`);
25
25
  }
26
26
  }
27
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-codegen/typescript-graphql-request",
3
- "version": "4.3.1-alpha-ac95f9557.0",
3
+ "version": "4.3.3-alpha-23d229715.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",
@@ -8,8 +8,8 @@
8
8
  "graphql-tag": "^2.0.0"
9
9
  },
10
10
  "dependencies": {
11
- "@graphql-codegen/plugin-helpers": "^2.3.0",
12
- "@graphql-codegen/visitor-plugin-common": "2.5.1-alpha-ac95f9557.0",
11
+ "@graphql-codegen/plugin-helpers": "2.4.0-alpha-23d229715.0",
12
+ "@graphql-codegen/visitor-plugin-common": "2.5.2-alpha-23d229715.0",
13
13
  "auto-bind": "~4.0.0",
14
14
  "tslib": "~2.3.0"
15
15
  },
@@ -26,6 +26,7 @@
26
26
  "definition": "index.d.ts"
27
27
  },
28
28
  "exports": {
29
+ "./package.json": "./package.json",
29
30
  ".": {
30
31
  "require": "./index.js",
31
32
  "import": "./index.mjs"