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().
@joudi thanks for asking -- Appreciate you sharing the app loading performance reason for your interest in this feature. Makes sense!
I've surfaced your interest in this internally to our Eng team! It sounds like there are other priorities on the docket for that team to work on ahead of this one in the near-term. So no new update yet. The internal ticket with our engineers is linked for us internally, so we'll update this topic if there's new news
I'm also going to put one of my wishlist items here, since it is sort of relevant?
I would love if you could build in some sort of loop detection, that would be amazing.
I have gotten myself in the situation before where 2 queries are calling each other indirectly and I would love some way to prevent that loop, kill all running queries, or alert me that I have the set myself up for a loop.