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` export default gql`
query GetChatsQuery { query GetChatsQuery {
myChats { myChats {
messages { error
id chats {
author title
body description
replyTo updatedAt
createdAt 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` export default gql`
query LoadMessagesQuery($chatId: String!, $offset: Int, $amount: Int) { query LoadMessagesQuery($chatId: String!, $offset: Int, $amount: Int) {
loadChat(chatId: $chatId, offset: $offset, amount: $amount) { loadChat(chatId: $chatId, offset: $offset, amount: $amount) {
author error
body messages {
createdAt author
updatedAt body
seen createdAt
updatedAt
seen
}
} }
} }
` `