IO-1124 Archive message

This commit is contained in:
Patrick Fic
2021-06-09 09:59:49 -07:00
parent a45bf6d959
commit 7a8e8de724
9 changed files with 116 additions and 10 deletions

View File

@@ -13,7 +13,10 @@ query FIND_BODYSHOP_BY_MESSAGING_SERVICE_SID(
`;
exports.INSERT_MESSAGE = `
mutation INSERT_MESSAGE($msg: [messages_insert_input!]!) {
mutation INSERT_MESSAGE($msg: [messages_insert_input!]!, $conversationid: uuid) {
update_conversations(where: {id: {_eq: $conversationid}}, _set: {archived: false}) {
affected_rows
}
insert_messages(objects: $msg) {
returning {
conversation {
@@ -28,6 +31,7 @@ mutation INSERT_MESSAGE($msg: [messages_insert_input!]!) {
}
}
}
`;
exports.UPDATE_MESSAGE_STATUS = `