@graphql-codegen/typescript-react-apollo 4.3.3 → 4.3.4
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 +4 -1
- package/esm/visitor.js +4 -1
- package/package.json +1 -1
package/cjs/visitor.js
CHANGED
|
@@ -264,7 +264,10 @@ class ReactApolloVisitor extends visitor_plugin_common_1.ClientSideBaseVisitor {
|
|
|
264
264
|
suffix: (0, change_case_all_1.pascalCase)('SuspenseQuery'),
|
|
265
265
|
useTypesPrefix: false,
|
|
266
266
|
}) + this.config.hooksSuffix;
|
|
267
|
-
hookFns.push(
|
|
267
|
+
hookFns.push(`// @ts-ignore
|
|
268
|
+
export function use${suspenseOperationName}(baseOptions?: ${this.getApolloReactHooksIdentifier()}.SuspenseQueryHookOptions<${operationResultType}, ${operationVariablesTypes}>): ${this.getApolloReactHooksIdentifier()}.UseSuspenseQueryResult<${operationResultType}, ${operationVariablesTypes}>;
|
|
269
|
+
export function use${suspenseOperationName}(baseOptions?: ${this.getApolloReactHooksIdentifier()}.SkipToken | ${this.getApolloReactHooksIdentifier()}.SuspenseQueryHookOptions<${operationResultType}, ${operationVariablesTypes}>): ${this.getApolloReactHooksIdentifier()}.UseSuspenseQueryResult<${operationResultType} | undefined, ${operationVariablesTypes}>;
|
|
270
|
+
export function use${suspenseOperationName}(baseOptions?: ${this.getApolloReactHooksIdentifier()}.SkipToken | ${this.getApolloReactHooksIdentifier()}.SuspenseQueryHookOptions<${operationResultType}, ${operationVariablesTypes}>) {
|
|
268
271
|
const options = baseOptions === ${this.getApolloReactHooksIdentifier()}.skipToken ? baseOptions : {...defaultOptions, ...baseOptions}
|
|
269
272
|
return ${this.getApolloReactHooksIdentifier()}.useSuspenseQuery<${operationResultType}, ${operationVariablesTypes}>(${this.getDocumentNodeVariable(node, documentVariableName)}, options);
|
|
270
273
|
}`);
|
package/esm/visitor.js
CHANGED
|
@@ -260,7 +260,10 @@ export class ReactApolloVisitor extends ClientSideBaseVisitor {
|
|
|
260
260
|
suffix: pascalCase('SuspenseQuery'),
|
|
261
261
|
useTypesPrefix: false,
|
|
262
262
|
}) + this.config.hooksSuffix;
|
|
263
|
-
hookFns.push(
|
|
263
|
+
hookFns.push(`// @ts-ignore
|
|
264
|
+
export function use${suspenseOperationName}(baseOptions?: ${this.getApolloReactHooksIdentifier()}.SuspenseQueryHookOptions<${operationResultType}, ${operationVariablesTypes}>): ${this.getApolloReactHooksIdentifier()}.UseSuspenseQueryResult<${operationResultType}, ${operationVariablesTypes}>;
|
|
265
|
+
export function use${suspenseOperationName}(baseOptions?: ${this.getApolloReactHooksIdentifier()}.SkipToken | ${this.getApolloReactHooksIdentifier()}.SuspenseQueryHookOptions<${operationResultType}, ${operationVariablesTypes}>): ${this.getApolloReactHooksIdentifier()}.UseSuspenseQueryResult<${operationResultType} | undefined, ${operationVariablesTypes}>;
|
|
266
|
+
export function use${suspenseOperationName}(baseOptions?: ${this.getApolloReactHooksIdentifier()}.SkipToken | ${this.getApolloReactHooksIdentifier()}.SuspenseQueryHookOptions<${operationResultType}, ${operationVariablesTypes}>) {
|
|
264
267
|
const options = baseOptions === ${this.getApolloReactHooksIdentifier()}.skipToken ? baseOptions : {...defaultOptions, ...baseOptions}
|
|
265
268
|
return ${this.getApolloReactHooksIdentifier()}.useSuspenseQuery<${operationResultType}, ${operationVariablesTypes}>(${this.getDocumentNodeVariable(node, documentVariableName)}, options);
|
|
266
269
|
}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-codegen/typescript-react-apollo",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.4",
|
|
4
4
|
"description": "GraphQL Code Generator plugin for generating a ready-to-use React Components/HOC/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"
|