Esempio n. 1
0
        public async Task <Catalog> CloneCatalogAsync([GraphQLType(typeof(CloneCatalogInputType))][GraphQLName("input")]
                                                      CloneCatalogCommand input, [Service] ISheaftMediatr mediatr,
                                                      CatalogsByIdBatchDataLoader catalogsDataLoader, CancellationToken token)
        {
            var result = await ExecuteAsync <CloneCatalogCommand, Guid>(mediatr, input, token);

            return(await catalogsDataLoader.LoadAsync(result, token));
        }
Esempio n. 2
0
        public async Task <IEnumerable <Catalog> > SetCatalogsAvailabilityAsync(
            [GraphQLType(typeof(SetCatalogsAvailabilityInputType))][GraphQLName("input")]
            SetCatalogsAvailabilityCommand input, [Service] ISheaftMediatr mediatr,
            CatalogsByIdBatchDataLoader catalogsDataLoader, CancellationToken token)
        {
            await ExecuteAsync(mediatr, input, token);

            return(await catalogsDataLoader.LoadAsync(input.CatalogIds.ToList(), token));
        }
Esempio n. 3
0
        public async Task <Catalog> RemoveProductsFromCatalogAsync(
            [GraphQLType(typeof(RemoveProductsFromCatalogInputType))][GraphQLName("input")]
            RemoveProductsFromCatalogCommand input, [Service] ISheaftMediatr mediatr,
            CatalogsByIdBatchDataLoader catalogsDataLoader, CancellationToken token)
        {
            await ExecuteAsync(mediatr, input, token);

            return(await catalogsDataLoader.LoadAsync(input.CatalogId, token));
        }
Esempio n. 4
0
        public async Task <Catalog> UpdateAllCatalogPricesAsync(
            [GraphQLType(typeof(UpdateAllCatalogPricesInputType))][GraphQLName("input")]
            UpdateAllCatalogPricesCommand input, [Service] ISheaftMediatr mediatr,
            CatalogsByIdBatchDataLoader catalogsDataLoader, CancellationToken token)
        {
            await ExecuteAsync(mediatr, input, token);

            return(await catalogsDataLoader.LoadAsync(input.CatalogId, token));
        }