Hi @samad324! Top-level await has been feature flagged for self-hosted instances up until 2.87, there are three options here:
- Upgrading to Retool v2.87+
- I can set the feature flag for your instance that enables top-level await
- Using an async wrapper for your JS query:
return (async () => {
/* some of your script here! */
await queryGetUser.trigger();
await queryUpdateUser.trigger();
/* the rest of your script here! */
})();
For anyone following along, this feature is available by default on Cloud