Avoid unavailable posts in relatedContributions

This commit is contained in:
roschaefer 2019-09-03 21:49:42 +02:00
parent 5f14b4c45f
commit af8475f28e
2 changed files with 2 additions and 0 deletions

View File

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

View File

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