sdy

update addCategory resolver

......@@ -4,6 +4,12 @@ export default {
Mutation: {
addCategory: async (_, args) => {
const { name } = args;
const newCategory = await prisma.category.create({
data: {
name,
},
});
return newCategory;
},
},
};
......