public async ValueTask <IResolveResult> UpdateRatingAsync(ResolverContext context)
        {
            var input  = context.GetArgument <UpdateRatingRequest>("input");
            var result = await _ratingServiceClient.UpdateRatingAsync(input);

            return(As(result.Rating));
        }
 public async ValueTask <IResolveResult> UpdateRatingAsync(ResolverContext context)
 {
     return(await GrpcClientCatch(
                "rating-service",
                async headers =>
     {
         var input = context.GetArgument <UpdateRatingRequest>("input");
         var result = await _ratingServiceClient.UpdateRatingAsync(input, headers);
         return As(result.Rating);
     }));
 }
Beispiel #3
0
        public async Task <IActionResult> Update(UpdateRatingRequest request)
        {
            var result = await _serviceClient.UpdateRatingAsync(request);

            return(Ok(result));
        }