Apply prettier lint and rename GitlabSaasGroupsResponse -> GitlabDescendantGroupsResponse

Signed-off-by: Stephen Barry <sbarry@poppulo.com>
This commit is contained in:
Stephen Barry
2023-08-22 08:33:19 +01:00
parent 8bc51413d9
commit 880c08c0b0
@@ -22,7 +22,7 @@ import {
import { Logger } from 'winston';
import {
GitLabGroup,
GitLabSaasGroupsResponse,
GitLabDescendantGroupsResponse,
GitLabGroupMembersResponse,
GitLabUser,
} from './types';
@@ -105,7 +105,7 @@ export class GitLabClient {
let endCursor: string | null = null;
do {
const response: GitLabSaasGroupsResponse = await fetch(
const response: GitLabDescendantGroupsResponse = await fetch(
`${this.config.baseUrl}/api/graphql`,
{
method: 'POST',
@@ -191,27 +191,37 @@ export class GitLabClient {
},
body: JSON.stringify({
variables: { group: groupPath, relations: relations, endCursor },
query: /* GraphQL */ `query getGroupMembers($group: ID!, $relations: [GroupMemberRelation!], $endCursor: String) {
group(fullPath: $group) {
groupMembers(first: 100, relations: $relations, after: $endCursor) {
nodes {
user {
id
username
publicEmail
name
state
webUrl
avatarUrl
query: /* GraphQL */ `
query getGroupMembers(
$group: ID!
$relations: [GroupMemberRelation!]
$endCursor: String
) {
group(fullPath: $group) {
groupMembers(
first: 100
relations: $relations
after: $endCursor
) {
nodes {
user {
id
username
publicEmail
name
state
webUrl
avatarUrl
}
}
pageInfo {
endCursor
hasNextPage
}
}
pageInfo {
endCursor
hasNextPage
}
}
}
}`,
`,
}),
},
).then(r => r.json());