IO-2195 Conversation query performance improvements.
This commit is contained in:
@@ -31,6 +31,18 @@ import { gql } from "@apollo/client";
|
||||
// }
|
||||
// `;
|
||||
|
||||
export const UNREAD_CONVERSATION_COUNT = gql`
|
||||
query UNREAD_CONVERSATION_COUNT {
|
||||
messages_aggregate(
|
||||
where: { read: { _eq: false }, isoutbound: { _eq: false } }
|
||||
) {
|
||||
aggregate {
|
||||
count
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const CONVERSATION_LIST_QUERY = gql`
|
||||
query CONVERSATION_LIST_QUERY {
|
||||
conversations(
|
||||
|
||||
Reference in New Issue
Block a user