loadchats-api

This commit is contained in:
tonyrewin 2022-11-26 00:47:13 +03:00
parent 54817e506d
commit 1a97852efb
2 changed files with 7 additions and 13 deletions

View File

@ -6,22 +6,16 @@ export default gql`
error
chats {
id
admins
users
unread
description
updatedAt
messages {
id
body
author
}
admins {
slug
name
}
users {
slug
name
}
unread
description
updatedAt
}
}
}

View File

@ -272,8 +272,8 @@ export const apiClient = {
// inbox
getChats: async (options: QueryLoadChatsArgs) => {
const resp = await privateGraphQLClient.query(myChats, options).toPromise()
console.debug('[getChats]', resp)
return resp.data.myChats
console.debug('[loadChats]', resp)
return resp.data.loadChats
},
createChat: async (options: MutationCreateChatArgs) => {