Skip to content

RFC graphql schema for Version Contexts

Administrator requested to merge k/version-context-graphql-stub into master

Created by: keegancsmith

This is implementing the minimal changes to our GraphQL API to support version contexts. We planning to allow the user to pick a version context, then we pass that to search (ignoring code intel for this PR). Additionally the version context can be specified in the URL as a query parameter.

See the open questions in the PR, but repeated here since I am a looking for graphql feedback:

  • Is it better to pass in an graphql ID or the unique name? I put ID here since it seems "more correct". However, this implies two trips if the version context is specified in the URL, since we would need to first query what the ID is. I assume using name is more correct?
  • Instead of name, should we have something like "slug" which is the name normalized to not contain spaces/etc.
  • I avoided the use of connection for simplicity. Is this asking for trouble?

cc @asdine

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

Merge request reports

Loading