Unable to add loki as datasource in grafana

hi, while I am trying to setup loki-helm chart, I am unable to add any service as datasource in grafana. I remember sometime back we had a setup where we used to add service named query or something to add as data source in grafana if all of them exist in same cluster.
Really need some help as I am stuck with it.
I Try to explain this with example. If we go with loki-distributed, then we add “http://loki-loki-distributed-query-frontend.loki:3100” as url in loki datasource.