mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
refactor(backend): fix is muted by me query (#8365)
* use EXISTS for isMutedByMe * corrected query in gql --------- Co-authored-by: mahula <lenzmath@posteo.de>
This commit is contained in:
parent
2d8fe8a941
commit
4bd42009fd
@ -440,7 +440,7 @@ export default {
|
||||
},
|
||||
boolean: {
|
||||
isMutedByMe:
|
||||
'MATCH (this)<-[:MUTED]-(related:User {id: $cypherParams.currentUserId}) RETURN COUNT(related) >= 1',
|
||||
'MATCH (this) RETURN EXISTS( (this)<-[:MUTED]-(:User {id: $cypherParams.currentUserId}) )',
|
||||
},
|
||||
}),
|
||||
},
|
||||
|
||||
@ -42,9 +42,7 @@ type Group {
|
||||
|
||||
posts: [Post] @relation(name: "IN", direction: "IN")
|
||||
|
||||
isMutedByMe: Boolean!
|
||||
@cypher(
|
||||
statement: "MATCH (this)<-[m:MUTED]-(u:User {id: $cypherParams.currentUserId}) RETURN COUNT(m) >= 1")
|
||||
isMutedByMe: Boolean! @cypher(statement: "MATCH (this) RETURN EXISTS( (this)<-[:MUTED]-(:User {id: $cypherParams.currentUserId}) )")
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user