@graphql-codegen/typescript-react-apollo 4.4.2 → 4.4.3-alpha-20260808101442-e439530add2acc6e119f54b148ccb537e4d0a7ec

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 CHANGED
@@ -190,7 +190,7 @@ class ReactApolloVisitor extends visitor_plugin_common_1.ClientSideBaseVisitor {
190
190
  return [componentProps, component].join('\n');
191
191
  }
192
192
  _buildHooksJSDoc(node, operationName, operationType) {
193
- const variableString = node.variableDefinitions.reduce((acc, item) => {
193
+ const variableString = (node.variableDefinitions || []).reduce((acc, item) => {
194
194
  const name = item.variable.name.value;
195
195
  return `${acc}\n * ${name}: // value for '${name}'`;
196
196
  }, '');
package/esm/visitor.js CHANGED
@@ -186,7 +186,7 @@ export class ReactApolloVisitor extends ClientSideBaseVisitor {
186
186
  return [componentProps, component].join('\n');
187
187
  }
188
188
  _buildHooksJSDoc(node, operationName, operationType) {
189
- const variableString = node.variableDefinitions.reduce((acc, item) => {
189
+ const variableString = (node.variableDefinitions || []).reduce((acc, item) => {
190
190
  const name = item.variable.name.value;
191
191
  return `${acc}\n * ${name}: // value for '${name}'`;
192
192
  }, '');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-codegen/typescript-react-apollo",
3
- "version": "4.4.2",
3
+ "version": "4.4.3-alpha-20260808101442-e439530add2acc6e119f54b148ccb537e4d0a7ec",
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"