Ejemplo n.º 1
0
        public async Task <IEnumerable <Delivery> > MarkTimeRangeDeliveriesAsBilled(
            [GraphQLType(typeof(MarkTimeRangeDeliveriesAsBilledInputType))][GraphQLName("input")]
            MarkTimeRangeDeliveriesAsBilledCommand input, [Service] ISheaftMediatr mediatr,
            DeliveriesByIdBatchDataLoader dataLoader, CancellationToken token)
        {
            var result = await ExecuteAsync <MarkTimeRangeDeliveriesAsBilledCommand, IEnumerable <Guid> >(mediatr, input, token);

            return(await dataLoader.LoadAsync(result.ToList(), token));
        }
Ejemplo n.º 2
0
        public async Task <Delivery> RejectDelivery(
            [GraphQLType(typeof(RejectDeliveryInputType))][GraphQLName("input")]
            RejectDeliveryCommand input, [Service] ISheaftMediatr mediatr,
            DeliveriesByIdBatchDataLoader dataLoader, CancellationToken token)
        {
            await ExecuteAsync(mediatr, input, token);

            return(await dataLoader.LoadAsync(input.DeliveryId, token));
        }