@graphql-codegen/typescript-react-query 5.0.0-alpha-20230925212548-cee5489c0 → 5.0.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/fetcher-custom-mapper.js +0 -2
- package/cjs/fetcher-fetch-hardcoded.js +0 -1
- package/cjs/fetcher-fetch.js +0 -1
- package/cjs/fetcher-graphql-request.js +0 -1
- package/esm/fetcher-custom-mapper.js +0 -2
- package/esm/fetcher-fetch-hardcoded.js +0 -1
- package/esm/fetcher-fetch.js +0 -1
- package/esm/fetcher-graphql-request.js +0 -1
- package/package.json +1 -1
|
@@ -27,7 +27,6 @@ class CustomMapperFetcher {
|
|
|
27
27
|
return null;
|
|
28
28
|
}
|
|
29
29
|
generateInfiniteQueryHook(node, documentVariableName, operationName, operationResultType, operationVariablesTypes, hasRequiredVariables) {
|
|
30
|
-
const pageParamKey = `pageParamKey: keyof ${operationVariablesTypes}`;
|
|
31
30
|
const variables = `variables${hasRequiredVariables ? '' : '?'}: ${operationVariablesTypes}`;
|
|
32
31
|
const hookConfig = this.visitor.queryMethodMap;
|
|
33
32
|
this.visitor.reactQueryHookIdentifiersInUse.add(hookConfig.infiniteQuery.hook);
|
|
@@ -44,7 +43,6 @@ class CustomMapperFetcher {
|
|
|
44
43
|
TData = ${operationResultType},
|
|
45
44
|
TError = ${this.visitor.config.errorType}
|
|
46
45
|
>(
|
|
47
|
-
${pageParamKey},
|
|
48
46
|
${variables},
|
|
49
47
|
${options}
|
|
50
48
|
) =>{
|
package/cjs/fetcher-fetch.js
CHANGED
|
@@ -39,7 +39,6 @@ function fetcher<TData, TVariables>(endpoint: string, requestInit: RequestInit,
|
|
|
39
39
|
TError = ${this.visitor.config.errorType}
|
|
40
40
|
>(
|
|
41
41
|
dataSource: { endpoint: string, fetchParams?: RequestInit },
|
|
42
|
-
pageParamKey: keyof ${operationVariablesTypes},
|
|
43
42
|
${variables},
|
|
44
43
|
${options}
|
|
45
44
|
) =>
|
|
@@ -28,7 +28,6 @@ function fetcher<TData, TVariables extends { [key: string]: any }>(client: Graph
|
|
|
28
28
|
TData = ${operationResultType},
|
|
29
29
|
TError = ${this.visitor.config.errorType}
|
|
30
30
|
>(
|
|
31
|
-
pageParamKey: keyof ${operationVariablesTypes},
|
|
32
31
|
client: GraphQLClient,
|
|
33
32
|
${variables},
|
|
34
33
|
${options},
|
|
@@ -24,7 +24,6 @@ export class CustomMapperFetcher {
|
|
|
24
24
|
return null;
|
|
25
25
|
}
|
|
26
26
|
generateInfiniteQueryHook(node, documentVariableName, operationName, operationResultType, operationVariablesTypes, hasRequiredVariables) {
|
|
27
|
-
const pageParamKey = `pageParamKey: keyof ${operationVariablesTypes}`;
|
|
28
27
|
const variables = `variables${hasRequiredVariables ? '' : '?'}: ${operationVariablesTypes}`;
|
|
29
28
|
const hookConfig = this.visitor.queryMethodMap;
|
|
30
29
|
this.visitor.reactQueryHookIdentifiersInUse.add(hookConfig.infiniteQuery.hook);
|
|
@@ -41,7 +40,6 @@ export class CustomMapperFetcher {
|
|
|
41
40
|
TData = ${operationResultType},
|
|
42
41
|
TError = ${this.visitor.config.errorType}
|
|
43
42
|
>(
|
|
44
|
-
${pageParamKey},
|
|
45
43
|
${variables},
|
|
46
44
|
${options}
|
|
47
45
|
) =>{
|
package/esm/fetcher-fetch.js
CHANGED
|
@@ -36,7 +36,6 @@ function fetcher<TData, TVariables>(endpoint: string, requestInit: RequestInit,
|
|
|
36
36
|
TError = ${this.visitor.config.errorType}
|
|
37
37
|
>(
|
|
38
38
|
dataSource: { endpoint: string, fetchParams?: RequestInit },
|
|
39
|
-
pageParamKey: keyof ${operationVariablesTypes},
|
|
40
39
|
${variables},
|
|
41
40
|
${options}
|
|
42
41
|
) =>
|
|
@@ -25,7 +25,6 @@ function fetcher<TData, TVariables extends { [key: string]: any }>(client: Graph
|
|
|
25
25
|
TData = ${operationResultType},
|
|
26
26
|
TError = ${this.visitor.config.errorType}
|
|
27
27
|
>(
|
|
28
|
-
pageParamKey: keyof ${operationVariablesTypes},
|
|
29
28
|
client: GraphQLClient,
|
|
30
29
|
${variables},
|
|
31
30
|
${options},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-codegen/typescript-react-query",
|
|
3
|
-
"version": "5.0.0
|
|
3
|
+
"version": "5.0.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"
|