Using Query JSON with SQL in Mobile App

I am using the 'hack' to watch a query output and update a component by using a Query JSON with SQL. The Query JSON with SQL only gets invoked once and not as the data is being streamed in from the ai query (to openai). I have the exact same setup working in a web app but I cannot get the component to update as the response is streaming in using this hack. wondering if there is some difference in how the Query JSON with SQL query works with mobile apps versus web apps?

Hey @neilbalthaser

In Retool mobile apps, query execution can be throttled—often limited to once every two seconds via event handlers. Unlike web apps, real-time updates and streaming behavior may not work as expected due to these constraints. Ensure your components are correctly bound to the query output and check for any throttling settings. If needed, implement manual triggers or timers to refresh data periodically. Refer to the Event Handlers documentation for managing query frequency in mobile environments.

5 Likes

@WidleStudioLLP thank you for your help. for clarify are you saying that the default values can be set so that the limitation of once every two seconds cannot be made lower or that it is a simple matter of checking the queries to ensure that their default values are less than 2 seconds?

@neilbalthaser

The default query throttling in Retool Mobile, when triggered by events, is fixed at once every two seconds. You cannot set a lower default value for event-triggered queries. To achieve faster updates than this limitation, explore manual triggers, timers, or consider using WebSockets if your data source supports them. These alternative methods can help you refresh data more frequently in your mobile application.You can use the setInterval() if you want for timers.

5 Likes