1
0
mirror of https://github.com/git-touch/git-touch synced 2024-12-25 07:13:57 +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')), value: IntValueNode(value: '30')),
ArgumentNode( ArgumentNode(
name: NameNode(value: 'after'), 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: [ directives: [
DirectiveNode( DirectiveNode(

View File

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