1
0
mirror of https://github.com/git-touch/git-touch synced 2024-12-23 21:52:19 +01:00

improvement(gh): stargazers order by time desc

This commit is contained in:
Rongjian Zhang 2020-04-05 22:02:38 +08:00
parent e62b6a2846
commit b2a7add3ec
2 changed files with 18 additions and 2 deletions

View File

@ -2309,7 +2309,19 @@ class GhUsersQuery extends GraphQLQuery<GhUsers, GhUsersArguments> {
value: IntValueNode(value: '30')),
ArgumentNode(
name: NameNode(value: 'after'),
value: VariableNode(name: NameNode(value: 'after')))
value: VariableNode(name: NameNode(value: 'after'))),
ArgumentNode(
name: NameNode(value: 'orderBy'),
value: ObjectValueNode(fields: [
ObjectFieldNode(
name: NameNode(value: 'field'),
value: EnumValueNode(
name: NameNode(value: 'STARRED_AT'))),
ObjectFieldNode(
name: NameNode(value: 'direction'),
value: EnumValueNode(
name: NameNode(value: 'DESC')))
]))
],
directives: [
DirectiveNode(

View File

@ -79,7 +79,11 @@ query GhUsers(
createdAt
}
}
stargazers(first: 30, after: $after) @include(if: $isStar) {
stargazers(
first: 30
after: $after
orderBy: { field: STARRED_AT, direction: DESC }
) @include(if: $isStar) {
pageInfo {
hasNextPage
endCursor