diff --git a/backend/src/graphql/resolvers/notifications.ts b/backend/src/graphql/resolvers/notifications.ts index 08a7c48f5..0c35c249e 100644 --- a/backend/src/graphql/resolvers/notifications.ts +++ b/backend/src/graphql/resolvers/notifications.ts @@ -54,7 +54,7 @@ export default { MATCH (resource {deleted: false, disabled: false})-[notification:NOTIFIED]->(user:User {id:$id}) ${whereClause} OPTIONAL MATCH (relatedUser:User { id: notification.relatedUserId }) - OPTIONAL MATCH (resource)<-[membership:MEMBER_OF]-(relatedUser) + OPTIONAL MATCH (resource)<-[membership:MEMBER_OF]-(user) WITH user, notification, resource, membership, relatedUser, [(resource)<-[:WROTE]-(author:User) | author {.*}] AS authors, [(resource)-[:COMMENTS]->(post:Post)<-[:WROTE]-(author:User) | post {.*, author: properties(author), postType: [l IN labels(post) WHERE NOT l = 'Post']} ] AS posts