@infrab4a/connect 1.0.0-beta.37 → 1.0.0-beta.39
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/bundles/infrab4a-connect.umd.js +12 -2
- package/bundles/infrab4a-connect.umd.js.map +1 -1
- package/domain/catalog/models/product.d.ts +1 -0
- package/esm2015/domain/catalog/models/product.js +1 -1
- package/esm2015/infra/hasura-graphql/mixins/helpers/graphql-field.helper.js +4 -2
- package/esm2015/infra/hasura-graphql/repositories/catalog/category-hasura-graphql.repository.js +2 -1
- package/esm2015/infra/hasura-graphql/repositories/catalog/product-hasura-graphql.repository.js +10 -3
- package/esm2015/infra/hasura-graphql/types/hasura-graphql-fields.type.js +1 -1
- package/fesm2015/infrab4a-connect.js +12 -2
- package/fesm2015/infrab4a-connect.js.map +1 -1
- package/infra/hasura-graphql/mixins/helpers/attribute-option.helper.d.ts +2 -2
- package/infra/hasura-graphql/types/hasura-graphql-fields.type.d.ts +3 -3
- package/package.json +1 -1
|
@@ -3017,7 +3017,9 @@
|
|
|
3017
3017
|
? from(data[columnName], data)
|
|
3018
3018
|
: data[columnName].map(function (value) { return GraphQLFieldHelper.ConvertFieldValueFrom(value, attributeFields); }), _b));
|
|
3019
3019
|
if (lodash.isObject(data[columnName]))
|
|
3020
|
-
return Object.assign(Object.assign({}, result), (_c = {}, _c[attributeName] =
|
|
3020
|
+
return Object.assign(Object.assign({}, result), (_c = {}, _c[attributeName] = !!from
|
|
3021
|
+
? from(data[columnName])
|
|
3022
|
+
: GraphQLFieldHelper.ConvertFieldValueFrom(data[columnName], attributeFields), _c));
|
|
3021
3023
|
}
|
|
3022
3024
|
if (!!from)
|
|
3023
3025
|
return Object.assign(Object.assign({}, result), (_d = {}, _d[attributeName] = from(data[columnName], data), _d));
|
|
@@ -3795,6 +3797,7 @@
|
|
|
3795
3797
|
'isKit',
|
|
3796
3798
|
'shopAvailability',
|
|
3797
3799
|
'sku',
|
|
3800
|
+
'rate',
|
|
3798
3801
|
] }, ((options === null || options === void 0 ? void 0 : options.limit) ? { limits: { limit: options === null || options === void 0 ? void 0 : options.limit } } : {})))];
|
|
3799
3802
|
case 1:
|
|
3800
3803
|
productsData = (_d.sent()).data;
|
|
@@ -3898,6 +3901,13 @@
|
|
|
3898
3901
|
{ isKit: { columnName: 'is_kit' } },
|
|
3899
3902
|
{ createdAt: { columnName: 'created_at' } },
|
|
3900
3903
|
{ updatedAt: { columnName: 'updated_at' } },
|
|
3904
|
+
{
|
|
3905
|
+
rate: {
|
|
3906
|
+
columnName: 'reviews_aggregate',
|
|
3907
|
+
fields: [{ aggregate: [{ avg: ['rate'] }] }],
|
|
3908
|
+
from: function (value) { return value.aggregate.avg.rate; },
|
|
3909
|
+
},
|
|
3910
|
+
},
|
|
3901
3911
|
];
|
|
3902
3912
|
_this.fields = __spreadArray(__spreadArray([], __read(commonFields)), [
|
|
3903
3913
|
{
|
|
@@ -4016,7 +4026,7 @@
|
|
|
4016
4026
|
switch (_d.label) {
|
|
4017
4027
|
case 0: return [4 /*yield*/, this.find({
|
|
4018
4028
|
filters: {
|
|
4019
|
-
slug: slug
|
|
4029
|
+
slug: slug,
|
|
4020
4030
|
},
|
|
4021
4031
|
})];
|
|
4022
4032
|
case 1:
|