# Can't retrieve GlobalFeed in chronological order

**URL:** <https://forum.social.plus/t/cant-retrieve-globalfeed-in-chronological-order/1792>\
**Category:** TS SDK\
**Created:** [September 8, 2025, 3:30am UTC](https://forum.social.plus/t/cant-retrieve-globalfeed-in-chronological-order/1792 "2025-09-08T03:30:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cindyconway](https://avatars.discourse-cdn.com/v4/letter/c/f0a364/32.png) [@cindyconway](https://forum.social.plus/u/cindyconway)\
**Post date:** [September 8, 2025, 3:30am UTC](https://forum.social.plus/t/cant-retrieve-globalfeed-in-chronological-order/1792/1 "2025-09-08T03:30:34Z")

</div>

**SDK:** @amityco/ts-sdk version 7.8.6

**Problem:** The global feed API is returning posts sorted by engagement level rather than chronological order, making it impossible to display ‘Most Recent’ posts.

**Expected Behavior:** Posts should be returned in chronological order (newest first)

**Additional Info:** A coworker said that beta is turned on for our account, but I can’t verify.

**What I’ve Tested:**

- createQuery + runQuery() post

- FeedRepository.getGlobalFeed()

- FeedRepository.queryGlobalFeed() (in order version of the sdk)

```javascript
// Chronological using createQuery 
 const fetchWithCreateQuery = async () => {
    isLoading.value = true
    error.value = null

    try {
      const query = createQuery(FeedRepository.queryGlobalFeed)

      await runQuery(query, ({ data: postsData, ...options }) => {
        posts.value = (postsData as Amity.Post[]) || []
      })

      return { posts: posts.value, paging: { next: nextToken.value } }
    } catch (err) {
      error.value = `Error fetching feed with createQuery: ${err}`
      throw err
    } finally {
      isLoading.value = false
    }
  }

 // Chronological using getGlobalFeed
    const getChronologicalFeed = async () => {
    if (!amity.isConnected()) {
      error.value = 'Not connected to Amity'
      return { posts: [], paging: { next: null } }
    }
    try {
      return new Promise((resolve, reject) => {
        let hasInitiallyResolved = false

        FeedRepository.getGlobalFeed(
          {}, // No dataTypes filter to get text-only posts
          ({ data: newPosts, hasNextPage, error: liveError, loading }) => {
            if (liveError) {
              if (!hasInitiallyResolved) {
                reject(new Error(`Error fetching text-only feed (live): ${liveError}`))
              }
              return
            }

            if (newPosts && !loading) {
              posts.value = newPosts || []
              hasMore.value = !!hasNextPage
              nextToken.value = null // Live collections don't use tokens

              if (!hasInitiallyResolved) {
                hasInitiallyResolved = true
                resolve({ posts: newPosts || [], paging: { next: null } })
              }
            }
          }
        )
      })
    } catch (err) {
      throw err
    }
  }

```

```javascript
//results (mapped to relevant fields)
[
    {
        "createdAt": "2025-09-04T15:33:53.419Z",
        "editedAt": "2025-09-05T14:30:26.299Z",
        "commentsCount": 4,
        "reactionsCount": 1,
        "sharedCount": 0
    },
    {
        "createdAt": "2025-09-05T14:29:24.529Z",
        "editedAt": "2025-09-05T14:30:08.749Z",
        "commentsCount": 1,
        "reactionsCount": 1,
        "sharedCount": 0
    },
    {
        "createdAt": "2025-09-04T20:27:53.551Z",
        "editedAt": "2025-09-04T20:28:55.361Z",
        "commentsCount": 1,
        "reactionsCount": 0,
        "sharedCount": 0
    },
    {
        "createdAt": "2025-09-03T19:27:52.563Z",
        "editedAt": "2025-09-03T19:27:52.563Z",
        "commentsCount": 2,
        "reactionsCount": 0,
        "sharedCount": 0
    },
    {
        "createdAt": "2025-09-05T14:30:46.337Z",
        "editedAt": "2025-09-05T14:30:46.337Z",
        "commentsCount": 0,
        "reactionsCount": 0,
        "sharedCount": 0
    },
    {
        "createdAt": "2025-09-05T14:29:04.442Z",
        "editedAt": "2025-09-05T14:29:04.442Z",
        "commentsCount": 0,
        "reactionsCount": 0,
        "sharedCount": 0
    },
    {
        "createdAt": "2025-09-05T13:29:20.823Z",
        "editedAt": "2025-09-05T13:29:20.823Z",
        "commentsCount": 0,
        "reactionsCount": 0,
        "sharedCount": 0
    },
    {
        "createdAt": "2025-08-28T18:07:31.172Z",
        "editedAt": "2025-08-28T18:31:38.807Z",
        "commentsCount": 2,
        "reactionsCount": 1,
        "sharedCount": 0
    },
    {
        "createdAt": "2025-09-04T20:29:48.679Z",
        "editedAt": "2025-09-04T20:30:00.909Z",
        "commentsCount": 0,
        "reactionsCount": 0,
        "sharedCount": 0
    },
    {
        "createdAt": "2025-09-04T18:09:15.114Z",
        "editedAt": "2025-09-04T18:09:15.114Z",
        "commentsCount": 0,
        "reactionsCount": 0,
        "sharedCount": 0
    }
]

```

---

<div class="post-metadata">

**Author:** ![SocialPlus\_Support](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.social.plus/socialplus_support/32/798_2.png) [@SocialPlus\_Support](https://forum.social.plus/u/SocialPlus_Support)\
**Post date:** [September 8, 2025, 7:07am UTC](https://forum.social.plus/t/cant-retrieve-globalfeed-in-chronological-order/1792/2 "2025-09-08T07:07:11Z")

</div>

Hello @cindyconway , Thank you for sharing the detailed information. We have already responded to your inquiry via email. Please kindly check your inbox for our update.
