Esempio n. 1
0
        public async Task <Consumer> UpdateConsumerAsync(
            [GraphQLType(typeof(UpdateConsumerInputType))][GraphQLName("input")]
            UpdateConsumerCommand input, [Service] ISheaftMediatr mediatr,
            ConsumersByIdBatchDataLoader storesDataLoader, CancellationToken token)
        {
            await ExecuteAsync(mediatr, input, token);

            return(await storesDataLoader.LoadAsync(input.ConsumerId, token));
        }
Esempio n. 2
0
        public async Task <Consumer> RegisterConsumerAsync(
            [GraphQLType(typeof(RegisterConsumerInputType))][GraphQLName("input")]
            RegisterConsumerCommand input, [Service] ISheaftMediatr mediatr,
            ConsumersByIdBatchDataLoader storesDataLoader, CancellationToken token)
        {
            var result = await ExecuteAsync <RegisterConsumerCommand, Guid>(mediatr, input, token);

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