Fix relations argument declaration for getGroupMembers query and fix relation for fetching SaaS users

Signed-off-by: Stephen Barry <sbarry@poppulo.com>
This commit is contained in:
Stephen Barry
2023-08-16 11:41:33 +01:00
parent 31d50133b4
commit aef4f7263a
2 changed files with 2 additions and 5 deletions
@@ -188,7 +188,7 @@ export class GitLabClient {
},
body: JSON.stringify({
variables: { group: groupPath, relations: relations, endCursor },
query: `query getGroupMembers($group: ID!, $endCursor: String) {
query: `query getGroupMembers($group: ID!, $relations: GroupMemberRelation!, $endCursor: String) {
group(fullPath: $group) {
groupMembers(first: 100, relations: [$relations], after: $endCursor) {
nodes {
@@ -191,10 +191,7 @@ export class GitlabOrgDiscoveryEntityProvider implements EntityProvider {
} else {
groups = (await client.listDescendantGroups(this.config.group)).items;
users = (
await client.getGroupMembers(
this.config.group.split('/')[0],
'DIRECT, DESCENDANTS',
)
await client.getGroupMembers(this.config.group.split('/')[0], 'DIRECT')
).items;
}