Add product comments (#54)

This commit is contained in:
Niklas Fondberg
2021-09-23 14:17:10 +02:00
committed by GitHub
parent 2bbb669032
commit 4fda9a8a73
4 changed files with 16 additions and 0 deletions
+7
View File
@@ -250,4 +250,11 @@ export const productMutationTypeDefs = {
);
return (<ProductAPI>dataSources.productApi).getProduct(productId);
},
async updateProductComments(_, { productId, comments }, { dataSources }) {
await (<ProductAPI>dataSources.productApi).updateComments(
productId,
comments,
);
return (<ProductAPI>dataSources.productApi).getProduct(productId);
},
};