Exemplo n.º 1
0
        public async Task <DeliveryBatch> CompleteDeliveryBatchAsync(
            [GraphQLType(typeof(CompleteDeliveryBatchInputType))][GraphQLName("input")]
            CompleteDeliveryBatchCommand input, [Service] ISheaftMediatr mediatr,
            DeliveryBatchesByIdBatchDataLoader deliveryBatchesDataLoader, CancellationToken token)
        {
            await ExecuteAsync(mediatr, input, token);

            return(await deliveryBatchesDataLoader.LoadAsync(input.DeliveryBatchId, token));
        }
Exemplo n.º 2
0
        public async Task <DeliveryBatch> CreateDeliveryBatchAsync(
            [GraphQLType(typeof(CreateDeliveryBatchInputType))][GraphQLName("input")]
            CreateDeliveryBatchCommand input, [Service] ISheaftMediatr mediatr,
            DeliveryBatchesByIdBatchDataLoader deliveryBatchesDataLoader, CancellationToken token)
        {
            var result = await ExecuteAsync <CreateDeliveryBatchCommand, Guid>(mediatr, input, token);

            return(await deliveryBatchesDataLoader.LoadAsync(result, token));
        }