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)); }
public JsonResult RateProduct(RateProductCommand command) { var result = _commandBus.Send(command); return(JsonMessage(result)); }