From efa0f473ee2144bfd0c170b739fff59161217fc7 Mon Sep 17 00:00:00 2001 From: Garrett Vercoe Date: Wed, 6 Mar 2024 15:04:37 -0500 Subject: [PATCH] comments pullable with comments { content} in GraphQL --- utils/google-drive.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/utils/google-drive.js b/utils/google-drive.js index 884d4fe..3d87967 100644 --- a/utils/google-drive.js +++ b/utils/google-drive.js @@ -324,6 +324,15 @@ async function fetchFiles({folder, ...options}) { options, }) + // Fetching comments for each file + for (let file of documentsFiles) { + const comments = await drive.comments.list({ + fileId: file.id, + fields: 'comments' + }); + file.comments = comments.data.comments; + } + return documentsFiles }