From 832763022d22e5955eebeca12691c4ce27b1d441 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Sat, 3 Jun 2023 03:02:22 +0200 Subject: [PATCH] also include author --- backend/src/schema/resolvers/reports.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/schema/resolvers/reports.js b/backend/src/schema/resolvers/reports.js index 442e9703b..4936d112f 100644 --- a/backend/src/schema/resolvers/reports.js +++ b/backend/src/schema/resolvers/reports.js @@ -92,7 +92,7 @@ export default { [(submitter:User)-[filed:FILED]->(report) | filed {.*, submitter: properties(submitter)} ] as filed, [(moderator:User)-[reviewed:REVIEWED]->(report) | reviewed {.*, moderator: properties(moderator)} ] as reviewed, [(resource)<-[:WROTE]-(author:User) | author {.*} ] as optionalAuthors, - [(resource)-[:COMMENTS]->(post:Post) | post {.*, postType: filter(l IN labels(post) WHERE NOT l = "Post")} ] as optionalCommentedPosts, + [(resource)-[:COMMENTS]->(post:Post) | post {.*, author: properties(author), postType: filter(l IN labels(post) WHERE NOT l = "Post")} ] as optionalCommentedPosts, resource {.*, __typename: labels(resource)[0] } as resourceWithType WITH report, optionalAuthors, optionalCommentedPosts, reviewed, filed, resourceWithType {.*, post: optionalCommentedPosts[0], author: optionalAuthors[0] } as finalResource