Open huming0618 opened 4 years ago
{
repository(owner: "huming0618", name: "learn-rust") {
refs(first: 100, refPrefix: "refs/heads/") {
nodes {
name
target {
... on Commit {
oid
committedDate
}
}
}
}
}
}
{
repository(name: "learn-rust", owner: "huming0618") {
object(expression: "master:01-trait") {
... on Tree {
commitUrl
id
commitResourcePath
entries {
name
type
}
}
}
}
}
repository(name: "<repo>", owner: "<owner>") {
object(expression: "master:") {
... on Tree {
entries {
name
}
}
}
}
query {
repository(name: "<repo>", owner: "<owner>") {
object(expression: "master:<path>") {
... on Blob {
oid
byteSize
text
}
}
}
}
query ListFiles($repoName: String!) {
repository(name: $repoName) {
commit(rev: "develop") {
tree(path: "/", recursive: true) {
entries {
path
isDirectory
url
}
}
}
}
}
links
https://api.github.com/graphql
https://<HOST>/api/graphql
example
query
with variable
query and mutation
mutation AddReactionToIssue { addReaction(input:{subjectId:"MDU6SXNzdWUyMzEzOTE1NTE=",content:HOORAY}) { reaction { content } subject { id } } }