@graphql-codegen/typescript-react-query 6.0.1-alpha-20231126041150-01a328d1e → 6.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 +2 -4
- package/esm/visitor.js +2 -4
- package/package.json +2 -2
- package/typings/config.d.cts +1 -1
- package/typings/config.d.ts +1 -1
package/cjs/visitor.js
CHANGED
|
@@ -96,13 +96,11 @@ class ReactQueryVisitor extends visitor_plugin_common_1.ClientSideBaseVisitor {
|
|
|
96
96
|
const generateConfig = {
|
|
97
97
|
node,
|
|
98
98
|
documentVariableName,
|
|
99
|
-
operationResultType,
|
|
100
|
-
operationVariablesTypes,
|
|
99
|
+
operationResultType: this._externalImportPrefix + operationResultType,
|
|
100
|
+
operationVariablesTypes: this._externalImportPrefix + operationVariablesTypes,
|
|
101
101
|
hasRequiredVariables,
|
|
102
102
|
operationName,
|
|
103
103
|
};
|
|
104
|
-
operationResultType = this._externalImportPrefix + operationResultType;
|
|
105
|
-
operationVariablesTypes = this._externalImportPrefix + operationVariablesTypes;
|
|
106
104
|
const queries = [];
|
|
107
105
|
const getOutputFromQueries = () => `\n${queries.join('\n\n')}\n`;
|
|
108
106
|
if (operationType === 'Query') {
|
package/esm/visitor.js
CHANGED
|
@@ -92,13 +92,11 @@ export class ReactQueryVisitor extends ClientSideBaseVisitor {
|
|
|
92
92
|
const generateConfig = {
|
|
93
93
|
node,
|
|
94
94
|
documentVariableName,
|
|
95
|
-
operationResultType,
|
|
96
|
-
operationVariablesTypes,
|
|
95
|
+
operationResultType: this._externalImportPrefix + operationResultType,
|
|
96
|
+
operationVariablesTypes: this._externalImportPrefix + operationVariablesTypes,
|
|
97
97
|
hasRequiredVariables,
|
|
98
98
|
operationName,
|
|
99
99
|
};
|
|
100
|
-
operationResultType = this._externalImportPrefix + operationResultType;
|
|
101
|
-
operationVariablesTypes = this._externalImportPrefix + operationVariablesTypes;
|
|
102
100
|
const queries = [];
|
|
103
101
|
const getOutputFromQueries = () => `\n${queries.join('\n\n')}\n`;
|
|
104
102
|
if (operationType === 'Query') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-codegen/typescript-react-query",
|
|
3
|
-
"version": "6.0
|
|
3
|
+
"version": "6.1.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"
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"@graphql-codegen/plugin-helpers": "^3.0.0",
|
|
10
10
|
"@graphql-codegen/visitor-plugin-common": "2.13.1",
|
|
11
11
|
"auto-bind": "~4.0.0",
|
|
12
|
-
"change-case-all": "
|
|
12
|
+
"change-case-all": "1.0.15",
|
|
13
13
|
"tslib": "~2.6.0"
|
|
14
14
|
},
|
|
15
15
|
"repository": {
|
package/typings/config.d.cts
CHANGED
|
@@ -111,7 +111,7 @@ export interface BaseReactQueryPluginConfig {
|
|
|
111
111
|
* > **If you are using the `react-query` package instead of the `@tanstack/react-query` package in your project, please set the `legacyMode` option to `true`.**
|
|
112
112
|
*
|
|
113
113
|
*/
|
|
114
|
-
export interface ReactQueryRawPluginConfig extends Omit<RawClientSideBasePluginConfig, 'documentMode' | 'noGraphQLTag' | 'gqlImport' | 'documentNodeImport' | 'noExport' | '
|
|
114
|
+
export interface ReactQueryRawPluginConfig extends Omit<RawClientSideBasePluginConfig, 'documentMode' | 'noGraphQLTag' | 'gqlImport' | 'documentNodeImport' | 'noExport' | 'importDocumentNodeExternallyFrom' | 'useTypeImports' | 'legacyMode'>, BaseReactQueryPluginConfig {
|
|
115
115
|
/**
|
|
116
116
|
* @description Customize the fetcher you wish to use in the generated file. React-Query is agnostic to the data-fetching layer, so you should provide it, or use a custom one.
|
|
117
117
|
*
|
package/typings/config.d.ts
CHANGED
|
@@ -111,7 +111,7 @@ export interface BaseReactQueryPluginConfig {
|
|
|
111
111
|
* > **If you are using the `react-query` package instead of the `@tanstack/react-query` package in your project, please set the `legacyMode` option to `true`.**
|
|
112
112
|
*
|
|
113
113
|
*/
|
|
114
|
-
export interface ReactQueryRawPluginConfig extends Omit<RawClientSideBasePluginConfig, 'documentMode' | 'noGraphQLTag' | 'gqlImport' | 'documentNodeImport' | 'noExport' | '
|
|
114
|
+
export interface ReactQueryRawPluginConfig extends Omit<RawClientSideBasePluginConfig, 'documentMode' | 'noGraphQLTag' | 'gqlImport' | 'documentNodeImport' | 'noExport' | 'importDocumentNodeExternallyFrom' | 'useTypeImports' | 'legacyMode'>, BaseReactQueryPluginConfig {
|
|
115
115
|
/**
|
|
116
116
|
* @description Customize the fetcher you wish to use in the generated file. React-Query is agnostic to the data-fetching layer, so you should provide it, or use a custom one.
|
|
117
117
|
*
|