also include author

This commit is contained in:
Ulf Gebhardt 2023-06-03 03:02:22 +02:00
parent ac087edcb8
commit 832763022d
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9

View File

@ -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