@graphql-codegen/typescript-react-query 3.5.3-alpha-252a8d50d.0 → 3.5.3-alpha-ef6d8c7c9.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 +0 -4
  2. package/index.mjs +0 -4
  3. package/package.json +3 -3
package/index.js CHANGED
@@ -64,8 +64,6 @@ class CustomMapperFetcher {
64
64
  }
65
65
  generateInfiniteQueryHook(node, documentVariableName, operationName, operationResultType, operationVariablesTypes, hasRequiredVariables) {
66
66
  const variables = `variables${hasRequiredVariables ? '' : '?'}: ${operationVariablesTypes}`;
67
- const typeImport = this.visitor.config.useTypeImports ? 'import type' : 'import';
68
- this.visitor.imports.add(`${typeImport} { RequestInit } from 'graphql-request/dist/types.dom';`);
69
67
  const hookConfig = this.visitor.queryMethodMap;
70
68
  this.visitor.reactQueryIdentifiersInUse.add(hookConfig.infiniteQuery.hook);
71
69
  this.visitor.reactQueryIdentifiersInUse.add(hookConfig.infiniteQuery.options);
@@ -137,8 +135,6 @@ class CustomMapperFetcher {
137
135
  // Related: https://reactjs.org/docs/hooks-rules.html
138
136
  if (this._isReactHook)
139
137
  return '';
140
- const typeImport = this.visitor.config.useTypeImports ? 'import type' : 'import';
141
- this.visitor.imports.add(`${typeImport} { RequestInit } from 'graphql-request/dist/types.dom';`);
142
138
  const variables = `variables${hasRequiredVariables ? '' : '?'}: ${operationVariablesTypes}`;
143
139
  const typedFetcher = this.getFetcherFnName(operationResultType, operationVariablesTypes);
144
140
  const impl = `${typedFetcher}(${documentVariableName}, variables, options)`;
package/index.mjs CHANGED
@@ -58,8 +58,6 @@ class CustomMapperFetcher {
58
58
  }
59
59
  generateInfiniteQueryHook(node, documentVariableName, operationName, operationResultType, operationVariablesTypes, hasRequiredVariables) {
60
60
  const variables = `variables${hasRequiredVariables ? '' : '?'}: ${operationVariablesTypes}`;
61
- const typeImport = this.visitor.config.useTypeImports ? 'import type' : 'import';
62
- this.visitor.imports.add(`${typeImport} { RequestInit } from 'graphql-request/dist/types.dom';`);
63
61
  const hookConfig = this.visitor.queryMethodMap;
64
62
  this.visitor.reactQueryIdentifiersInUse.add(hookConfig.infiniteQuery.hook);
65
63
  this.visitor.reactQueryIdentifiersInUse.add(hookConfig.infiniteQuery.options);
@@ -131,8 +129,6 @@ class CustomMapperFetcher {
131
129
  // Related: https://reactjs.org/docs/hooks-rules.html
132
130
  if (this._isReactHook)
133
131
  return '';
134
- const typeImport = this.visitor.config.useTypeImports ? 'import type' : 'import';
135
- this.visitor.imports.add(`${typeImport} { RequestInit } from 'graphql-request/dist/types.dom';`);
136
132
  const variables = `variables${hasRequiredVariables ? '' : '?'}: ${operationVariablesTypes}`;
137
133
  const typedFetcher = this.getFetcherFnName(operationResultType, operationVariablesTypes);
138
134
  const impl = `${typedFetcher}(${documentVariableName}, variables, options)`;
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@graphql-codegen/typescript-react-query",
3
- "version": "3.5.3-alpha-252a8d50d.0",
3
+ "version": "3.5.3-alpha-ef6d8c7c9.0",
4
4
  "description": "GraphQL Code Generator plugin for generating a ready-to-use React-Query Hooks 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
- "@graphql-codegen/plugin-helpers": "2.5.0-alpha-252a8d50d.0",
10
- "@graphql-codegen/visitor-plugin-common": "2.6.1-alpha-252a8d50d.0",
9
+ "@graphql-codegen/plugin-helpers": "^2.4.0",
10
+ "@graphql-codegen/visitor-plugin-common": "2.7.0-alpha-ef6d8c7c9.0",
11
11
  "auto-bind": "~4.0.0",
12
12
  "change-case-all": "1.0.14",
13
13
  "tslib": "~2.3.0"