Add mutation for wallpaper types (#41)

This commit is contained in:
Niklas Fondberg
2021-09-13 09:25:42 +02:00
committed by GitHub
parent f0079086d9
commit 0a4be2b081
4 changed files with 39 additions and 4 deletions
+11
View File
@@ -127,4 +127,15 @@ export const productMutationTypeDefs = {
);
return (<ProductAPI>dataSources.productApi).getProduct(productId);
},
async productWallpaperType(
_,
{ productId, wallpaperTypes },
{ dataSources },
) {
await (<ProductAPI>dataSources.productApi).setWallpaperTypes(
productId,
wallpaperTypes,
);
return (<ProductAPI>dataSources.productApi).getProduct(productId);
},
};