Skip to content

insights: add functionality to determine which aggregation modes are possible

Created by: chwarwick

The graphql resolvers for aggregations have a field modeAvailability which describes which aggregation modes are available for the current query and patternType.

Using research from https://github.com/sourcegraph/sourcegraph/issues/39929 and the details in this comment add logic determine which aggregations are possible based on the submitted query and pattern type.

note: updates to the resolver to return availability should not be made if the issue to execute that aggregation has not yet been added. Repo/Author/Path is pending issue https://github.com/sourcegraph/sourcegraph/issues/40207 Capture Group is pending issue https://github.com/sourcegraph/sourcegraph/issues/40211

/cc @joelkw @felixfbecker @vovakulikov @unclejustin