4using System.Threading.Tasks;
7using HotChocolate.Data;
8using HotChocolate.Types;
9using HotChocolate.Types.Relay;
30 ArgumentNullException.ThrowIfNull(userGroupAuthority);
42 public ValueTask<UserGroup?>
ById(
45 CancellationToken cancellationToken)
60 ArgumentNullException.ThrowIfNull(userGroupAuthority);
79 ArgumentNullException.ThrowIfNull(userAuthority);
81 authority => authority
83 .Where(user => user.GroupId == groupId));
Represents a group of Users.
static ValueTask< UserGroup?> GetUserGroup(long id, [Service] IGraphQLAuthorityInvoker< IUserGroupAuthority > userGroupAuthority, CancellationToken cancellationToken)
Node resolver for Users.
Wrapper for accessing UserGroups.
ValueTask< UserGroup?> Current([Service] IGraphQLAuthorityInvoker< IUserGroupAuthority > userGroupAuthority)
Gets the current User.
IQueryable< UserGroup > QueryableGroups([Service] IGraphQLAuthorityInvoker< IUserGroupAuthority > userGroupAuthority)
Queries all registered UserGroups.
ValueTask< UserGroup?> ById([ID(nameof(UserGroup))] long id, [Service] IGraphQLAuthorityInvoker< IUserGroupAuthority > userGroupAuthority, CancellationToken cancellationToken)
Gets a UserGroup by Entity.Id.
IQueryable< User > QueryableUsersByGroupId([ID(nameof(UserGroup))]long groupId, [Service] IGraphQLAuthorityInvoker< IUserAuthority > userAuthority)
Queries all registered Users in a UserGroup indicated by groupId .
A user registered in the server.
Invokes TAuthority s from GraphQL endpoints.
IAuthority for managing Users.
IQueryable< User > Queryable(bool includeJoins)
Gets all registered Users.
IAuthority for managing UserGroups.
ValueTask< AuthorityResponse< UserGroup > > GetId(long id, bool includeJoins, CancellationToken cancellationToken)
Gets the UserGroup with a given id .
IQueryable< UserGroup > Queryable(bool includeJoins)
Gets all registered UserGroups.