Await an already running query

I know that when I trigger a query, it returns a promise that I can await:

await queryDoSomething.trigger();

But when a query has already been triggered elsewhere, how can I await its completion, short of some kind of sync loop or async timeout to repeatedly check its isFetching boolean until it becomes false?

1 Like

Hi @evanatonecare, You could set an event handler to run on success of the query or you could pass an onSuccess callback to the query.trigger() function. Could that work for your use case?

1 Like

Thank you this was a great help