I have a button that on click runs a postgres query (Q1), which references a transformer (T1), which references another postgres query (Q2).
Button => Q1 => T1 => Q2
When I first load the page and click on the button, everything works.
But if I click the button again, Q2 doesn’t run again. It simply gives me the data it got from the previous run (even though neither query is set to cache their results).
Is there a way to force trigger Q2 every time I run Q1?
I think I need a dependency graph here I’m guessing this error has to do with let / await. The .trigger() method has an onSuccess param. So you could do:
The problem is that the trigger returns a promise that resolves to the data. But I don’t want to return Q2’s data, I want to return a modified version (which is what I do in T1).
The issue with the graph is that it seems like you need to trigger Q1 and Q2 for T1 to do its work. I’m having a hard time visualizing this - any chance you can write into support?