MongoDB queries not re-launched when time range changes

I’m using Grafana Cloud and a MongoDB cloud-stored database and want to create some time series graphs.
It works fine and queries are successfully executed.

The queries include the $(__from) and $(__to) so the result can fit in the selected timerange. Example: db.data.find({“id”:“data1”, “timestamp”:{$gte:ISODate(${__from}), $lt:ISODate(${__to})}}).sort({“timestamp”: -1}).limit(30000)

The issue I’m facing is that when I change the time range, the query does not seems to be executed accordingly. I have to go to the panel, click the green arrow next to the query for it to refresh.

Illustation:

I tried playing with the Query options but it does not seem to have any effect.

Fix: do not use ISODate(${__from}) but $__timeFrom instead