feat: feedback resolved
This commit is contained in:
@@ -29,7 +29,7 @@ export class InfraResolver {
|
|||||||
constructor(private adminService: AdminService) {}
|
constructor(private adminService: AdminService) {}
|
||||||
|
|
||||||
@Query(() => Infra, {
|
@Query(() => Infra, {
|
||||||
description: 'Gives details of the admin executing this query',
|
description: 'Gives details of the infra executing this query',
|
||||||
})
|
})
|
||||||
@UseGuards(GqlAuthGuard, GqlAdminGuard)
|
@UseGuards(GqlAuthGuard, GqlAdminGuard)
|
||||||
infra(@GqlAdmin() admin: Admin) {
|
infra(@GqlAdmin() admin: Admin) {
|
||||||
@@ -66,10 +66,7 @@ export class InfraResolver {
|
|||||||
description: 'Returns a list of all the users in infra',
|
description: 'Returns a list of all the users in infra',
|
||||||
})
|
})
|
||||||
@UseGuards(GqlAuthGuard, GqlAdminGuard)
|
@UseGuards(GqlAuthGuard, GqlAdminGuard)
|
||||||
async allUsers(
|
async allUsers(@Args() args: PaginationArgs): Promise<AuthUser[]> {
|
||||||
@Parent() infra: Infra,
|
|
||||||
@Args() args: PaginationArgs,
|
|
||||||
): Promise<AuthUser[]> {
|
|
||||||
const users = await this.adminService.fetchUsers(args.cursor, args.take);
|
const users = await this.adminService.fetchUsers(args.cursor, args.take);
|
||||||
return users;
|
return users;
|
||||||
}
|
}
|
||||||
@@ -77,7 +74,7 @@ export class InfraResolver {
|
|||||||
@ResolveField(() => [InvitedUser], {
|
@ResolveField(() => [InvitedUser], {
|
||||||
description: 'Returns a list of all the invited users',
|
description: 'Returns a list of all the invited users',
|
||||||
})
|
})
|
||||||
async invitedUsers(@Parent() infra: Infra): Promise<InvitedUser[]> {
|
async invitedUsers(): Promise<InvitedUser[]> {
|
||||||
const users = await this.adminService.fetchInvitedUsers();
|
const users = await this.adminService.fetchInvitedUsers();
|
||||||
return users;
|
return users;
|
||||||
}
|
}
|
||||||
@@ -85,10 +82,7 @@ export class InfraResolver {
|
|||||||
@ResolveField(() => [Team], {
|
@ResolveField(() => [Team], {
|
||||||
description: 'Returns a list of all the teams in the infra',
|
description: 'Returns a list of all the teams in the infra',
|
||||||
})
|
})
|
||||||
async allTeams(
|
async allTeams(@Args() args: PaginationArgs): Promise<Team[]> {
|
||||||
@Parent() infra: Infra,
|
|
||||||
@Args() args: PaginationArgs,
|
|
||||||
): Promise<Team[]> {
|
|
||||||
const teams = await this.adminService.fetchAllTeams(args.cursor, args.take);
|
const teams = await this.adminService.fetchAllTeams(args.cursor, args.take);
|
||||||
return teams;
|
return teams;
|
||||||
}
|
}
|
||||||
@@ -97,7 +91,6 @@ export class InfraResolver {
|
|||||||
description: 'Returns a team info by ID when requested by Admin',
|
description: 'Returns a team info by ID when requested by Admin',
|
||||||
})
|
})
|
||||||
async teamInfo(
|
async teamInfo(
|
||||||
@Parent() infra: Infra,
|
|
||||||
@Args({
|
@Args({
|
||||||
name: 'teamID',
|
name: 'teamID',
|
||||||
type: () => ID,
|
type: () => ID,
|
||||||
@@ -114,7 +107,6 @@ export class InfraResolver {
|
|||||||
description: 'Return count of all the members in a team',
|
description: 'Return count of all the members in a team',
|
||||||
})
|
})
|
||||||
async membersCountInTeam(
|
async membersCountInTeam(
|
||||||
@Parent() infra: Infra,
|
|
||||||
@Args({
|
@Args({
|
||||||
name: 'teamID',
|
name: 'teamID',
|
||||||
type: () => ID,
|
type: () => ID,
|
||||||
@@ -131,7 +123,6 @@ export class InfraResolver {
|
|||||||
description: 'Return count of all the stored collections in a team',
|
description: 'Return count of all the stored collections in a team',
|
||||||
})
|
})
|
||||||
async collectionCountInTeam(
|
async collectionCountInTeam(
|
||||||
@Parent() infra: Infra,
|
|
||||||
@Args({
|
@Args({
|
||||||
name: 'teamID',
|
name: 'teamID',
|
||||||
type: () => ID,
|
type: () => ID,
|
||||||
@@ -147,7 +138,6 @@ export class InfraResolver {
|
|||||||
description: 'Return count of all the stored requests in a team',
|
description: 'Return count of all the stored requests in a team',
|
||||||
})
|
})
|
||||||
async requestCountInTeam(
|
async requestCountInTeam(
|
||||||
@Parent() infra: Infra,
|
|
||||||
@Args({
|
@Args({
|
||||||
name: 'teamID',
|
name: 'teamID',
|
||||||
type: () => ID,
|
type: () => ID,
|
||||||
@@ -163,7 +153,6 @@ export class InfraResolver {
|
|||||||
description: 'Return count of all the stored environments in a team',
|
description: 'Return count of all the stored environments in a team',
|
||||||
})
|
})
|
||||||
async environmentCountInTeam(
|
async environmentCountInTeam(
|
||||||
@Parent() infra: Infra,
|
|
||||||
@Args({
|
@Args({
|
||||||
name: 'teamID',
|
name: 'teamID',
|
||||||
type: () => ID,
|
type: () => ID,
|
||||||
@@ -179,7 +168,6 @@ export class InfraResolver {
|
|||||||
description: 'Return all the pending invitations in a team',
|
description: 'Return all the pending invitations in a team',
|
||||||
})
|
})
|
||||||
async pendingInvitationCountInTeam(
|
async pendingInvitationCountInTeam(
|
||||||
@Parent() infra: Infra,
|
|
||||||
@Args({
|
@Args({
|
||||||
name: 'teamID',
|
name: 'teamID',
|
||||||
type: () => ID,
|
type: () => ID,
|
||||||
|
|||||||
Reference in New Issue
Block a user