Programmatically stop all running queries

I'm building a Retool app which builds a queue of objects gathered from paginated queries. As those objects are returned, more queries are triggered to fetch related objects. This means that in order to build the queue, multiple queries may be running at any given time.

When the user switches queue types, I clear out the current queue and I would like a way to essentially stop all the already running queries before triggering the new query to start populating the new queue type.

As it stands, it's possible for the new queue to start filling up with results from the old queue's queries that hadn't yet completed at the time of the queue switch.

I realize I could work around this by having separate queue temporary state variables for each type of queue, but it would be handier if there were simply something like runningQueries.stopAll().


:+1: I really want this feature,

Sometimes this approach of state per query doesn't work if you have sub-promise in query chain

Thank you for your +1 here, @renatovico! This request has been filed and linked to the thread, so I'll keep y'all posted with any updates :slightly_smiling_face:

Any update on this please? @victoria

Hey @krynv :slightly_smiling_face: This is currently on hold to prioritize other work, but will add your bump internally now!

1 Like

Hello Victoria, bumping this thread up. Has this been prioritized already? :blush:

Hey Kelvin! Not prioritized yet, but will bump internally again. Thank you for the bump here, it truly does help us know what to work on!