EDIT: Because the stupid limitation of not being able to post more than one image I had to break the post into 3 posts
Hello.
I am performing a very basic JS task and I am facing what I think it is a bug on the platform. I have a code that triggers a query several times with different parameters. The queries are supposed to run in parallel, but if I do that then all the queries are triggered with the same parameters. It looks like triggering them too close to each other makes the new trigger to overwrite the parameters of the previous query and they are all executed with the same parameters.
As you can see, first I trigger the query and wait for it, that works perfectly, then inside the loop when I trigger them all in parallel they all get the same parameters, that's why I know the bug is they overwrite each other, because if you do them sequentially it just works.
This is the first query with the correct first parameter (the 0) on the queryParams[2]
Also I'm 100% confident that the bug is on the platform because the console is correctly reporting that the correct extra parameters are being provided:
Having to fire all the queries in series it is a huge performance hit compared to running them all in parallel.
I tried reproducing this on my end using just a simple rest query to postman-echo, and both the serial and parallel versions worked fine. Are you able to share a screenshot of your GetAccountPayments query? It seems possible that there is something odd with that query which could be resulting in the behavior you are seeing.
Hmm, nothing stands out as particularly strange with those queries to me. Would you be able to share an export the app so that I can investigate a bit more? You can upload it here: https://www.dropbox.com/request/UiZcrop9XUWmcKW2BlXX
Hey Danielo, looks like another support team member was asking some questions in that ticket you started. Feel free to respond there, or open another ticket. We should be able to help you out there!
It should be in your chat history when you are logged into Retool. If you don't see it, feel free to write in via the chat again to start a new ticket and we can go from there.
I am running into the exact same issue. Trying to dynamically invoke a trigger in parallel using the results from a previous trigger, but it is executing with the same additionalScope parameters despite being called with different ones each time.
I could only get this to work serially but is not a final solution for me either.
Just wanted to provide a quick update here, while continuing to investigate this issue with @Adub we were able to locate a bug with the query library, where variables defined in the query library queries are overwriting all instances of that variable in additionalScope used in queries in an app. Our engineering team will be investigating this further and hope to put out an update within the next few weeks to address this. I will update here when this patch is released!