How to trigger query manually with dynamic data?

Hello, I would like to run a query multiple times with data computed from javascript.


This is my query, I would like to trigger the query with different date from Javascript.

Unfortunately, it seems like I can do it that way, it always trigger with the default value. Is there any way that I can achieve it?

Hey @tamph.ptf! Happy to help here.

additionalScope is definitely the way to pass dynamic values into a query when you trigger it.

Looking at your index query, it seems like you're almost there!

The additionalScope object should look something more like

...

additionalScope: {

date: new Date()

}

...

Here's a community post that goes over additionalScope with a couple more examples! Let me know if you have any questions at all :blush:

1 Like

thank you so much, it works

1 Like