So, my app starts by letting the user choose a tenant
What i do afterward - is i trigger bunch of queries as seen here, each query eventually can trigger more javascript code to be used in components under my app.
The problem is, that i have multiple queries that i need to process in a javascript code to aggregate and match some data between them (let's say, i need to take some data from the get_tenant_findings
and get_integrations
),
If i'd create and trigger a separate javascript query and use the results from the other queries - it might be that they didnt finish loading yet, and i'd probably work with stale data.
What's the best way to do it?
I thought about consolidate some queries i run in parallel in a separate javascript query, then on success trigger the match logic, while assuming if i trigger them through JS code, the components will be synced with them.
but is there any recommendation of how to solve this?