Esempio n. 1
0
        public async Task <Producer> UpdateProducerAsync(
            [GraphQLType(typeof(UpdateProducerInputType))][GraphQLName("input")]
            UpdateProducerCommand input, [Service] ISheaftMediatr mediatr,
            ProducersByIdBatchDataLoader producersDataLoader, CancellationToken token)
        {
            await ExecuteAsync(mediatr, input, token);

            return(await producersDataLoader.LoadAsync(input.ProducerId, token));
        }
Esempio n. 2
0
        public async Task <Producer> RegisterProducerAsync(
            [GraphQLType(typeof(RegisterProducerInputType))][GraphQLName("input")]
            RegisterProducerCommand input, [Service] ISheaftMediatr mediatr,
            ProducersByIdBatchDataLoader producersDataLoader, CancellationToken token)
        {
            var result = await ExecuteAsync <RegisterProducerCommand, Guid>(mediatr, input, token);

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