Skip to content

Latest commit

 

History

History
743 lines (675 loc) · 16.4 KB

schema.md

File metadata and controls

743 lines (675 loc) · 16.4 KB

Schema Types

Table of Contents

Query

Field Argument Type Description
repository Repository
id String!

The path to the repository folder. In case of siva files, the id is the path + the siva file name.

allRepositories [Repository]

Objects

Blob

Field Argument Type Description
repository Repository!
hash String!
size Int!
content String!
treeEntries [TreeEntry]!
name String
language String
file File!
uast [UASTNode]!

Babelfish UAST Node with fields that you can query. Each children level has to be queried explicitly.

language String!
internal_type String
token String
filter_func String

EXPERIMENTAL

A string with JS code. 'node' and 'result' are global variables.

e.g. "result = node.token.length > 15;"

flat Boolean

Flatten the tree allowing you filter nodes ignoring the tree level they are at.

uastRaw [JSON]!

Babelfish UAST Node, complete JSON

language String!
xpath String

Commit

Field Argument Type Description
repository Repository!
hash String!
authorName String!
authorEmail String!
authorWhen String!
committerName String!
committerEmail String!
committerWhen String!
message String!
treeEntries [TreeEntry]!
name String
language String
blobs [Blob]!
hash String
files [File]!
path String
language String

File

Field Argument Type Description
repository Repository!
path String!
blob Blob!
rootTreeHash String!
mode String!
content String!
size Int!
language String!
uast [UASTNode]!

Babelfish UAST Node with fields that you can query. Each children level has to be queried explicitly.

language String!
internal_type String
token String
filter_func String

EXPERIMENTAL

A string with JS code. 'node' and 'result' are global variables.

e.g. "result = node.token.length > 15;"

flat Boolean

Flatten the tree allowing you filter nodes ignoring the tree level they are at.

uastRaw [JSON]!

Babelfish UAST Node, complete JSON

language String!
xpath String

Ref

Field Argument Type Description
repository Repository!
name String!
commit Commit!
commits [Commit]!
authorName String
authorEmail String
isRemote Boolean!
isTag Boolean!

Remote

Field Argument Type Description
repository Repository!
name String!
pushUrl String!
fetchUrl String!
pushRefspec String!
fetchRefspec String!

Repository

Field Argument Type Description
id String!

The path to the repository folder. In case of siva files, the id is the path + the siva file name.

refs [Ref]!
name String
isRemote Boolean
isTag Boolean
remotes [Remote]!
name String

TreeEntry

Field Argument Type Description
repository Repository!
hash String!
mode String!
name String!
language String!
blob Blob

UASTNode

Field Argument Type Description
internal_type String
children [UASTNode]!

Babelfish UAST Nodes with fields that you can query. Each children level has to be queried explicitly.

internal_type String
token String
filter_func String

EXPERIMENTAL

A string with JS code. 'node' and 'result' are global variables.

e.g. "result = node.token.length > 15;"

flat Boolean

Flatten the tree allowing you filter nodes ignoring the tree level they are at.

childrenRaw [JSON]!

Babelfish UAST Nodes, complete JSON

token String
start_position UASTPosition
end_position UASTPosition
roles [Int]

TODO: can be transformed to string https://godoc.org/github.com/bblfsh/sdk/uast#Role

UASTPosition

Field Argument Type Description
offset Int
line Int
col Int

Scalars

Boolean

The Boolean scalar type represents true or false.

Int

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

JSON

String

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.