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

            return(As(result.Rating));
        }
 public async ValueTask <IResolveResult> CreateRatingAsync(ResolverContext context)
 {
     return(await GrpcClientCatch(
                "rating-service",
                async headers =>
     {
         var input = context.GetArgument <CreateRatingRequest>("input");
         var result = await _ratingServiceClient.CreateRatingAsync(input, headers);
         return As(result.Rating);
     }));
 }
Exemplo n.º 3
0
        public async Task <IActionResult> Create(CreateRatingRequest request)
        {
            var result = await _serviceClient.CreateRatingAsync(request);

            return(Ok(result));
        }