Showing
1 changed file
with
6 additions
and
0 deletions
... | @@ -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 | }; | ... | ... |
-
Please register or login to post a comment