4using System.Threading.Tasks;
7using HotChocolate.Authorization;
8using HotChocolate.Data;
9using HotChocolate.Types;
10using HotChocolate.Types.Relay;
31 CancellationToken cancellationToken)
33 ArgumentNullException.ThrowIfNull(userGroupAuthority);
44 public ValueTask<UserGroup?>
ById(
47 CancellationToken cancellationToken)
61 ArgumentNullException.ThrowIfNull(userGroupAuthority);
63 authority => authority.Queryable(
false));
80 ArgumentNullException.ThrowIfNull(userAuthority);
82 authority => authority
84 queryable => queryable.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.
async ValueTask< IQueryable< User > > QueryableUsersByGroupId([ID(nameof(UserGroup))]long groupId, [Service] IGraphQLAuthorityInvoker< IUserAuthority > userAuthority)
Queries all registered Users in a UserGroup indicated by groupId .
async ValueTask< IQueryable< UserGroup > > QueryableGroups([Service] IGraphQLAuthorityInvoker< IUserGroupAuthority > userGroupAuthority)
Queries all registered UserGroups.
ValueTask< UserGroup?> Current([Service] IGraphQLAuthorityInvoker< IUserGroupAuthority > userGroupAuthority, CancellationToken cancellationToken)
Gets the current User.
ValueTask< UserGroup?> ById([ID(nameof(UserGroup))] long id, [Service] IGraphQLAuthorityInvoker< IUserGroupAuthority > userGroupAuthority, CancellationToken cancellationToken)
Gets a UserGroup by Entity.Id.
A user registered in the server.
Invokes TAuthority s from GraphQL endpoints.