sdy

update addCategory resolver

...@@ -4,6 +4,12 @@ export default { ...@@ -4,6 +4,12 @@ export default {
4 Mutation: { 4 Mutation: {
5 addCategory: async (_, args) => { 5 addCategory: async (_, args) => {
6 const { name } = args; 6 const { name } = args;
7 + const newCategory = await prisma.category.create({
8 + data: {
9 + name,
10 + },
11 + });
12 + return newCategory;
7 }, 13 },
8 }, 14 },
9 }; 15 };
......