Skip to content

Code Insights: Support lang stats in GQL api

Administrator requested to merge vk/gql-support-lang-stats into main

Created by: vovakulikov

Closes https://github.com/sourcegraph/sourcegraph/issues/27223

Note: This PR is based on https://github.com/sourcegraph/sourcegraph/pull/27517. Merge https://github.com/sourcegraph/sourcegraph/pull/27517 first!

Context

This PR slightly changes the Insight model and types in order to improve the code base over different types of insights. At the moment, the classification is as follows

By execution type

  • BE insight - insight with pre-processed data series points on BE. In this case, FE doesn't do anything about getting/fetching data.
  • FE insight (runtime or built-in insight) - insight with no data from BE and in this case FE has to fetch and processes data via search API in FE runtime.

By types

  • Search Insight (can be BE or FE type, it depends on repositories field)
  • Lang Stats insight (only FE)

This PR also implements lang stats query method in GQL API class and mutations (create, update)

Merge request reports

Loading