1
0
mirror of https://github.com/git-touch/git-touch synced 2024-12-20 04:05:26 +01:00

fix: organization members query

This commit is contained in:
Rongjian Zhang 2020-01-01 14:20:59 +08:00
parent fb28038021
commit 3586ee5230
2 changed files with 10 additions and 13 deletions

View File

@ -606,7 +606,13 @@ class GithubUsersQuery extends GraphQLQuery<GithubUsers, GithubUsersArguments> {
name: NameNode(value: 'login'), name: NameNode(value: 'login'),
value: VariableNode(name: NameNode(value: 'login'))) value: VariableNode(name: NameNode(value: 'login')))
], ],
directives: [], directives: [
DirectiveNode(name: NameNode(value: 'skip'), arguments: [
ArgumentNode(
name: NameNode(value: 'if'),
value: VariableNode(name: NameNode(value: 'isMember')))
])
],
selectionSet: SelectionSetNode(selections: [ selectionSet: SelectionSetNode(selections: [
FieldNode( FieldNode(
name: NameNode(value: 'login'), name: NameNode(value: 'login'),
@ -866,16 +872,7 @@ class GithubUsersQuery extends GraphQLQuery<GithubUsers, GithubUsersArguments> {
name: NameNode(value: 'after'), name: NameNode(value: 'after'),
value: VariableNode(name: NameNode(value: 'after'))) value: VariableNode(name: NameNode(value: 'after')))
], ],
directives: [ directives: [],
DirectiveNode(
name: NameNode(value: 'include'),
arguments: [
ArgumentNode(
name: NameNode(value: 'if'),
value: VariableNode(
name: NameNode(value: 'isFollowing')))
])
],
selectionSet: SelectionSetNode(selections: [ selectionSet: SelectionSetNode(selections: [
FieldNode( FieldNode(
name: NameNode(value: 'pageInfo'), name: NameNode(value: 'pageInfo'),

View File

@ -8,7 +8,7 @@ query(
$isStar: Boolean! $isStar: Boolean!
$isWatch: Boolean! $isWatch: Boolean!
) { ) {
user(login: $login) { user(login: $login) @skip(if: $isMember) {
login login
name name
avatarUrl avatarUrl
@ -49,7 +49,7 @@ query(
name name
avatarUrl avatarUrl
location location
membersWithRole(first: 30, after: $after) @include(if: $isFollowing) { membersWithRole(first: 30, after: $after) {
pageInfo { pageInfo {
hasNextPage hasNextPage
endCursor endCursor