2020-01-07 08:07:57 +01:00
|
|
|
query GhRepos($owner: String!, $after: String, $isStar: Boolean!) {
|
2019-12-07 15:25:37 +01:00
|
|
|
repositoryOwner(login: $owner) {
|
|
|
|
__typename
|
|
|
|
login
|
|
|
|
avatarUrl
|
|
|
|
... on User {
|
|
|
|
repositories(
|
|
|
|
first: 30
|
|
|
|
after: $after
|
|
|
|
orderBy: { field: UPDATED_AT, direction: DESC }
|
|
|
|
) @skip(if: $isStar) {
|
|
|
|
totalCount # TODO:
|
|
|
|
pageInfo {
|
|
|
|
hasNextPage
|
|
|
|
endCursor
|
|
|
|
}
|
|
|
|
nodes {
|
|
|
|
owner {
|
|
|
|
login
|
|
|
|
avatarUrl
|
|
|
|
}
|
|
|
|
name
|
|
|
|
description
|
|
|
|
isPrivate
|
|
|
|
isFork
|
2020-01-11 12:25:33 +01:00
|
|
|
updatedAt
|
2019-12-07 15:25:37 +01:00
|
|
|
stargazers {
|
|
|
|
totalCount
|
|
|
|
}
|
|
|
|
forks {
|
|
|
|
totalCount
|
|
|
|
}
|
|
|
|
primaryLanguage {
|
|
|
|
color
|
|
|
|
name
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
starredRepositories(
|
|
|
|
first: 30
|
|
|
|
after: $after
|
|
|
|
orderBy: { field: STARRED_AT, direction: DESC }
|
|
|
|
) @include(if: $isStar) {
|
|
|
|
pageInfo {
|
|
|
|
hasNextPage
|
|
|
|
endCursor
|
|
|
|
}
|
|
|
|
nodes {
|
|
|
|
owner {
|
|
|
|
login
|
|
|
|
avatarUrl
|
|
|
|
}
|
|
|
|
name
|
|
|
|
description
|
|
|
|
isPrivate
|
|
|
|
isFork
|
2020-01-11 12:25:33 +01:00
|
|
|
updatedAt
|
2019-12-07 15:25:37 +01:00
|
|
|
stargazers {
|
|
|
|
totalCount
|
|
|
|
}
|
|
|
|
forks {
|
|
|
|
totalCount
|
|
|
|
}
|
|
|
|
primaryLanguage {
|
|
|
|
color
|
|
|
|
name
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
... on Organization {
|
|
|
|
pinnableItems(first: 30, after: $after, types: [REPOSITORY])
|
|
|
|
@skip(if: $isStar) {
|
|
|
|
__typename
|
|
|
|
pageInfo {
|
|
|
|
hasNextPage
|
|
|
|
endCursor
|
|
|
|
}
|
|
|
|
nodes {
|
|
|
|
... on Repository {
|
|
|
|
owner {
|
|
|
|
login
|
|
|
|
avatarUrl
|
|
|
|
}
|
|
|
|
name
|
|
|
|
description
|
|
|
|
isPrivate
|
|
|
|
isFork
|
2020-01-11 12:25:33 +01:00
|
|
|
updatedAt
|
2019-12-07 15:25:37 +01:00
|
|
|
stargazers {
|
|
|
|
totalCount
|
|
|
|
}
|
|
|
|
forks {
|
|
|
|
totalCount
|
|
|
|
}
|
|
|
|
primaryLanguage {
|
|
|
|
color
|
|
|
|
name
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|