fix-queries

This commit is contained in:
tonyrewin 2022-11-03 09:07:57 +03:00
parent 3af9f5d7e4
commit 2142837d34
2 changed files with 25 additions and 18 deletions

View File

@ -3,6 +3,11 @@ import { gql } from '@urql/core'
export default gql`
query GetChatsQuery {
myChats {
error
chats {
title
description
updatedAt
messages {
id
author
@ -15,8 +20,7 @@ export default gql`
name
userpic
}
title
createdAt
}
}
}
`

View File

@ -3,6 +3,8 @@ import { gql } from '@urql/core'
export default gql`
query LoadMessagesQuery($chatId: String!, $offset: Int, $amount: Int) {
loadChat(chatId: $chatId, offset: $offset, amount: $amount) {
error
messages {
author
body
createdAt
@ -10,4 +12,5 @@ export default gql`
seen
}
}
}
`