Skip to content

LSIF: Add LSIF intelligence GraphQL resolvers

Warren Gifford requested to merge rfc74-graphql-api into rfc74-lsif-api

Created by: efritz

This PR implements the GraphQL side of RFC 74. It adds the following resolvers under GitTree.

  • definitions
  • references
  • hover

Here's an example query:

{
  repository(name: "github.com/sourcegraph/lsif-go") {
    commit(rev: "aabe7f4bcdc3eceb9bc0a853de60a00eb89b0f2b") {
      blob(path: "index/indexer.go") {
        lsif {
          hover(line: 23, character: 5) {
            markdown {
              text
            }
          }
          references(line: 23, character: 5) {
            nodes {
              resource {
                url
              }
              range {
                start {
                  line
                  character
                }
                end {
                  line
                  character
                }
              }
            }
          }
        }
      }
    }
  }
}

Update(@unknwon): added syntax highlighting as GraphQL.

Merge request reports

Loading