@infrab4a/connect 5.0.0-alpha.8 → 5.0.0-alpha.9

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/index.cjs.js CHANGED
@@ -3551,8 +3551,9 @@ class HasuraFindResultHelper {
3551
3551
  const { aggregates, fields } = params;
3552
3552
  const convertFieldName = (fieldName) => {
3553
3553
  var _a, _b;
3554
- const fieldOption = (_a = fields.find((fieldOption) => fieldOption === fieldName)) !== null && _a !== void 0 ? _a : fields.find((fieldOption) => Object.keys(fieldOption).shift() === fieldName);
3555
- return fieldOption ? ((_b = Object.values(fieldOption).shift()) === null || _b === void 0 ? void 0 : _b.columnName) || fieldName : fieldName;
3554
+ const finalFieldName = fieldName.toString().split('.').pop();
3555
+ const fieldOption = (_a = fields.find((fieldOption) => fieldOption === finalFieldName)) !== null && _a !== void 0 ? _a : fields.find((fieldOption) => Object.keys(fieldOption).shift() === finalFieldName);
3556
+ return fieldOption ? ((_b = Object.values(fieldOption).shift()) === null || _b === void 0 ? void 0 : _b.columnName) || finalFieldName : finalFieldName;
3556
3557
  };
3557
3558
  return [
3558
3559
  ...(((_a = aggregates === null || aggregates === void 0 ? void 0 : aggregates.minimal) === null || _a === void 0 ? void 0 : _a.length)
package/index.esm.js CHANGED
@@ -3526,8 +3526,9 @@ class HasuraFindResultHelper {
3526
3526
  const { aggregates, fields } = params;
3527
3527
  const convertFieldName = (fieldName) => {
3528
3528
  var _a, _b;
3529
- const fieldOption = (_a = fields.find((fieldOption) => fieldOption === fieldName)) !== null && _a !== void 0 ? _a : fields.find((fieldOption) => Object.keys(fieldOption).shift() === fieldName);
3530
- return fieldOption ? ((_b = Object.values(fieldOption).shift()) === null || _b === void 0 ? void 0 : _b.columnName) || fieldName : fieldName;
3529
+ const finalFieldName = fieldName.toString().split('.').pop();
3530
+ const fieldOption = (_a = fields.find((fieldOption) => fieldOption === finalFieldName)) !== null && _a !== void 0 ? _a : fields.find((fieldOption) => Object.keys(fieldOption).shift() === finalFieldName);
3531
+ return fieldOption ? ((_b = Object.values(fieldOption).shift()) === null || _b === void 0 ? void 0 : _b.columnName) || finalFieldName : finalFieldName;
3531
3532
  };
3532
3533
  return [
3533
3534
  ...(((_a = aggregates === null || aggregates === void 0 ? void 0 : aggregates.minimal) === null || _a === void 0 ? void 0 : _a.length)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infrab4a/connect",
3
- "version": "5.0.0-alpha.8",
3
+ "version": "5.0.0-alpha.9",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org"
6
6
  },