mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
order by indexId instead of createdAt
This commit is contained in:
parent
b933305cad
commit
54cf5b37a5
@ -17,7 +17,7 @@ export const createMessageMutation = () => {
|
|||||||
export const messageQuery = () => {
|
export const messageQuery = () => {
|
||||||
return gql`
|
return gql`
|
||||||
query ($roomId: ID!, $first: Int, $offset: Int) {
|
query ($roomId: ID!, $first: Int, $offset: Int) {
|
||||||
Message(roomId: $roomId, first: $first, offset: $offset, orderBy: createdAt_desc) {
|
Message(roomId: $roomId, first: $first, offset: $offset, orderBy: indexId_desc) {
|
||||||
_id
|
_id
|
||||||
id
|
id
|
||||||
indexId
|
indexId
|
||||||
|
|||||||
@ -3,8 +3,7 @@
|
|||||||
# }
|
# }
|
||||||
|
|
||||||
enum _MessageOrdering {
|
enum _MessageOrdering {
|
||||||
createdAt_asc
|
indexId_desc
|
||||||
createdAt_desc
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type Message {
|
type Message {
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import gql from 'graphql-tag'
|
|||||||
export const messageQuery = () => {
|
export const messageQuery = () => {
|
||||||
return gql`
|
return gql`
|
||||||
query ($roomId: ID!, $first: Int, $offset: Int) {
|
query ($roomId: ID!, $first: Int, $offset: Int) {
|
||||||
Message(roomId: $roomId, first: $first, offset: $offset, orderBy: createdAt_desc) {
|
Message(roomId: $roomId, first: $first, offset: $offset, orderBy: indexId_desc) {
|
||||||
_id
|
_id
|
||||||
id
|
id
|
||||||
indexId
|
indexId
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user