Code Insights: Separate gql queries in order to fix problem with fetching all insigh…
Created by: vovakulikov
Closes https://github.com/sourcegraph/sourcegraph/issues/27335
Note: This PR is a kind of work in progress. We merge our effort with @unclejustin on that to finish this PR as soon as possible in order to unlock dog-food testing and further tickets for setting migration.
Background
At the moment on main, we re-use gql query for fetching insights list with insight configurations and metadata and for fetching one insight (insights one by one actually) with data series points. Fetching all insights with all data series points is a very expensive operation for our BE and this is why it fails with timeout each time.
Solution
For each gql request we should check can we really reuse something from other requests. This PR separates insightById
gql request and getInsights
request gql queries.
Known issues
-
If you reload the dashboard page with an already picked personal dashboard you will see a 404 screen