Ejemplo n.º 1
0
        public async Task <Agreement> ChangeAgreementDeliveryAsync(
            [GraphQLType(typeof(ChangeAgreementDeliveryInputType))][GraphQLName("input")]
            ChangeAgreementDeliveryCommand input, [Service] ISheaftMediatr mediatr,
            AgreementsByIdBatchDataLoader dataLoader, CancellationToken token)
        {
            await ExecuteAsync(mediatr, input, token);

            return(await dataLoader.LoadAsync(input.AgreementId, token));
        }
Ejemplo n.º 2
0
        public async Task <IEnumerable <Agreement> > RefuseAgreementsAsync(
            [GraphQLType(typeof(RefuseAgreementsInputType))][GraphQLName("input")]
            RefuseAgreementsCommand input, [Service] ISheaftMediatr mediatr,
            AgreementsByIdBatchDataLoader dataLoader, CancellationToken token)
        {
            await ExecuteAsync(mediatr, input, token);

            return(await dataLoader.LoadAsync(input.AgreementIds.ToList(), token));
        }
Ejemplo n.º 3
0
        public async Task <Agreement> CreateAgreementAsync(
            [GraphQLType(typeof(CreateAgreementInputType))][GraphQLName("input")]
            CreateAgreementCommand input, [Service] ISheaftMediatr mediatr,
            AgreementsByIdBatchDataLoader dataLoader, CancellationToken token)
        {
            var result = await ExecuteAsync <CreateAgreementCommand, Guid>(mediatr, input, token);

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