Certainly doable but approach might be different depending on the use case. I'll give 2 different examples (but I'm sure there are other ways):
- When running JS query use a temporary state to store the variable you want to pass.
- Different approach would be to make your JS return an object of the data (results) and values you want to pass.
You can then trigger the resource query on success or after the value has been set but it will depend on what you need to accomplish!



