mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 19:21:50 +00:00
1618 lines
40 KiB
GraphQL
1618 lines
40 KiB
GraphQL
extend type Mutation {
|
|
"""
|
|
Creates a new configuration policy with the given attributes.
|
|
"""
|
|
createCodeIntelligenceConfigurationPolicy(
|
|
"""
|
|
If supplied, the repository to which this configuration policy applies. If not supplied,
|
|
this configuration policy is applied to all repositories.
|
|
"""
|
|
repository: ID
|
|
|
|
"""
|
|
If supplied, the name patterns matching repositories to which this configuration policy
|
|
applies. This option is mutually exclusive with an explicit repository.
|
|
"""
|
|
repositoryPatterns: [String!]
|
|
|
|
name: String!
|
|
type: GitObjectType!
|
|
pattern: String!
|
|
retentionEnabled: Boolean!
|
|
retentionDurationHours: Int
|
|
retainIntermediateCommits: Boolean!
|
|
indexingEnabled: Boolean!
|
|
indexCommitMaxAgeHours: Int
|
|
indexIntermediateCommits: Boolean!
|
|
): CodeIntelligenceConfigurationPolicy!
|
|
|
|
"""
|
|
Updates the attributes configuration policy with the given identifier.
|
|
"""
|
|
updateCodeIntelligenceConfigurationPolicy(
|
|
id: ID!
|
|
repositoryPatterns: [String!]
|
|
name: String!
|
|
type: GitObjectType!
|
|
pattern: String!
|
|
retentionEnabled: Boolean!
|
|
retentionDurationHours: Int
|
|
retainIntermediateCommits: Boolean!
|
|
indexingEnabled: Boolean!
|
|
indexCommitMaxAgeHours: Int
|
|
indexIntermediateCommits: Boolean!
|
|
): EmptyResponse
|
|
|
|
"""
|
|
Deletes the configuration policy with the given identifier.
|
|
"""
|
|
deleteCodeIntelligenceConfigurationPolicy(policy: ID!): EmptyResponse
|
|
|
|
"""
|
|
Updates the indexing configuration associated with a repository.
|
|
"""
|
|
updateRepositoryIndexConfiguration(repository: ID!, configuration: String!): EmptyResponse
|
|
|
|
"""
|
|
Queues the index jobs for a repository for execution. An optional resolvable revhash
|
|
(commit, branch name, or tag name) can be specified; by default the tip of the default
|
|
branch will be used.
|
|
|
|
If a configuration is supplied, that configuration is used to determine what jobs to
|
|
schedule. If no configuration is supplied, it will go through the regular index scheduling
|
|
rules: first read any in-repo configuration (e.g., sourcegraph.yaml), then look for any
|
|
existing in-database configuration, finally falling back to the automatically infered
|
|
connfiguration based on the repo contents at the target commit.
|
|
"""
|
|
queueAutoIndexJobsForRepo(repository: ID!, rev: String, configuration: String): [LSIFIndex!]!
|
|
|
|
"""
|
|
Deletes an LSIF upload.
|
|
"""
|
|
deleteLSIFUpload(id: ID!): EmptyResponse
|
|
|
|
"""
|
|
Deletes LSIF uploads by filter criteria.
|
|
"""
|
|
deleteLSIFUploads(
|
|
"""
|
|
An (optional) search query that filters the state, repository name,
|
|
commit, root, and indexer properties.
|
|
"""
|
|
query: String
|
|
|
|
"""
|
|
The upload state.
|
|
"""
|
|
state: LSIFUploadState
|
|
|
|
"""
|
|
When specified, only deletes uploads that are latest for the given repository.
|
|
"""
|
|
isLatestForRepo: Boolean
|
|
|
|
"""
|
|
The repository.
|
|
"""
|
|
repository: ID
|
|
): EmptyResponse
|
|
|
|
"""
|
|
Deletes an LSIF index.
|
|
"""
|
|
deleteLSIFIndex(id: ID!): EmptyResponse
|
|
|
|
"""
|
|
Request support for a particular language.
|
|
"""
|
|
requestLanguageSupport(language: String!): EmptyResponse
|
|
}
|
|
|
|
extend type Query {
|
|
"""
|
|
Returns precise code intelligence configuration policies that control data retention
|
|
and (if enabled) auto-indexing behavior.
|
|
"""
|
|
codeIntelligenceConfigurationPolicies(
|
|
"""
|
|
If repository is supplied, then only the configuration policies that apply to
|
|
repository are returned. If repository is not supplied, then all policies are
|
|
returned.
|
|
"""
|
|
repository: ID
|
|
|
|
"""
|
|
An (optional) search query that searches over the name property.
|
|
"""
|
|
query: String
|
|
|
|
"""
|
|
If set to true, then only configuration policies with data retention enabled are returned.
|
|
"""
|
|
forDataRetention: Boolean
|
|
|
|
"""
|
|
If set to true, then only configuration policies with indexing enabled are returned.
|
|
"""
|
|
forIndexing: Boolean
|
|
|
|
"""
|
|
When specified, indicates that this request should be paginated and
|
|
the first N results (relative to the cursor) should be returned. i.e.
|
|
how many results to return per page.
|
|
"""
|
|
first: Int
|
|
|
|
"""
|
|
When specified, indicates that this request should be paginated and
|
|
to fetch results starting at this cursor.
|
|
|
|
A future request can be made for more results by passing in the
|
|
'CodeIntelligenceConfigurationPolicyConnection.pageInfo.endCursor'
|
|
that is returned.
|
|
"""
|
|
after: String
|
|
): CodeIntelligenceConfigurationPolicyConnection!
|
|
|
|
"""
|
|
The repository's LSIF uploads.
|
|
"""
|
|
lsifUploads(
|
|
"""
|
|
An (optional) search query that searches over the state, repository name,
|
|
commit, root, and indexer properties.
|
|
"""
|
|
query: String
|
|
|
|
"""
|
|
The state of returned uploads.
|
|
"""
|
|
state: LSIFUploadState
|
|
|
|
"""
|
|
When specified, shows only uploads that are a dependency of the specified upload.
|
|
"""
|
|
dependencyOf: ID
|
|
|
|
"""
|
|
When specified, shows only uploads that are a dependent of the specified upload.
|
|
"""
|
|
dependentOf: ID
|
|
|
|
"""
|
|
When specified, shows only uploads that are latest for the given repository.
|
|
"""
|
|
isLatestForRepo: Boolean
|
|
|
|
"""
|
|
When specified, indicates that this request should be paginated and
|
|
the first N results (relative to the cursor) should be returned. i.e.
|
|
how many results to return per page.
|
|
"""
|
|
first: Int
|
|
|
|
"""
|
|
When specified, indicates that this request should be paginated and
|
|
to fetch results starting at this cursor.
|
|
|
|
A future request can be made for more results by passing in the
|
|
'LSIFUploadConnection.pageInfo.endCursor' that is returned.
|
|
"""
|
|
after: String
|
|
|
|
"""
|
|
When specified, merges the list of existing uploads with data from
|
|
uploads that have been deleted but for which audit logs still exist.
|
|
Only makes sense when state filter is unset or equal to 'DELETED'.
|
|
"""
|
|
includeDeleted: Boolean
|
|
): LSIFUploadConnection!
|
|
|
|
"""
|
|
The repository's LSIF uploads.
|
|
"""
|
|
lsifIndexes(
|
|
"""
|
|
An (optional) search query that searches over the state, repository name,
|
|
and commit properties.
|
|
"""
|
|
query: String
|
|
|
|
"""
|
|
The state of returned uploads.
|
|
"""
|
|
state: LSIFIndexState
|
|
|
|
"""
|
|
When specified, indicates that this request should be paginated and
|
|
the first N results (relative to the cursor) should be returned. i.e.
|
|
how many results to return per page.
|
|
"""
|
|
first: Int
|
|
|
|
"""
|
|
When specified, indicates that this request should be paginated and
|
|
to fetch results starting at this cursor.
|
|
A future request can be made for more results by passing in the
|
|
'LSIFIndexConnection.pageInfo.endCursor' that is returned.
|
|
"""
|
|
after: String
|
|
): LSIFIndexConnection!
|
|
|
|
"""
|
|
The set of repositories that match the given glob pattern. This resolver is used by the UI to
|
|
preview what repositories match a code intelligence policy in a given repository.
|
|
"""
|
|
previewRepositoryFilter(
|
|
"""
|
|
A set of patterns matching the name of the matching repository.
|
|
"""
|
|
patterns: [String!]!
|
|
|
|
"""
|
|
When specified, indicates that this request should be paginated and
|
|
the first N results (relative to the cursor) should be returned. i.e.
|
|
how many results to return per page.
|
|
"""
|
|
first: Int
|
|
|
|
"""
|
|
When specified, indicates that this request should be paginated and
|
|
to fetch results starting at this cursor.
|
|
A future request can be made for more results by passing in the
|
|
'RepositoryFilterPreview.pageInfo.endCursor' that is returned.
|
|
"""
|
|
after: String
|
|
): RepositoryFilterPreview!
|
|
|
|
"""
|
|
Return the languages that this user has requested support for.
|
|
"""
|
|
requestedLanguageSupport: [String!]!
|
|
}
|
|
|
|
"""
|
|
A decorated connection of repositories resulting from 'previewRepositoryFilter'.
|
|
"""
|
|
type RepositoryFilterPreview {
|
|
"""
|
|
A list of repositories composing the current page.
|
|
"""
|
|
nodes: [CodeIntelRepository!]!
|
|
|
|
"""
|
|
The total number of repositories in this result set.
|
|
"""
|
|
totalCount: Int!
|
|
|
|
"""
|
|
Pagination information.
|
|
"""
|
|
pageInfo: PageInfo!
|
|
|
|
"""
|
|
The maximum number of repository matches a single policy can make.
|
|
"""
|
|
limit: Int
|
|
|
|
"""
|
|
The number of repositories matching the given filter. This value exceeds the
|
|
value of totalCount of the result when totalMatches > limit.
|
|
"""
|
|
totalMatches: Int!
|
|
}
|
|
|
|
"""
|
|
A list of code intelligence configuration policies.
|
|
"""
|
|
type CodeIntelligenceConfigurationPolicyConnection {
|
|
"""
|
|
A list of code intelligence configuration policies.
|
|
"""
|
|
nodes: [CodeIntelligenceConfigurationPolicy!]!
|
|
|
|
"""
|
|
The total number of policies in this result set.
|
|
"""
|
|
totalCount: Int
|
|
|
|
"""
|
|
Pagination information.
|
|
"""
|
|
pageInfo: PageInfo!
|
|
}
|
|
|
|
"""
|
|
A configuration policy that applies to a set of Git objects matching an associated
|
|
pattern. Each policy has optional data retention and auto-indexing schedule configuration
|
|
attached. A policy can be applied globally or on a per-repository basis.
|
|
"""
|
|
type CodeIntelligenceConfigurationPolicy implements Node {
|
|
"""
|
|
The ID.
|
|
"""
|
|
id: ID!
|
|
|
|
"""
|
|
A description of the configuration policy.
|
|
"""
|
|
name: String!
|
|
|
|
"""
|
|
The repository to which this configuration policy applies.
|
|
"""
|
|
repository: CodeIntelRepository
|
|
|
|
"""
|
|
The set of name patterns matching repositories to which this configuration policy applies.
|
|
"""
|
|
repositoryPatterns: [String!]
|
|
|
|
"""
|
|
The type of Git object described by the configuration policy.
|
|
"""
|
|
type: GitObjectType!
|
|
|
|
"""
|
|
A pattern matching the name of the matching Git object.
|
|
"""
|
|
pattern: String!
|
|
|
|
"""
|
|
Protected policies may not be deleted (or created directly by users).
|
|
"""
|
|
protected: Boolean!
|
|
|
|
"""
|
|
Whether or not this configuration policy affects data retention rules.
|
|
"""
|
|
retentionEnabled: Boolean!
|
|
|
|
"""
|
|
The max age of data retained by this configuration policy.
|
|
"""
|
|
retentionDurationHours: Int
|
|
|
|
"""
|
|
If the matching Git object is a branch, setting this value to true will also
|
|
retain all data used to resolve queries for any commit on the matching branches.
|
|
Setting this value to false will only consider the tip of the branch.
|
|
"""
|
|
retainIntermediateCommits: Boolean!
|
|
|
|
"""
|
|
Whether or not this configuration policy affects auto-indexing schedules.
|
|
"""
|
|
indexingEnabled: Boolean!
|
|
|
|
"""
|
|
The max age of commits indexed by this configuration policy.
|
|
"""
|
|
indexCommitMaxAgeHours: Int
|
|
|
|
"""
|
|
If the matching Git object is a branch, setting this value to true will also
|
|
index all commits on the matching branches. Setting this value to false will
|
|
only consider the tip of the branch.
|
|
"""
|
|
indexIntermediateCommits: Boolean!
|
|
}
|
|
|
|
"""
|
|
A retention policy match candidate.
|
|
"""
|
|
type CodeIntelligenceRetentionPolicyMatch {
|
|
"""
|
|
The actual retention policy.
|
|
"""
|
|
configurationPolicy: CodeIntelligenceConfigurationPolicy
|
|
|
|
"""
|
|
Whether the retention policy matches the upload or not. False values may be returned
|
|
if non-matching policies are requested for inclusion.
|
|
"""
|
|
matches: Boolean!
|
|
|
|
"""
|
|
A list of commits that are visible to this upload for which this retention policy applies.
|
|
It is empty if the policy applies directly to the commit associated with the upload.
|
|
"""
|
|
protectingCommits: [String!]
|
|
}
|
|
|
|
"""
|
|
A list of code intelligence retention policy match candidates.
|
|
"""
|
|
type CodeIntelligenceRetentionPolicyMatchesConnection {
|
|
"""
|
|
A list of code intelligence retention policies matches.
|
|
"""
|
|
nodes: [CodeIntelligenceRetentionPolicyMatch!]!
|
|
|
|
"""
|
|
The total number of policies in this result set.
|
|
"""
|
|
totalCount: Int
|
|
|
|
"""
|
|
Pagination information.
|
|
"""
|
|
pageInfo: PageInfo!
|
|
}
|
|
|
|
extend type Repository {
|
|
"""
|
|
Gets the indexing configuration associated with the repository.
|
|
"""
|
|
indexConfiguration: IndexConfiguration
|
|
|
|
"""
|
|
The repository's LSIF uploads.
|
|
"""
|
|
lsifUploads(
|
|
"""
|
|
An (optional) search query that searches over the state, repository name,
|
|
commit, root, and indexer properties.
|
|
"""
|
|
query: String
|
|
|
|
"""
|
|
The state of returned uploads.
|
|
"""
|
|
state: LSIFUploadState
|
|
|
|
"""
|
|
When specified, shows only uploads that are latest for the given repository.
|
|
"""
|
|
isLatestForRepo: Boolean
|
|
|
|
"""
|
|
When specified, shows only uploads that are a dependency of the specified upload.
|
|
"""
|
|
dependencyOf: ID
|
|
|
|
"""
|
|
When specified, shows only uploads that are a dependent of the specified upload.
|
|
"""
|
|
dependentOf: ID
|
|
|
|
"""
|
|
When specified, indicates that this request should be paginated and
|
|
the first N results (relative to the cursor) should be returned. i.e.
|
|
how many results to return per page.
|
|
"""
|
|
first: Int
|
|
|
|
"""
|
|
When specified, indicates that this request should be paginated and
|
|
to fetch results starting at this cursor.
|
|
A future request can be made for more results by passing in the
|
|
'LSIFUploadConnection.pageInfo.endCursor' that is returned.
|
|
"""
|
|
after: String
|
|
|
|
"""
|
|
When specified, merges the list of existing uploads with data from
|
|
uploads that have been deleted but for which audit logs still exist.
|
|
Only makes sense when state filter is unset or equal to 'DELETED'.
|
|
"""
|
|
includeDeleted: Boolean
|
|
): LSIFUploadConnection!
|
|
|
|
"""
|
|
The repository's LSIF uploads.
|
|
"""
|
|
lsifIndexes(
|
|
"""
|
|
An (optional) search query that searches over the state, repository name,
|
|
and commit properties.
|
|
"""
|
|
query: String
|
|
|
|
"""
|
|
The state of returned uploads.
|
|
"""
|
|
state: LSIFIndexState
|
|
|
|
"""
|
|
When specified, indicates that this request should be paginated and
|
|
the first N results (relative to the cursor) should be returned. i.e.
|
|
how many results to return per page.
|
|
"""
|
|
first: Int
|
|
|
|
"""
|
|
When specified, indicates that this request should be paginated and
|
|
to fetch results starting at this cursor.
|
|
A future request can be made for more results by passing in the
|
|
'LSIFIndexConnection.pageInfo.endCursor' that is returned.
|
|
"""
|
|
after: String
|
|
): LSIFIndexConnection!
|
|
|
|
"""
|
|
Provides a summary of the most reecent upload and index status.
|
|
"""
|
|
codeIntelSummary: CodeIntelRepositorySummary!
|
|
|
|
"""
|
|
The set of git objects that match the given git object type and glob pattern.
|
|
This resolver is used by the UI to preview what names match a code intelligence
|
|
policy in a given repository.
|
|
"""
|
|
previewGitObjectFilter(
|
|
"""
|
|
The type of Git object described by the configuration policy.
|
|
"""
|
|
type: GitObjectType!
|
|
|
|
"""
|
|
A pattern matching the name of the matching Git object.
|
|
"""
|
|
pattern: String!
|
|
): [GitObjectFilterPreview!]!
|
|
}
|
|
|
|
extend interface TreeEntry {
|
|
"""
|
|
LSIF data for this tree entry.
|
|
"""
|
|
lsif(
|
|
"""
|
|
An optional filter for the name of the tool that produced the upload data.
|
|
"""
|
|
toolName: String
|
|
): TreeEntryLSIFData
|
|
}
|
|
|
|
extend type GitTree {
|
|
"""
|
|
LSIF data for this tree entry.
|
|
"""
|
|
lsif(
|
|
"""
|
|
An optional filter for the name of the tool that produced the upload data.
|
|
"""
|
|
toolName: String
|
|
): GitTreeLSIFData
|
|
|
|
"""
|
|
Provides info on the level of code-intel support for the direct children of this git tree.
|
|
"""
|
|
codeIntelInfo: GitTreeCodeIntelInfo
|
|
}
|
|
|
|
extend type GitBlob {
|
|
"""
|
|
A wrapper around LSIF query methods. If no LSIF upload can be used to answer code
|
|
intelligence queries for this path-at-revision, this resolves to null.
|
|
"""
|
|
lsif(
|
|
"""
|
|
An optional filter for the name of the tool that produced the upload data.
|
|
"""
|
|
toolName: String
|
|
): GitBlobLSIFData
|
|
|
|
"""
|
|
Provides info on the level of code-intel support for this git blob.
|
|
"""
|
|
codeIntelSupport: CodeIntelSupport!
|
|
|
|
"""
|
|
Provides code intelligence within the file.
|
|
|
|
Experimental: This API is likely to change in the future.
|
|
"""
|
|
localCodeIntel: JSONValue
|
|
|
|
"""
|
|
A wrapper around syntactic hover and definition query methods.
|
|
|
|
Experimental: This API is likely to change in the future.
|
|
"""
|
|
symbolInfo(line: Int!, character: Int!): SymbolInfo
|
|
}
|
|
|
|
"""
|
|
SymbolInfo contains hover and definition methods. It's returned by GitBlob.symbolInfo(line, character).
|
|
"""
|
|
type SymbolInfo {
|
|
"""
|
|
The definition of the symbol.
|
|
"""
|
|
definition: SymbolLocation
|
|
|
|
"""
|
|
The hover for the symbol.
|
|
"""
|
|
hover: String
|
|
}
|
|
|
|
"""
|
|
SymbolLocation is a single-line range within a repository. It's returned by SymbolInfo.definition.
|
|
"""
|
|
type SymbolLocation {
|
|
"""
|
|
The repo.
|
|
"""
|
|
repo: String!
|
|
|
|
"""
|
|
The commit.
|
|
"""
|
|
commit: String!
|
|
|
|
"""
|
|
The path.
|
|
"""
|
|
path: String!
|
|
|
|
"""
|
|
The range.
|
|
"""
|
|
range: LineRange
|
|
|
|
"""
|
|
The line.
|
|
"""
|
|
line: Int! @deprecated(reason: "use range.line instead")
|
|
|
|
"""
|
|
The character.
|
|
"""
|
|
character: Int! @deprecated(reason: "use range.character instead")
|
|
|
|
"""
|
|
The length.
|
|
"""
|
|
length: Int! @deprecated(reason: "use range.length instead")
|
|
}
|
|
|
|
"""
|
|
LineRange is a span within a line.
|
|
"""
|
|
type LineRange {
|
|
"""
|
|
The line.
|
|
"""
|
|
line: Int!
|
|
|
|
"""
|
|
The character.
|
|
"""
|
|
character: Int!
|
|
|
|
"""
|
|
The length.
|
|
"""
|
|
length: Int!
|
|
}
|
|
|
|
"""
|
|
A summary of the most reecent upload and index status.
|
|
"""
|
|
type CodeIntelRepositorySummary {
|
|
"""
|
|
A list of recent uploads for a specific repository. This list contains processing,
|
|
recently queued, and the most recently processed uploads for each distinct indexer
|
|
and root.
|
|
"""
|
|
recentUploads: [LSIFUploadsWithRepositoryNamespace!]!
|
|
|
|
"""
|
|
A list of recent indexes for a specific repository. This list contains processing,
|
|
recently queued, and the most recently processed indexes for each distinct indexer
|
|
and root.
|
|
"""
|
|
recentIndexes: [LSIFIndexesWithRepositoryNamespace!]!
|
|
|
|
"""
|
|
The last time uploads of this repository were checked against data retention policies.
|
|
"""
|
|
lastUploadRetentionScan: DateTime
|
|
|
|
"""
|
|
The last time this repository was considered for auto-indexing job scheduling.
|
|
"""
|
|
lastIndexScan: DateTime
|
|
}
|
|
|
|
"""
|
|
A group of uploads that share the same root and indexer values.
|
|
"""
|
|
type LSIFUploadsWithRepositoryNamespace {
|
|
"""
|
|
The root of all uploads in the associated connection.
|
|
"""
|
|
root: String!
|
|
|
|
"""
|
|
The indexer used to produce the each upload in the associated connection.
|
|
"""
|
|
indexer: CodeIntelIndexer!
|
|
|
|
"""
|
|
A list of uploads.
|
|
"""
|
|
uploads: [LSIFUpload!]!
|
|
}
|
|
|
|
"""
|
|
A group of indexes that share the same root and indexer values.
|
|
"""
|
|
type LSIFIndexesWithRepositoryNamespace {
|
|
"""
|
|
The root of all indexes in the associated connection.
|
|
"""
|
|
root: String!
|
|
|
|
"""
|
|
The configured indexer of each index in the associated connection.
|
|
"""
|
|
indexer: CodeIntelIndexer!
|
|
|
|
"""
|
|
A list of indexes.
|
|
"""
|
|
indexes: [LSIFIndex!]!
|
|
}
|
|
|
|
"""
|
|
A git object that matches a git object type and glob pattern. This type is used by
|
|
the UI to preview what names match a code intelligence policy in a given repository.
|
|
"""
|
|
type GitObjectFilterPreview {
|
|
"""
|
|
The relevant branch or tag name.
|
|
"""
|
|
name: String!
|
|
|
|
"""
|
|
The full 40-char revhash.
|
|
"""
|
|
rev: String!
|
|
}
|
|
|
|
"""
|
|
LSIF data available for a tree entry (file OR directory, see GitBlobLSIFData for file-specific
|
|
resolvers and GitTreeLSIFData for directory-specific resolvers.)
|
|
"""
|
|
interface TreeEntryLSIFData {
|
|
"""
|
|
Code diagnostics provided through LSIF.
|
|
"""
|
|
diagnostics(first: Int): DiagnosticConnection!
|
|
|
|
"""
|
|
The list of LSIF uploads that may be used to service code-intel requests for this TreeEntry.
|
|
"""
|
|
lsifUploads: [LSIFUpload!]!
|
|
}
|
|
|
|
"""
|
|
A wrapper object around LSIF query methods for a particular git-tree-at-revision. When this node is
|
|
null, no LSIF data is available for the git tree in question.
|
|
"""
|
|
type GitTreeLSIFData implements TreeEntryLSIFData {
|
|
"""
|
|
Code diagnostics provided through LSIF.
|
|
"""
|
|
diagnostics(first: Int): DiagnosticConnection!
|
|
|
|
"""
|
|
The list of LSIF uploads that may be used to service code-intel requests for this TreeEntry.
|
|
"""
|
|
lsifUploads: [LSIFUpload!]!
|
|
}
|
|
|
|
"""
|
|
A wrapper object around LSIF query methods for a particular git-blob-at-revision. When this node is
|
|
null, no LSIF data is available for the git blob in question.
|
|
"""
|
|
type GitBlobLSIFData implements TreeEntryLSIFData {
|
|
"""
|
|
Return a flat list of all ranges in the document that have code intelligence.
|
|
"""
|
|
stencil: [Range!]!
|
|
|
|
"""
|
|
Get aggregated local code intelligence for all ranges that fall in the window
|
|
indicated by the given zero-based start (inclusive) and end (exclusive) lines.
|
|
The associated data for each range is "local", in that the locations and hover
|
|
must also be defined in the same index as the source range. To get cross-repository
|
|
and cross-bundle results, you must query the definitions, references, and hovers
|
|
of that range explicitly.
|
|
"""
|
|
ranges(startLine: Int!, endLine: Int!): CodeIntelligenceRangeConnection
|
|
|
|
"""
|
|
A list of definitions of the symbol under the given document position.
|
|
"""
|
|
definitions(
|
|
"""
|
|
The line on which the symbol occurs (zero-based, inclusive).
|
|
"""
|
|
line: Int!
|
|
|
|
"""
|
|
The character (not byte) of the start line on which the symbol occurs (zero-based, inclusive).
|
|
"""
|
|
character: Int!
|
|
|
|
"""
|
|
When specified, it filters references by filename.
|
|
"""
|
|
filter: String
|
|
): LocationConnection!
|
|
|
|
"""
|
|
A list of references of the symbol under the given document position.
|
|
"""
|
|
references(
|
|
"""
|
|
The line on which the symbol occurs (zero-based, inclusive).
|
|
"""
|
|
line: Int!
|
|
|
|
"""
|
|
The character (not byte) of the start line on which the symbol occurs (zero-based, inclusive).
|
|
"""
|
|
character: Int!
|
|
|
|
"""
|
|
When specified, indicates that this request should be paginated and
|
|
to fetch results starting at this cursor.
|
|
A future request can be made for more results by passing in the
|
|
'LocationConnection.pageInfo.endCursor' that is returned.
|
|
"""
|
|
after: String
|
|
|
|
"""
|
|
When specified, indicates that this request should be paginated and
|
|
the first N results (relative to the cursor) should be returned. i.e.
|
|
how many results to return per page.
|
|
"""
|
|
first: Int
|
|
|
|
"""
|
|
When specified, it filters references by filename.
|
|
"""
|
|
filter: String
|
|
): LocationConnection!
|
|
|
|
"""
|
|
A list of implementations of the symbol under the given document position.
|
|
"""
|
|
implementations(
|
|
"""
|
|
The line on which the symbol occurs (zero-based, inclusive).
|
|
"""
|
|
line: Int!
|
|
|
|
"""
|
|
The character (not byte) of the start line on which the symbol occurs (zero-based, inclusive).
|
|
"""
|
|
character: Int!
|
|
|
|
"""
|
|
When specified, indicates that this request should be paginated and
|
|
to fetch results starting at this cursor.
|
|
A future request can be made for more results by passing in the
|
|
'LocationConnection.pageInfo.endCursor' that is returned.
|
|
"""
|
|
after: String
|
|
|
|
"""
|
|
When specified, indicates that this request should be paginated and
|
|
the first N results (relative to the cursor) should be returned. i.e.
|
|
how many results to return per page.
|
|
"""
|
|
first: Int
|
|
|
|
"""
|
|
When specified, it filters immplementations by filename.
|
|
"""
|
|
filter: String
|
|
): LocationConnection!
|
|
|
|
"""
|
|
The hover result of the symbol under the given document position.
|
|
"""
|
|
hover(
|
|
"""
|
|
The line on which the symbol occurs (zero-based, inclusive).
|
|
"""
|
|
line: Int!
|
|
|
|
"""
|
|
The character (not byte) of the start line on which the symbol occurs (zero-based, inclusive).
|
|
"""
|
|
character: Int!
|
|
): Hover
|
|
|
|
"""
|
|
Code diagnostics provided through LSIF.
|
|
"""
|
|
diagnostics(first: Int): DiagnosticConnection!
|
|
|
|
"""
|
|
The list of LSIF uploads that may be used to service code-intel requests for this GitBlob.
|
|
"""
|
|
lsifUploads: [LSIFUpload!]!
|
|
}
|
|
|
|
"""
|
|
The state an LSIF upload can be in.
|
|
"""
|
|
enum LSIFUploadState {
|
|
"""
|
|
This upload is being processed.
|
|
"""
|
|
PROCESSING
|
|
|
|
"""
|
|
This upload failed to be processed.
|
|
"""
|
|
ERRORED
|
|
|
|
"""
|
|
This upload was processed successfully.
|
|
"""
|
|
COMPLETED
|
|
|
|
"""
|
|
This upload is queued to be processed later.
|
|
"""
|
|
QUEUED
|
|
|
|
"""
|
|
This upload is currently being transferred to Sourcegraph.
|
|
"""
|
|
UPLOADING
|
|
|
|
"""
|
|
This upload is queued for deletion. This upload was previously in the
|
|
COMPLETED state and evicted, replaced by a newer upload, or deleted by
|
|
a user. This upload is able to answer code intelligence queries until
|
|
the commit graph of the upload's repository is next calculated, at which
|
|
point the upload will become unreachable.
|
|
"""
|
|
DELETING
|
|
|
|
"""
|
|
This upload is deleted and its metadata is reconstructed from existing
|
|
audit log entries.
|
|
"""
|
|
DELETED
|
|
}
|
|
|
|
"""
|
|
Metadata and status about an LSIF upload.
|
|
"""
|
|
type LSIFUpload implements Node {
|
|
"""
|
|
The ID.
|
|
"""
|
|
id: ID!
|
|
|
|
"""
|
|
The project for which this upload provides code intelligence.
|
|
"""
|
|
projectRoot: CodeIntelGitTree
|
|
|
|
"""
|
|
The original 40-character commit commit supplied at upload time.
|
|
"""
|
|
inputCommit: String!
|
|
|
|
"""
|
|
The tags, if any, associated with this commit.
|
|
"""
|
|
tags: [String!]!
|
|
|
|
"""
|
|
The original root supplied at upload time.
|
|
"""
|
|
inputRoot: String!
|
|
|
|
"""
|
|
The original indexer name supplied at upload time.
|
|
"""
|
|
inputIndexer: String!
|
|
|
|
"""
|
|
The indexer used to produce this index.
|
|
"""
|
|
indexer: CodeIntelIndexer
|
|
|
|
"""
|
|
The upload's current state.
|
|
"""
|
|
state: LSIFUploadState!
|
|
|
|
"""
|
|
The time the upload was uploaded.
|
|
"""
|
|
uploadedAt: DateTime!
|
|
|
|
"""
|
|
The time the upload was processed.
|
|
"""
|
|
startedAt: DateTime
|
|
|
|
"""
|
|
The time the upload completed or errored.
|
|
"""
|
|
finishedAt: DateTime
|
|
|
|
"""
|
|
The processing error message (not set if state is not ERRORED).
|
|
"""
|
|
failure: String
|
|
|
|
"""
|
|
Whether or not this upload provides intelligence for the tip of the default branch. Find reference
|
|
queries will return symbols from remote repositories only when this property is true. This property
|
|
is updated asynchronously and is eventually consistent with the git data known by the Sourcegraph
|
|
instance.
|
|
"""
|
|
isLatestForRepo: Boolean!
|
|
|
|
"""
|
|
The rank of this upload in the queue. The value of this field is null if the upload has been processed.
|
|
"""
|
|
placeInQueue: Int
|
|
|
|
"""
|
|
The LSIF indexing job that created this upload record.
|
|
"""
|
|
associatedIndex: LSIFIndex
|
|
|
|
"""
|
|
The list of retention policies, optionally filtered by only ones that match/apply to this upload and/or
|
|
by name substring match.
|
|
"""
|
|
retentionPolicyOverview(
|
|
matchesOnly: Boolean!
|
|
|
|
"""
|
|
An (optional) search query that searches over the name property.
|
|
"""
|
|
query: String
|
|
|
|
"""
|
|
When specified, indicates that this request should be paginated and
|
|
to fetch results starting at this cursor.
|
|
A future request can be made for more results by passing in the
|
|
'CodeIntelligenceRetentionPolicyMatchesConnection.pageInfo.endCursor' that is returned.
|
|
"""
|
|
after: String
|
|
|
|
"""
|
|
When specified, indicates that this request should be paginated and
|
|
the first N results (relative to the cursor) should be returned. i.e.
|
|
how many results to return per page.
|
|
"""
|
|
first: Int
|
|
): CodeIntelligenceRetentionPolicyMatchesConnection!
|
|
|
|
"""
|
|
The list of documents contained in this processed upload, matching the Postgres
|
|
pattern. Pattern type is subject to change.
|
|
"""
|
|
documentPaths(pattern: String!): LSIFUploadDocumentPathsConnection!
|
|
|
|
"""
|
|
Audit logs representing each state change of the upload in order from earliest to latest.
|
|
"""
|
|
auditLogs: [LSIFUploadAuditLog!]
|
|
}
|
|
|
|
"""
|
|
A list of LSIF uploads.
|
|
"""
|
|
type LSIFUploadConnection {
|
|
"""
|
|
A list of LSIF uploads.
|
|
"""
|
|
nodes: [LSIFUpload!]!
|
|
|
|
"""
|
|
The total number of uploads in this result set.
|
|
"""
|
|
totalCount: Int
|
|
|
|
"""
|
|
Pagination information.
|
|
"""
|
|
pageInfo: PageInfo!
|
|
}
|
|
|
|
"""
|
|
A list of document paths in an LSIF upload.
|
|
"""
|
|
type LSIFUploadDocumentPathsConnection {
|
|
"""
|
|
The first 100 document paths. Pagination to be added at a later date.
|
|
"""
|
|
nodes: [String!]!
|
|
|
|
"""
|
|
The total number of docuemnt paths.
|
|
"""
|
|
totalCount: Int
|
|
}
|
|
|
|
"""
|
|
Contains the metadata and upload data for a single state change of an upload.
|
|
"""
|
|
type LSIFUploadAuditLog {
|
|
"""
|
|
The timestamp the log was emitted at.
|
|
"""
|
|
logTimestamp: DateTime!
|
|
|
|
"""
|
|
The timestamp when the associated upload was deleted at.
|
|
"""
|
|
uploadDeletedAt: DateTime
|
|
|
|
"""
|
|
The reason for this change in data.
|
|
"""
|
|
reason: String
|
|
|
|
"""
|
|
A list of changed columns in the format {"column": "<colname>", "new": "<newval>", "old": "<oldval>"}
|
|
"""
|
|
changedColumns: [AuditLogColumnChange!]!
|
|
|
|
"""
|
|
The ID of the upload.
|
|
"""
|
|
uploadId: ID!
|
|
|
|
"""
|
|
The original 40-character commit commit supplied at upload time.
|
|
"""
|
|
inputCommit: String!
|
|
|
|
"""
|
|
The original root supplied at upload time.
|
|
"""
|
|
inputRoot: String!
|
|
|
|
"""
|
|
The original indexer name supplied at upload time.
|
|
"""
|
|
inputIndexer: String!
|
|
|
|
"""
|
|
The time the upload was uploaded.
|
|
"""
|
|
uploadedAt: DateTime!
|
|
|
|
"""
|
|
The operation denoted by this log.
|
|
"""
|
|
operation: AuditLogOperation!
|
|
}
|
|
|
|
"""
|
|
Represents a state transition of a single column.
|
|
"""
|
|
type AuditLogColumnChange {
|
|
"""
|
|
The column that is changing.
|
|
"""
|
|
column: String!
|
|
|
|
"""
|
|
The previous value of the column.
|
|
"""
|
|
old: String
|
|
|
|
"""
|
|
The new value of the column
|
|
"""
|
|
new: String
|
|
}
|
|
|
|
"""
|
|
Denotes the type of operation of a given log entry.
|
|
"""
|
|
enum AuditLogOperation {
|
|
"""
|
|
Denotes this log entry represents an INSERT query.
|
|
"""
|
|
CREATE
|
|
"""
|
|
Denotes this log entry represents an UPDATE query.
|
|
"""
|
|
MODIFY
|
|
}
|
|
|
|
"""
|
|
The state an LSIF index can be in.
|
|
"""
|
|
enum LSIFIndexState {
|
|
"""
|
|
This index is being processed.
|
|
"""
|
|
PROCESSING
|
|
|
|
"""
|
|
This index failed to be processed.
|
|
"""
|
|
ERRORED
|
|
|
|
"""
|
|
This index was processed successfully.
|
|
"""
|
|
COMPLETED
|
|
|
|
"""
|
|
This index is queued to be processed later.
|
|
"""
|
|
QUEUED
|
|
}
|
|
|
|
"""
|
|
Metadata and status about an LSIF index.
|
|
"""
|
|
type LSIFIndex implements Node {
|
|
"""
|
|
The ID.
|
|
"""
|
|
id: ID!
|
|
|
|
"""
|
|
The project for which this upload provides code intelligence.
|
|
"""
|
|
projectRoot: CodeIntelGitTree
|
|
|
|
"""
|
|
The original 40-character commit commit supplied at index time.
|
|
"""
|
|
inputCommit: String!
|
|
|
|
"""
|
|
The tags, if any, associated with this commit.
|
|
"""
|
|
tags: [String!]!
|
|
|
|
"""
|
|
The original root supplied at index schedule time.
|
|
"""
|
|
inputRoot: String!
|
|
|
|
"""
|
|
The name of the target indexer Docker image (e.g., sourcegraph/lsif-go@sha256:...).
|
|
"""
|
|
inputIndexer: String!
|
|
|
|
"""
|
|
The indexer used to produce the index artifact.
|
|
"""
|
|
indexer: CodeIntelIndexer
|
|
|
|
"""
|
|
The index's current state.
|
|
"""
|
|
state: LSIFIndexState!
|
|
|
|
"""
|
|
The time the index was queued.
|
|
"""
|
|
queuedAt: DateTime!
|
|
|
|
"""
|
|
The time the index was processed.
|
|
"""
|
|
startedAt: DateTime
|
|
|
|
"""
|
|
The time the index completed or errored.
|
|
"""
|
|
finishedAt: DateTime
|
|
|
|
"""
|
|
The processing error message (not set if state is not ERRORED).
|
|
"""
|
|
failure: String
|
|
|
|
"""
|
|
The configuration and execution summary (if completed or errored) of this index job.
|
|
"""
|
|
steps: IndexSteps!
|
|
|
|
"""
|
|
The rank of this index in the queue. The value of this field is null if the index has been processed.
|
|
"""
|
|
placeInQueue: Int
|
|
|
|
"""
|
|
The LSIF upload created as part of this indexing job.
|
|
"""
|
|
associatedUpload: LSIFUpload
|
|
}
|
|
|
|
"""
|
|
Configuration and execution summary of an index job.
|
|
"""
|
|
type IndexSteps {
|
|
"""
|
|
Execution log entries related to setting up the indexing workspace.
|
|
"""
|
|
setup: [ExecutionLogEntry!]!
|
|
|
|
"""
|
|
Configuration and execution summary (if completed or errored) of steps to be performed prior to indexing.
|
|
"""
|
|
preIndex: [PreIndexStep!]!
|
|
|
|
"""
|
|
Configuration and execution summary (if completed or errored) of the indexer.
|
|
"""
|
|
index: IndexStep!
|
|
|
|
"""
|
|
Execution log entry related to uploading the dump produced by the indexing step.
|
|
This field be missing if the upload step had not been executed.
|
|
"""
|
|
upload: ExecutionLogEntry
|
|
|
|
"""
|
|
Execution log entries related to tearing down the indexing workspace.
|
|
"""
|
|
teardown: [ExecutionLogEntry!]!
|
|
}
|
|
|
|
"""
|
|
The configuration and execution summary of a step to be performed prior to indexing.
|
|
"""
|
|
type PreIndexStep {
|
|
"""
|
|
The working directory relative to the cloned repository root.
|
|
"""
|
|
root: String!
|
|
|
|
"""
|
|
The name of the Docker image to run.
|
|
"""
|
|
image: String!
|
|
|
|
"""
|
|
The arguments to supply to the Docker container's entrypoint.
|
|
"""
|
|
commands: [String!]!
|
|
|
|
"""
|
|
The execution summary (if completed or errored) of the docker command.
|
|
"""
|
|
logEntry: ExecutionLogEntry
|
|
}
|
|
|
|
"""
|
|
The configuration and execution summary of the indexer.
|
|
"""
|
|
type IndexStep {
|
|
"""
|
|
The arguments to supply to the indexer container.
|
|
"""
|
|
indexerArgs: [String!]!
|
|
|
|
"""
|
|
The path to the index file relative to the root directory (dump.lsif by default).
|
|
"""
|
|
outfile: String
|
|
|
|
"""
|
|
The execution summary (if completed or errored) of the index command.
|
|
"""
|
|
logEntry: ExecutionLogEntry
|
|
}
|
|
|
|
"""
|
|
A list of LSIF indexes.
|
|
"""
|
|
type LSIFIndexConnection {
|
|
"""
|
|
A list of LSIF indexes.
|
|
"""
|
|
nodes: [LSIFIndex!]!
|
|
|
|
"""
|
|
The total number of indexes in this result set.
|
|
"""
|
|
totalCount: Int
|
|
|
|
"""
|
|
Pagination information.
|
|
"""
|
|
pageInfo: PageInfo!
|
|
}
|
|
|
|
"""
|
|
Explicit configuration for indexing a repository.
|
|
"""
|
|
type IndexConfiguration {
|
|
"""
|
|
The raw JSON-encoded index configuration.
|
|
"""
|
|
configuration: String
|
|
|
|
"""
|
|
The raw JSON-encoded index configuration as infered by the auto-indexer.
|
|
"""
|
|
inferredConfiguration: String
|
|
}
|
|
|
|
"""
|
|
Details code-intel support for a group of files rooted at a tree.
|
|
"""
|
|
type GitTreeCodeIntelInfo {
|
|
"""
|
|
Search-based coverage grouped by language.
|
|
"""
|
|
searchBasedSupport: [GitTreeSearchBasedCoverage!]
|
|
"""
|
|
Precise coverage based on inference derived from the directory
|
|
structure and its files.
|
|
"""
|
|
preciseSupport: [GitTreePreciseCoverage!]
|
|
}
|
|
|
|
"""
|
|
Search-based code-intel support coverage grouped by related files.
|
|
"""
|
|
type GitTreeSearchBasedCoverage {
|
|
"""
|
|
The files comprising this grouping of search-based support.
|
|
Each grouping consists of all the files of the same langauge e.g.
|
|
all .go files in one group, all .kt and .kts files in another.
|
|
"""
|
|
coveredPaths: [String!]!
|
|
"""
|
|
Overview of the level of support for this group of files.
|
|
"""
|
|
support: SearchBasedCodeIntelSupport!
|
|
}
|
|
|
|
"""
|
|
Precise code-intel support coverage grouped by LSIF indexer language
|
|
support for a group of files.
|
|
"""
|
|
type GitTreePreciseCoverage {
|
|
"""
|
|
Overview of the level of support for this group of files.
|
|
"""
|
|
support: PreciseCodeIntelSupport!
|
|
"""
|
|
Level of confidence in the inference of an indexing target suggestion.
|
|
"""
|
|
confidence: InferedPreciseSupportLevel!
|
|
}
|
|
|
|
"""
|
|
Denotes the confidence in the correctness of the proposed index target.
|
|
"""
|
|
enum InferedPreciseSupportLevel {
|
|
"""
|
|
The language is known to have an LSIF indexer associated with it
|
|
but this may not be the directory from which it should be invoked.
|
|
Relevant build tool configuration may be available at a parent directory.
|
|
"""
|
|
LANGUAGE_SUPPORTED
|
|
"""
|
|
Relevant build tool configuration files were located that indicate
|
|
a good possibility of this directory being where an LSIF indexer
|
|
could be invoked, however we have or can not infer a potentially complete
|
|
auto indexing job configuration.
|
|
"""
|
|
PROJECT_STRUCTURE_SUPPORTED
|
|
"""
|
|
An auto-indexing job configuration was able to be infered for this
|
|
directory that has a high likelyhood of being complete enough to result
|
|
in an LSIF index.
|
|
"""
|
|
INDEX_JOB_INFERED
|
|
}
|
|
|
|
"""
|
|
Details the types, tools and levels of code-intel support.
|
|
"""
|
|
type CodeIntelSupport {
|
|
"""
|
|
Search-based code-intel support overview.
|
|
"""
|
|
searchBasedSupport: SearchBasedCodeIntelSupport
|
|
|
|
"""
|
|
Precise code-intel support overview.
|
|
"""
|
|
preciseSupport: PreciseCodeIntelSupport
|
|
}
|
|
|
|
"""
|
|
Details precise code-intel support overview.
|
|
"""
|
|
type PreciseCodeIntelSupport {
|
|
"""
|
|
Level of support/ownership for the most complete/accurate precise code-intel indexer.
|
|
This may be THIRD_PARTY even where a by us indexer exists, where the third-party indexer is
|
|
more maintained/accurate/complete etc such as with the Dart indexer, where the Workiva one
|
|
should be used over our own.
|
|
"""
|
|
supportLevel: PreciseSupportLevel!
|
|
"""
|
|
List of indexers in subjective order of recommendation, from most to least recommended
|
|
(not an indication of absolute quality, rather relative).
|
|
"""
|
|
indexers: [CodeIntelIndexer!]
|
|
}
|
|
|
|
"""
|
|
Describes a precise code-intel indexer.
|
|
"""
|
|
type CodeIntelIndexer {
|
|
"""
|
|
Name of the precise code-intel indexer.
|
|
"""
|
|
name: String!
|
|
"""
|
|
URL to the source of the indexer e.g. https://github.com/sourcegraph/lsif-go
|
|
"""
|
|
url: String!
|
|
}
|
|
|
|
"""
|
|
Ownership level of the recommended precise code-intel indexer.
|
|
"""
|
|
enum PreciseSupportLevel {
|
|
"""
|
|
When there is no known indexer.
|
|
"""
|
|
UNKNOWN
|
|
"""
|
|
When the recommended indexer is maintained by us.
|
|
"""
|
|
NATIVE
|
|
"""
|
|
When the recommended indexer is maintained by a third-party
|
|
but is recommended over a native indexer, where one exists.
|
|
"""
|
|
THIRD_PARTY
|
|
}
|
|
|
|
"""
|
|
Details search-based code-intel support overview.
|
|
"""
|
|
type SearchBasedCodeIntelSupport {
|
|
"""
|
|
Level of support.
|
|
"""
|
|
supportLevel: SearchBasedSupportLevel!
|
|
"""
|
|
The infered language the underlying tool infered when building an index for
|
|
search-based code-intel.
|
|
"""
|
|
language: String!
|
|
}
|
|
|
|
"""
|
|
Tiered list of types of search-based support for a language. This may be expanded as different
|
|
indexing methods are introduced.
|
|
"""
|
|
enum SearchBasedSupportLevel {
|
|
"""
|
|
The language has no configured search-based code-intel support.
|
|
"""
|
|
UNSUPPORTED
|
|
"""
|
|
Universal-ctags is used for indexing this language.
|
|
"""
|
|
BASIC
|
|
}
|