Insights: Move data points link generation from the frontend to the backend gql resolvers
Created by: vovakulikov
At the moment all data point link generation is happening on the frontend. We have to iterate over all points that we got from the backend and based on the insight filters/reposiotires/query we need to generate a data point link for the chart point. All this introduces
- Complexity on the front end. Basically, we need to know about many insight fields to build the right URL for the chart. And very often we just miss this logic when we introduce new filters/insight metadata (recent example: https://github.com/sourcegraph/sourcegraph/issues/38097)
- Performance problems, the fact that we need to iterate over series points before chart rendering may add unnecessary perf problems on the frontend (this isn't a problem for 1 chart with 2 series with 12 points each, but imagine 20 insights with 20 series with 12 points on the page and for each point, we should generate a special URL it's 4800 points.)