예제 #1
0
        public async Task <Returnable> UpdateReturnableAsync(
            [GraphQLType(typeof(UpdateReturnableInputType))][GraphQLName("input")]
            UpdateReturnableCommand input, [Service] ISheaftMediatr mediatr,
            ReturnablesByIdBatchDataLoader returnablesDataLoader, CancellationToken token)
        {
            await ExecuteAsync(mediatr, input, token);

            return(await returnablesDataLoader.LoadAsync(input.ReturnableId, token));
        }
예제 #2
0
        public async Task <Returnable> CreateReturnableAsync(
            [GraphQLType(typeof(CreateReturnableInputType))][GraphQLName("input")]
            CreateReturnableCommand input, [Service] ISheaftMediatr mediatr,
            ReturnablesByIdBatchDataLoader returnablesDataLoader, CancellationToken token)
        {
            var result = await ExecuteAsync <CreateReturnableCommand, Guid>(mediatr, input, token);

            return(await returnablesDataLoader.LoadAsync(result, token));
        }