コード例 #1
0
        public async Task <BatchDefinition> UpdateBatchDefinitionAsync(
            [GraphQLType(typeof(UpdateBatchDefinitionInputType))][GraphQLName("input")]
            UpdateBatchDefinitionCommand input, [Service] ISheaftMediatr mediatr,
            BatchDefinitionsByIdBatchDataLoader catalogsDataLoader, CancellationToken token)
        {
            await ExecuteAsync(mediatr, input, token);

            return(await catalogsDataLoader.LoadAsync(input.BatchDefinitionId, token));
        }
コード例 #2
0
        public async Task <BatchDefinition> CreateBatchDefinitionAsync(
            [GraphQLType(typeof(CreateBatchDefinitionInputType))][GraphQLName("input")]
            CreateBatchDefinitionCommand input, [Service] ISheaftMediatr mediatr,
            BatchDefinitionsByIdBatchDataLoader catalogsDataLoader, CancellationToken token)
        {
            var result = await ExecuteAsync <CreateBatchDefinitionCommand, Guid>(mediatr, input, token);

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