Skip to content

Version context configuration and graphql integration

Created by: keegancsmith

Part of RFC 136: Navigating version contexts

Bundled together since context configuration is a small task and directly influences graphql changes.

  • Limited scope of configuration to a static list of repo@ref per context.
  • Just integrate this with search repository resolution which has a concept of RepositoryRevision lists. Should use searcher.
  • Graphql integration should be super minimal
    • Initially query to return list of context names. Add optional param to search for setting context.
    • Once needs are clearer from frontend this can be expanded by asdine? or farhan.

Example version context in configuration. Context also needs a name.

[
  {
    "repo": "github.com/sourcegraph/sourcegraph",
    "ref": "3.15" // <--branch
  },
  {
    "repo": "github.com/sourcegraph/lib1",
    "ref": "23edr233r" // <--commit hash
  },
  {
    "repo": "github.com/sourcegraph/lib2",
    "ref": "2.4" // <--tag
  },
]

The change will likely involve integration version contexts into searchResolver.resolveRepositories