From 999be35c7c88fa6ff238f8759e4c51584f474037 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=E1=BB=8Bnh=20Duy=20H=C6=B0ng?= <57101685+HUNG-rushb@users.noreply.github.com> Date: Sun, 7 Jan 2024 14:47:30 +0700 Subject: [PATCH] ok --- src/resolvers/Mutation/post.js | 6 +++--- src/resolvers/Query/CHAT.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/resolvers/Mutation/post.js b/src/resolvers/Mutation/post.js index 871f96f..f3a84c8 100644 --- a/src/resolvers/Mutation/post.js +++ b/src/resolvers/Mutation/post.js @@ -49,7 +49,7 @@ const postMutation = { }, }, }); - console.log({ post }); + // console.log({ post }); const a = await prisma.notification.create({ data: { @@ -61,7 +61,7 @@ const postMutation = { userIds: follower.userFollower, }, }); - console.log({ a }); + // console.log({ a }); sendNotificationToClient( [ @@ -76,7 +76,7 @@ const postMutation = { }, ); } catch (e) { - console.log(e); + // console.log(e); throw e; } diff --git a/src/resolvers/Query/CHAT.js b/src/resolvers/Query/CHAT.js index 55c1452..1b66825 100644 --- a/src/resolvers/Query/CHAT.js +++ b/src/resolvers/Query/CHAT.js @@ -37,7 +37,7 @@ const chatQuery = { }); if (!after) { - nodes = a.slice(0, 10).map((post) => ({ + nodes = a.slice(0, 20).map((post) => ({ node: post, cursor: post.id, })); @@ -45,7 +45,7 @@ const chatQuery = { // console.log({ nodes }); } else { const index = a.findIndex((post) => post.id === after); - nodes = a.slice(index + 1, index + 10).map((post) => ({ + nodes = a.slice(index + 1, index + 20).map((post) => ({ node: post, cursor: post.id, }));