mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2026-03-01 12:44:28 +00:00
* externalize gql queries in backend specs * externalize all queries & mutations where easily possible missing change * rename old queries & remove unnecessary function call * fix tests - notifications * fix tests - moderation * remove _CreatePostMutation file * remove _filterPosts & _postQuery files
35 lines
563 B
TypeScript
35 lines
563 B
TypeScript
import gql from 'graphql-tag'
|
|
|
|
export const Room = gql`
|
|
query Room($first: Int, $offset: Int, $id: ID) {
|
|
Room(first: $first, offset: $offset, id: $id, orderBy: lastMessageAt_desc) {
|
|
id
|
|
roomId
|
|
roomName
|
|
avatar
|
|
lastMessageAt
|
|
unreadCount
|
|
lastMessage {
|
|
_id
|
|
id
|
|
content
|
|
senderId
|
|
username
|
|
avatar
|
|
date
|
|
saved
|
|
distributed
|
|
seen
|
|
}
|
|
users {
|
|
_id
|
|
id
|
|
name
|
|
avatar {
|
|
url
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`
|