mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +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: {
|
boolean: {
|
||||||
isMutedByMe:
|
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")
|
posts: [Post] @relation(name: "IN", direction: "IN")
|
||||||
|
|
||||||
isMutedByMe: Boolean!
|
isMutedByMe: Boolean! @cypher(statement: "MATCH (this) RETURN EXISTS( (this)<-[:MUTED]-(:User {id: $cypherParams.currentUserId}) )")
|
||||||
@cypher(
|
|
||||||
statement: "MATCH (this)<-[m:MUTED]-(u:User {id: $cypherParams.currentUserId}) RETURN COUNT(m) >= 1")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user