Skip to main content

I'm using the Storage().search method from the monday.com JavaScript SDK to retrieve stored records. By default, results seem to come back in created-time ascending (i.e. oldest first). I'd like to retrieve results with newest-first ordering instead.

Here’s what I'm working with:

import { Storage } from '@mondaycom/apps-sdk';
const storage = new Storage('<ACCESS_TOKEN>');

const response = await storage.search('someKey');
const { records, cursor, success } = response;
// records appear to be sorted oldest-first by creation time



I checked the official docs for storage.search, and saw no mention of any parameter like newest_first or sort to change the return order Monday Developer.

Has anyone discovered:

  • a hidden parameter (like newest_first, order, or similar),

  • a sorting pattern via cursors or pagination,

  • or another clever workaround to fetch newest records first with storage.search?

If not supported today, this could make a great feature request—would value any feedback or confirmations.

Dear community, It’s me again 👋

For Storage().search, results seem to come back oldest-first — is there any supported way to retrieve newest-first, or would this need to be a feature request?

While I’m here, I’d also like to surface another related developer need:

Currently, the only user provisioning mutation is invite_users. If the user already exists in the account, we just get an error like:

 

{
"invite_users": {
"errors":
{
"email": "example@email.com",
"message": "User already exists in the account",
"code": "ERROR"
}
],
"invited_users": t]
}
}


Could there be a way to re-send invitations (for example, a reinvite_users mutation or a resend: true option)?

Appreciate your guidance on whether these are planned or possible 🙏


Dear community,

I realized I jumped to a conclusion too quickly about Storage().search returning records in created-time ascending order (i.e., oldest first). So I ran a small experiment to confirm the actual ordering behavior.

I created three records in a controlled order:

 

const timestamp = Date.now();
const createdKeys =
`test_${timestamp}`,
`test_${timestamp - 10}_a`,
`test_${timestamp - 10}`
];
await Promise.all(createdKeys.map(key =>
storage.set(key, JSON.stringify({ key, createdAt: new Date().toISOString() }), { shared: true, ttl: 3600 })
));

Then I searched with:
 

const { records } = await storage.search('test');
console.log(records.map(r => r.key));

The result came back as:
 

n
"test_1757640739678",
"test_1757640739678_a",
"test_1757640739688"
]


That shows the ordering is ascending by key name (lexicographic), not by creation time.


Reply