From b0121990bab6faf8732291d46b322a30d851557b Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Sat, 3 Jun 2023 03:48:41 +0200 Subject: [PATCH] try using optionalAuthors --- 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 4936d112f..e166721ec 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 {.*, author: properties(author), postType: filter(l IN labels(post) WHERE NOT l = "Post")} ] as optionalCommentedPosts, + [(resource)-[:COMMENTS]->(post:Post) | post {.*, author: properties(optionalAuthors), 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