mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Fix bug introduced in 6f0447515
@ulfgebhardt For the `deleted` and `disabled` flags I would be glad if we could take only one value, that is `true`, in case the post is considered disabled or deleted respectively. There might be more bugs like this now. Please keep in mind that these counts are also used as total limits for pagination and you break the pagination if you change the cypher statement.
This commit is contained in:
parent
574b42a2a7
commit
a978591843
@ -56,8 +56,7 @@ type User {
|
||||
contributionsCount: Int! @cypher(
|
||||
statement: """
|
||||
MATCH (this)-[:WROTE]->(r:Post)
|
||||
WHERE (NOT exists(r.deleted) OR r.deleted = false)
|
||||
AND (NOT exists(r.disabled) OR r.disabled = false)
|
||||
WHERE NOT r.deleted = true AND NOT r.disabled = true
|
||||
RETURN COUNT(r)
|
||||
"""
|
||||
)
|
||||
@ -78,4 +77,4 @@ type User {
|
||||
|
||||
badges: [Badge]! @relation(name: "REWARDED", direction: "IN")
|
||||
badgesCount: Int! @cypher(statement: "MATCH (this)<-[:REWARDED]-(r:Badge) RETURN COUNT(r)")
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user