diff --git a/src/Tgstation.Server.Host/GraphQL/Types/UserGroup.cs b/src/Tgstation.Server.Host/GraphQL/Types/UserGroup.cs
index d08987d818..c2cd444d77 100644
--- a/src/Tgstation.Server.Host/GraphQL/Types/UserGroup.cs
+++ b/src/Tgstation.Server.Host/GraphQL/Types/UserGroup.cs
@@ -19,6 +19,11 @@ namespace Tgstation.Server.Host.GraphQL.Types
[Node]
public sealed class UserGroup : NamedEntity
{
+ ///
+ /// The for the .
+ ///
+ public required PermissionSet PermissionSet { get; set; }
+
///
/// Node resolver for s.
///
@@ -36,22 +41,6 @@ namespace Tgstation.Server.Host.GraphQL.Types
authority => authority.GetId(id, false, cancellationToken));
}
- ///
- /// The owned by the .
- ///
- /// The for the .
- /// The for the operation.
- /// A resulting in the owned by the .
- public async ValueTask PermissionSet(
- [Service] IGraphQLAuthorityInvoker permissionSetAuthority,
- CancellationToken cancellationToken)
- {
- ArgumentNullException.ThrowIfNull(permissionSetAuthority);
-
- return await permissionSetAuthority.InvokeTransformable(
- authority => authority.GetId(Id, PermissionSetLookupType.GroupId, cancellationToken));
- }
-
///
/// Queries all registered s in the .
///
@@ -60,7 +49,7 @@ namespace Tgstation.Server.Host.GraphQL.Types
[UsePaging]
[UseFiltering]
[UseSorting]
- public async ValueTask> QueryableUsersByGroup(
+ public async ValueTask> Users(
[Service] IGraphQLAuthorityInvoker userAuthority)
{
ArgumentNullException.ThrowIfNull(userAuthority);
diff --git a/src/Tgstation.Server.Host/Models/Transformers/UserGroupGraphQLTransformer.cs b/src/Tgstation.Server.Host/Models/Transformers/UserGroupGraphQLTransformer.cs
index 26ce4752e0..2c53868511 100644
--- a/src/Tgstation.Server.Host/Models/Transformers/UserGroupGraphQLTransformer.cs
+++ b/src/Tgstation.Server.Host/Models/Transformers/UserGroupGraphQLTransformer.cs
@@ -9,11 +9,15 @@
/// Initializes a new instance of the class.
///
public UserGroupGraphQLTransformer()
- : base(model => new GraphQL.Types.UserGroup
- {
- Id = model.Id!.Value,
- Name = model.Name!,
- })
+ : base(
+ BuildSubProjection(
+ (model, permissionSet) => new GraphQL.Types.UserGroup
+ {
+ Id = model.Id!.Value,
+ Name = model.Name!,
+ PermissionSet = permissionSet!,
+ },
+ model => model.PermissionSet))
{
}
}