Add product blacklisting mutation (#18)

This commit is contained in:
Niklas Fondberg
2021-09-01 15:27:52 +02:00
committed by GitHub
parent cbb0024359
commit cb4a7c40b7
5 changed files with 59 additions and 1 deletions
+7
View File
@@ -87,4 +87,11 @@ export const productMutationTypeDefs = {
);
return (<ProductAPI>dataSources.productApi).getProduct(productId);
},
async productBlacklisting(_, { productId, markets }, { dataSources }) {
await (<ProductAPI>dataSources.productApi).updateBlacklisting(
productId,
markets,
);
return (<ProductAPI>dataSources.productApi).getProduct(productId);
},
};