@maioradv/cms-basic-lib 1.4.5 → 1.4.6

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.
@@ -30,7 +30,7 @@ exports.BundlesResolvers = {
30
30
  }
31
31
  price
32
32
  fullPrice
33
- productId
33
+ bundleId
34
34
  published
35
35
  createdAt
36
36
  updatedAt
package/dist/model.js CHANGED
@@ -22,6 +22,7 @@ class ApiModule {
22
22
  }
23
23
  }
24
24
  async _graphql(resolver, variables) {
25
+ var _a, _b;
25
26
  try {
26
27
  const response = await this.client.request({
27
28
  method: 'post',
@@ -36,6 +37,10 @@ class ApiModule {
36
37
  return response.data.data[resolver.name];
37
38
  }
38
39
  catch (error) {
40
+ if ((_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.errors) {
41
+ const GQLError = new Error(error.response.data.errors.map(e => e.message).join(', '));
42
+ throw new error_1.GraphApiError(GQLError);
43
+ }
39
44
  throw new error_1.GraphApiError(error);
40
45
  }
41
46
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maioradv/cms-basic-lib",
3
- "version": "1.4.5",
3
+ "version": "1.4.6",
4
4
  "description": "JS lib for Maior CMS Basic Api",
5
5
  "repository": "https://github.com/maioradv/cms-basic-lib.git",
6
6
  "author": "Maior ADV Srl",