diff --git a/backend/src/schema/resolvers/posts.js b/backend/src/schema/resolvers/posts.js index 7f466d0e0..f1dad0f70 100644 --- a/backend/src/schema/resolvers/posts.js +++ b/backend/src/schema/resolvers/posts.js @@ -233,6 +233,7 @@ export default { const { id } = parent const statement = ` MATCH (p:Post {id: $id})-[:TAGGED|CATEGORIZED]->(categoryOrTag)<-[:TAGGED|CATEGORIZED]-(post:Post) + WHERE NOT post.deleted AND NOT post.disabled RETURN DISTINCT post LIMIT 10 ` diff --git a/backend/src/schema/types/type/Post.gql b/backend/src/schema/types/type/Post.gql index eeaae0279..0e1121cd2 100644 --- a/backend/src/schema/types/type/Post.gql +++ b/backend/src/schema/types/type/Post.gql @@ -20,6 +20,7 @@ type Post { @cypher( statement: """ MATCH (this)-[:TAGGED|CATEGORIZED]->(categoryOrTag)<-[:TAGGED|CATEGORIZED]-(post:Post) + WHERE NOT post.deleted AND NOT post.disabled RETURN DISTINCT post LIMIT 10 """