mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
implement room order
This commit is contained in:
parent
66cd66d71a
commit
661c2f1b71
@ -14,7 +14,7 @@ export const createRoomMutation = () => {
|
||||
export const roomQuery = () => {
|
||||
return gql`
|
||||
query Room($first: Int, $offset: Int, $id: ID) {
|
||||
Room(first: $first, offset: $offset, id: $id) {
|
||||
Room(first: $first, offset: $offset, id: $id, orderBy: createdAt_desc) {
|
||||
id
|
||||
roomId
|
||||
roomName
|
||||
|
||||
@ -5,6 +5,11 @@
|
||||
# users_some: _UserFilter
|
||||
# }
|
||||
|
||||
# TODO change this to last message date
|
||||
enum _RoomOrdering {
|
||||
createdAt_desc
|
||||
}
|
||||
|
||||
type Room {
|
||||
id: ID!
|
||||
createdAt: String
|
||||
@ -24,5 +29,8 @@ type Mutation {
|
||||
}
|
||||
|
||||
type Query {
|
||||
Room(id: ID): [Room]
|
||||
Room(
|
||||
id: ID
|
||||
orderBy: [_RoomOrdering]
|
||||
): [Room]
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user