sdy

update createRoom resolver

...@@ -3,7 +3,7 @@ import { prisma } from "../../../utils"; ...@@ -3,7 +3,7 @@ import { prisma } from "../../../utils";
3 export default { 3 export default {
4 Mutation: { 4 Mutation: {
5 createRoom: async (_, args) => { 5 createRoom: async (_, args) => {
6 - const { participantsId, categories } = args; 6 + const { participantsId, categories, name } = args;
7 let newRoom, participantId; 7 let newRoom, participantId;
8 if (participantsId !== undefined) { 8 if (participantsId !== undefined) {
9 newRoom = await prisma.room.create({ 9 newRoom = await prisma.room.create({
...@@ -15,6 +15,7 @@ export default { ...@@ -15,6 +15,7 @@ export default {
15 )), 15 )),
16 }, 16 },
17 }, 17 },
18 + name,
18 }, 19 },
19 }); 20 });
20 } 21 }
...@@ -26,6 +27,7 @@ export default { ...@@ -26,6 +27,7 @@ export default {
26 id: (category = categories.forEach((cur, _, __) => cur)), 27 id: (category = categories.forEach((cur, _, __) => cur)),
27 }, 28 },
28 }, 29 },
30 + name,
29 }, 31 },
30 }); 32 });
31 } 33 }
......