Help us learn about your current experience with the documentation. Take the survey.

GitLab Orbit Local schema reference

  • Tier: Free, Premium, Ultimate
  • Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
  • Status: Beta

The GitLab Orbit Local schema reference defines the available nodes, edges, and relationships in your local graph.

Source code nodes

The following sections define the available nodes and their properties.

Directory

A directory in an indexed repository.

PropertiesDefinition
idUnique identifier for the directory
project_idIdentifier of the indexed repository, derived from its absolute path. Not a GitLab project ID.
branchBranch the directory was indexed from
commit_shaCommit the directory was indexed at
pathPath relative to the repository root
nameDirectory name

File

A source code file in an indexed repository.

PropertiesDefinition
idUnique identifier for the file
project_idIdentifier of the indexed repository, derived from its absolute path. Not a GitLab project ID
branchBranch the file was indexed from
commit_shaCommit the file was indexed at
pathPath relative to the repository root
nameFilename, including the extension
extensionFile extension, without the leading dot
languageDetected programming language, or unknown when no language matched
size_bytesFile size in bytes, measured when the file was indexed
reasonWhy the file was skipped or failed to parse, such as skip_excluded_extension or fault_invalid_utf8. Empty for files parsed successfully.

Definition

A function, class, method, module, or other named symbol declared in a file.

PropertiesDefinition
idUnique identifier for the definition, generated per file path. The same function in two indexed repositories has different IDs.
project_idIdentifier of the indexed repository, derived from its absolute path. Not a GitLab project ID.
branchBranch the definition was indexed from
commit_shaCommit the definition was indexed at
file_pathPath of the file that declares the definition
fqnFully qualified name of a function, class, module, method, struct, enum, or trait
nameShort name, without namespace qualification
definition_typeKind of definition, such as Class, Function, Method, or Struct. Values are capitalized and language-specific.
start_lineFirst line of the definition
end_lineLast line of the definition
start_byteByte offset where the definition starts
end_byteByte offset where the definition ends
start_charColumn on start_line where the definition starts
end_charColumn on end_line where the definition ends
search_textLowercase identifier tokens from fqn and file_path, used for ranked code search
token_countNumber of tokens in search_text

ImportedSymbol

An import statement or cross-file symbol reference in a file.

PropertiesDefinition
idUnique identifier for the imported symbol
project_idIdentifier of the indexed repository, derived from its absolute path. Not a GitLab project ID.
branchBranch the symbol was indexed from
commit_shaCommit the symbol was indexed at
file_pathPath of the file that contains the import
import_typeKind of import, such as Use, NamedImport, or CjsRequire. Values are capitalized and language-specific.
import_pathModule or path the symbol is imported from
identifier_nameName of the imported symbol. Empty for wildcard and side-effect imports.
identifier_aliasLocal name the import binds the symbol to. Empty when the analyzer records none. Some languages populate it even when the import is not renamed.
start_lineFirst line of the import
end_lineLast line of the import
start_byteByte offset where the import starts
end_byteByte offset where the import ends
start_charColumn on start_line where the import starts
end_charColumn on end_line where the import ends

Relationships

Edges in the local graph have one of the following relationship types:

  • CONTAINS
  • DEFINES
  • IMPORTS
  • CALLS
  • EXTENDS

The same relationship type can connect different node types.

Relationship typeSource nodeTarget nodeDescription
CONTAINSDirectoryDirectoryDirectory contains a subdirectory
CONTAINSDirectoryFileDirectory contains a file
DEFINESFileDefinitionFile defines a code definition, such as a class or function
DEFINESDefinitionDefinitionOuter definition lexically contains a nested definition, such as a class and its methods
IMPORTSFileImportedSymbolFile contains an import statement
IMPORTSImportedSymbolDefinitionImported symbol resolves to a concrete definition in another file
CALLSDefinitionDefinitionDefinition invokes another definition
CALLSDefinitionImportedSymbolDefinition invokes an imported symbol that is not resolved to a definition
CALLSFileDefinition or ImportedSymbolTop-level call site outside any enclosing definition
EXTENDS 1DefinitionDefinitionDefinition declares a supertype of a function, class, method, module, or other named symbol declared in a file

Footnotes:

  1. EXTENDS points from the child to the parent. A class that extends a base class is the source node, and the base class is the target node.