Exemple #1
0
        public async Task <Product> RateProductAsync([GraphQLType(typeof(RateProductInputType))][GraphQLName("input")]
                                                     RateProductCommand input, [Service] ISheaftMediatr mediatr,
                                                     ProductsByIdBatchDataLoader productsDataLoader, CancellationToken token)
        {
            await ExecuteAsync(mediatr, input, token);

            return(await productsDataLoader.LoadAsync(input.ProductId, token));
        }
Exemple #2
0
        public JsonResult RateProduct(RateProductCommand command)
        {
            var result = _commandBus.Send(command);

            return(JsonMessage(result));
        }