insights: Add a new SeriesCount field to the graphql api insightViews query
Created by: CristinaBirkel
Stacked on https://github.com/sourcegraph/sourcegraph/pull/36584 Closes https://github.com/sourcegraph/sourcegraph/issues/36660
Description
This adds a new return field to insightViews
for the seriesCount
. This is useful when the returned data series have been truncated with a limit
.
I factored out the computation of the data series so this could also be used to get the total number of series before the limit is applied without being called more than once.
Test plan
I tested this by calling insightViews
and requesting the new seriesCount
field for both capture group and non-capture group insights and verifying that it returns the correct number of series.