Insights/api/default applied filters
Created by: coury-clark
Closes https://github.com/sourcegraph/sourcegraph/issues/26388
Implements
- default filter logic into the time series resolver
- GraphQL argument on
insightViews
query to override filters - return the
AppliedFilters
on theInsightViewResolver
that are being applied
I made a change to the model of where these filters are applied in the resolver stack. Historically they were applied on the timeseries itself, and in the context of the very old prototype that made sense (it was the only resolver, really). As soon as we have the concept of a view
, this model doesn't really work anymore. The premise is that a view
is the entity that you can associate filters and aggregates, and they are applied across all of the series within the view.
This PR makes this change in the new API, and moves the filters argument to the insightViews
query instead of the sub-resolver for the time series. We will not deprecate the old arguments for the time being to preserve backwards compatibility with the insights
query.
This chart uses the old insights
query for comparison
d
This image is resolving the same view through the new API using default filters - the values match.