コード例 #1
0
        public async Task <QuickOrder> UpdateQuickOrderAsync(
            [GraphQLType(typeof(UpdateQuickOrderInputType))][GraphQLName("input")]
            UpdateQuickOrderCommand input, [Service] ISheaftMediatr mediatr,
            QuickOrdersByIdBatchDataLoader quickOrdersDataLoader, CancellationToken token)
        {
            await ExecuteAsync(mediatr, input, token);

            return(await quickOrdersDataLoader.LoadAsync(input.QuickOrderId, token));
        }
コード例 #2
0
        public async Task <QuickOrder> CreateQuickOrderAsync(
            [GraphQLType(typeof(CreateQuickOrderInputType))][GraphQLName("input")]
            CreateQuickOrderCommand input, [Service] ISheaftMediatr mediatr,
            QuickOrdersByIdBatchDataLoader quickOrdersDataLoader, CancellationToken token)
        {
            var result = await ExecuteAsync <CreateQuickOrderCommand, Guid>(mediatr, input, token);

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