IO-2195 Conversation query performance improvements.

This commit is contained in:
Patrick Fic
2023-03-03 09:00:44 -08:00
parent a1ab254d6f
commit 8fa0946cfa
3 changed files with 33 additions and 8 deletions

View File

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