4using System.Threading.Tasks;
7using HotChocolate.Data;
8using HotChocolate.Types;
9using HotChocolate.Types.Relay;
15#pragma warning disable CA1724
39 CancellationToken cancellationToken)
41 ArgumentNullException.ThrowIfNull(userAuthority);
42 return userAuthority.InvokeTransformable<Models.User,
User,
UserGraphQLTransformer>(authority => authority.Read(cancellationToken));
54 public ValueTask<User?>
ById(
55 [ID(nameof(
User))]
long id,
57 CancellationToken cancellationToken)
58 =>
User.
GetUser(
id, userAuthority, cancellationToken);
72 ArgumentNullException.ThrowIfNull(userAuthority);
73 var dtoQueryable = userAuthority.InvokeTransformableQueryable<Models.User,
User,
UserGraphQLTransformer>(authority => authority.Queryable(
false));
Exception representing ErrorMessageResponses.
Wrapper for accessing UserGroups.
A user registered in the server.
static ValueTask< User?> GetUser(long id, [Service] IGraphQLAuthorityInvoker< IUserAuthority > userAuthority, CancellationToken cancellationToken)
Node resolver for Users.
Wrapper for accessing Users.
UserGroups Groups()
Gets the swarm's UserGroups.
IQueryable< User > QueryableUsers([Service] IGraphQLAuthorityInvoker< IUserAuthority > userAuthority)
Queries all registered Users.
ValueTask< User > Current([Service] IGraphQLAuthorityInvoker< IUserAuthority > userAuthority, CancellationToken cancellationToken)
Gets the current User.
ValueTask< User?> ById([ID(nameof(User))] long id, [Service] IGraphQLAuthorityInvoker< IUserAuthority > userAuthority, CancellationToken cancellationToken)
Gets a User by Entity.Id.
Invokes TAuthority s from GraphQL endpoints.
IAuthority for managing Users.
IQueryable< User > Queryable(bool includeJoins)
Gets all registered Users.
ValueTask< AuthorityResponse< User > > GetId(long id, bool includeJoins, bool allowSystemUser, CancellationToken cancellationToken)
Gets the User with a given id .
ValueTask< AuthorityResponse< User > > Read(CancellationToken cancellationToken)
Gets the currently authenticated user.