webapp/src/graphql/query/chats-load.ts
2022-11-27 21:08:11 +03:00

28 lines
442 B
TypeScript

import { gql } from '@urql/core'
export default gql`
query GetChatsQuery($limit: Int, $offset: Int) {
loadChats(limit: $limit, offset: $offset) {
error
chats {
id
title
admins
members {
slug
name
userpic
}
unread
description
updatedAt
messages {
id
body
author
}
}
}
}
`