Skip to content

Provide the extension author access to Sourcegraph API types/schemas (GraphQL + LSP)

Created by: dadlerj

Rather than having to fetch the appURL from configuration, then use fetch commands against the Sourcegraph API, it would be nice if we provided native support in the @sourcegraph npm package. I imagine usage could look like:

sourcegraph.api.gql("
{
  query LatestCommit($name: String!) {
    repository(name: $name){
      lastIndexedRevOrLatest{
        oid
      }
    }
  }
}", {
  name: "github.com/gorilla/mux"
})

Etc.