@infrab4a/connect 4.2.5 → 4.2.6-beta.0

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
@@ -4989,7 +4989,9 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
4989
4989
  objects: {
4990
4990
  type: '[category_product_insert_input!]',
4991
4991
  required: true,
4992
- value: plainData.categories.map((categoryId) => ({ category_id: categoryId, product_id: productId })),
4992
+ value: plainData.categories
4993
+ .filter((categoryId) => !product.categories.includes(categoryId))
4994
+ .map((categoryId) => ({ category_id: categoryId, product_id: productId })),
4993
4995
  },
4994
4996
  });
4995
4997
  return plainData.categories;
package/index.esm.js CHANGED
@@ -4983,7 +4983,9 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
4983
4983
  objects: {
4984
4984
  type: '[category_product_insert_input!]',
4985
4985
  required: true,
4986
- value: plainData.categories.map((categoryId) => ({ category_id: categoryId, product_id: productId })),
4986
+ value: plainData.categories
4987
+ .filter((categoryId) => !product.categories.includes(categoryId))
4988
+ .map((categoryId) => ({ category_id: categoryId, product_id: productId })),
4987
4989
  },
4988
4990
  });
4989
4991
  return plainData.categories;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infrab4a/connect",
3
- "version": "4.2.5",
3
+ "version": "4.2.6-beta.0",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org"
6
6
  },