42: add product group interiors mutation (#44)

This commit is contained in:
Arwid Thornström
2021-09-16 09:42:06 +02:00
committed by GitHub
parent c4915cb15f
commit e52c7d4522
4 changed files with 98 additions and 1 deletions
+12
View File
@@ -122,6 +122,18 @@ export const productMutationTypeDefs = {
)).generateNewInteriors(product);
return product;
},
async productGroupInteriors(
_,
{ productId, groupId, roomNames },
{ dataSources },
) {
await (<ProductAPI>dataSources.productApi).addInteriorsToProductGroup(
productId,
groupId,
roomNames,
);
return (<ProductAPI>dataSources.productApi).getProduct(productId);
},
async productKeywords(_, { productId, keywordIds }, { dataSources }) {
await (<KeywordAPI>dataSources.keywordApi).setProductKeywords(
productId,