示例#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));
        }
示例#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));
        }
示例#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));
        }
示例#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));
        }