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,20 +3,24 @@ import { gql } from '@urql/core'
export default gql`
query GetChatsQuery {
myChats {
messages {
id
author
body
replyTo
createdAt
error
chats {
title
description
updatedAt
messages {
id
author
body
replyTo
createdAt
}
users {
slug
name
userpic
}
}
users {
slug
name
userpic
}
title
createdAt
}
}
`

View File

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