Hello, I’m new here.
Anyway, I have a Grafana Dashboard, that shows me for example on the Geomap Panel the current traffic from the Cloudflare GraphQL API. This API is connected via the Infinity-datasource.
Here my question: Is there any way, to send a variable, that has the date of for example the last five days, so in the format “YYYY-MM-DD”? So in general, the current date minus five days. How can I do this?
Thanks for your help!
Welcome
You can use the grafana date time picker to get -5d parameter here
![image](https://us1.discourse-cdn.com/grafana/original/3X/e/1/e166c0b4b719be04e112bccf87fa477a64ec581f.png)
and then use it as a parameter
Hello yosiasz,
first of all, thank you for your answer.
But which values do I have to write in the boxes “Key” and “Value”?
And how can I add this variable in the “GraphQL query”?
Thank you so much for your help!
1 Like
It works!
The solution for me was:
I have added this “?StartDate={__from:date:YYYY-MM-DD}” (without quotation mark!) in my URL.
My body type contains the following: “${__from:date:YYYY-MM-DD}” (with quotation mark!)
The “URL Query Params”:
And my key is: StartDate
So the value is: __from:date:YYYY-MM-DD
Thank you very much!
1 Like