mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
new query including index & first, offset and orderBy
This commit is contained in:
parent
a97d65da3c
commit
7e77bc82fb
@ -2,10 +2,11 @@ import gql from 'graphql-tag'
|
|||||||
|
|
||||||
export const messageQuery = () => {
|
export const messageQuery = () => {
|
||||||
return gql`
|
return gql`
|
||||||
query ($roomId: ID!) {
|
query ($roomId: ID!, $first: Int, $offset: Int) {
|
||||||
Message(roomId: $roomId) {
|
Message(roomId: $roomId, first: $first, offset: $offset, orderBy: createdAt_desc) {
|
||||||
_id
|
_id
|
||||||
id
|
id
|
||||||
|
indexId
|
||||||
senderId
|
senderId
|
||||||
content
|
content
|
||||||
author {
|
author {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user