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 error
chats { chats {
id id
admins
users
unread
description
updatedAt
messages { messages {
id id
body body
author author
} }
admins {
slug
name
}
users {
slug
name
}
unread
description
updatedAt
} }
} }
} }

View File

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