Beispiel #1
0
 public AnyTimerType(IAnyTimerRepository repository, ICommentRepository commentRepository)
 {
     Name = "AnyTimer";
     Field(a => a.Id, type: typeof(IdGraphType));
     Field(a => a.CreatedTime);
     Field(a => a.LastUpdated);
     Field <AnyTimerStatusType>("Status");
     Field(a => a.Reason);
     FieldAsync <UserType>(
         "receiver",
         resolve: async context => await context.UserRecord(context.Source.ReceiverId)
         );
     FieldAsync <UserType>(
         "creator",
         resolve: async context => await context.UserRecord(context.Source.CreatorId)
         );
     FieldAsync <ListGraphType <AnyTimerSenderType> >(
         "senders",
         resolve: async context => await repository.Senders(context.Source.Id));
     FieldAsync <ListGraphType <StatusEventType> >(
         "statusEvents",
         resolve: async context => await repository.StatusEvents(context.Source.Id)
         );
     FieldAsync <ListGraphType <CommentType> >(
         "comments",
         resolve: async context => await commentRepository.ForAnyTimer(context.Source.Id)
         );
 }
 public AnyTimerQueries(IAnyTimerRepository repository)
 {
     _repository = repository;
 }
Beispiel #3
0
 public AnyTimerStatusMutations(IAnyTimerRepository repository)
 {
     _repository = repository;
 }
Beispiel #4
0
 public AnyTimerMutations(IAnyTimerRepository repository, IFriendRequestRepository friendRepository)
 {
     _repository       = repository;
     _friendRepository = friendRepository;
 }
Beispiel #5
0
 public CommentMutations(IAnyTimerRepository repository, ICommentRepository commentRepository)
 {
     _repository        = repository;
     _commentRepository = commentRepository;
 }