It's mentioned how to set it in the third provisioning example here:
https://grafana.com/docs/grafana/latest/datasources/influxdb/#provisioning-examples
The Flux language is so bad it's been deprecated before it's even supported by Grafana properly.
The InfluxQL language is much more friendly because the Grafana UI builds the queries for you.