Ejemplo n.º 1
0
        public async ValueTask <IResolverResult> AddMessageAsync(IResolverContext context)
        {
            var input   = context.GetObjectArgument <InputMessage>("message");
            var message = await context.Use <IChat>().AddMessageAsync(
                "1",
                input.Content);

            return(Resolve.As(message));
        }
Ejemplo n.º 2
0
        public async ValueTask <IResolverResult> EditMessageAsync(IResolverContext context)
        {
            var id    = context.GetArgument <string>("id");
            var input = context.GetObjectArgument <InputMessage>("message");

            var message = await context.Use <IChat>().EditMessageAsync(
                id,
                input.Content);

            return(Resolve.As(message));
        }