Exemplo n.º 1
0
        public async Task <ConsumerLegal> UpdateConsumerLegalsAsync(
            [GraphQLType(typeof(UpdateConsumerLegalsInputType))][GraphQLName("input")]
            UpdateConsumerLegalCommand input, [Service] ISheaftMediatr mediatr,
            ConsumerLegalsByIdBatchDataLoader legalsDataLoader, CancellationToken token)
        {
            await ExecuteAsync(mediatr, input, token);

            return(await legalsDataLoader.LoadAsync(input.LegalId, token));
        }
Exemplo n.º 2
0
        public async Task <ConsumerLegal> CreateConsumerLegalsAsync(
            [GraphQLType(typeof(CreateConsumerLegalsInputType))][GraphQLName("input")]
            CreateConsumerLegalCommand input, [Service] ISheaftMediatr mediatr,
            ConsumerLegalsByIdBatchDataLoader legalsDataLoader, CancellationToken token)
        {
            var result = await ExecuteAsync <CreateConsumerLegalCommand, Guid>(mediatr, input, token);

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