Skip to content

insight: new experimental resolver to support limited preview insights based on a search

Created by: vovakulikov

Part of https://github.com/sourcegraph/sourcegraph/issues/38430

Problem

At the moment we have to pass a clear list of repositories for the live preview as input to gql query. But on the search result page we don't have a clear list of repositories, instead of this we have repo: filters and query itself. We should extend live preview API in a way that it supports either

  • repo: filter value (note that this value could be complex with AND/OR operators and we can have more than one repo filter in one query)
  • passing query itself and resolve live preview data by query and not by repositories and other low level fields that we have in the creation UI