How virtocommerce/vc-module-x-catalog works
xCatalog is Virto Commerce’s GraphQL catalog experience module, providing search-index-backed catalog queries. The main storefront flow maps GraphQL product-search arguments into a query, builds and executes an index request, then enriches the response through a product evaluation pipeline. Separate query families cover categories, brands, properties, suggestions, promotions, associations, videos, and fulfillment centers. The tree and excerpts establish the product/search path and selected category and brand behavior; other listed capabilities are represented without asserting unshown call wiring.
Main entry points: SearchCategoryQueryHandler.cs Category search handler · SearchProductQueryHandler.cs Product search handler · SearchProductQuery.cs Product query · IndexSearchRequestBuilder.cs Index request builder
Components 18
GraphQL API
- Catalog schemas
src/VirtoCommerce.XCatalog.Core/Schemas - Product query
src/VirtoCommerce.XCatalog.Core/Queries/SearchProductQuery.cs - Category query
src/VirtoCommerce.XCatalog.Core/Queries/SearchCategoryQuery.cs - Catalog query base
src/VirtoCommerce.XCatalog.Core/Queries/CatalogQueryBase.cs
Query Handling
- Product search handler
src/VirtoCommerce.XCatalog.Data/Queries/SearchProductQueryHandler.cs - Category search handler
src/VirtoCommerce.XCatalog.Data/Queries/SearchCategoryQueryHandler.cs
Index Search
- Index request builder
src/VirtoCommerce.XCatalog.Data/Index/IndexSearchRequestBuilder.cs - Index field mapping
src/VirtoCommerce.XCatalog.Data/Index/IndexFieldsMapper.cs - Search index
- Catalog mapper
src/VirtoCommerce.XCatalog.Data/Services/XCatalogMapper.cs
Response Enrichment
- Product enrichment
src/VirtoCommerce.XCatalog.Data/Middlewares - Category enrichment
src/VirtoCommerce.XCatalog.Data/Middlewares/EnsureCategoryLoadedMiddleware.cs
Catalog Capabilities
- Child categories
src/VirtoCommerce.XCatalog.Data/Queries/ChildCategoriesQueryHandler.cs - Brand search
src/VirtoCommerce.XCatalog.Data/Queries/SearchBrandQueryHandler.cs - Catalog query handlers
src/VirtoCommerce.XCatalog.Data/Queries - Expanded products
src/VirtoCommerce.XCatalog.Core/Models/ExpProduct.cs - Query response models
src/VirtoCommerce.XCatalog.Core/Models
Other components
- Storefront client
Connections 20
- Storefront client → Catalog schemas: queries
README.md - Catalog schemas → Product query: exposes
- Product search handler → Product query: handles
src/VirtoCommerce.XCatalog.Data/Queries/SearchProductQueryHandler.cs - Category search handler → Category query: handles
src/VirtoCommerce.XCatalog.Data/Queries/SearchCategoryQueryHandler.cs - Product search handler → Index request builder: builds request
src/VirtoCommerce.XCatalog.Data/Queries/SearchProductQueryHandler.cs - Category search handler → Index request builder: builds request
src/VirtoCommerce.XCatalog.Data/Queries/SearchCategoryQueryHandler.cs - Index request builder → Search index: searches
- Product search handler → Search index: searches products
src/VirtoCommerce.XCatalog.Data/Queries/SearchProductQueryHandler.cs - Category search handler → Search index: searches categories
src/VirtoCommerce.XCatalog.Data/Queries/SearchCategoryQueryHandler.cs - Product search handler → Catalog mapper: maps results
src/VirtoCommerce.XCatalog.Data/Queries/SearchProductQueryHandler.cs - Category search handler → Catalog mapper: maps results
src/VirtoCommerce.XCatalog.Data/Queries/SearchCategoryQueryHandler.cs - Product search handler → Product enrichment: evaluates response
src/VirtoCommerce.XCatalog.Data/Queries/SearchProductQueryHandler.cs - Product enrichment → Expanded products: enriches
src/VirtoCommerce.XCatalog.Data/Middlewares/ResolveSearchFiltersResponseMiddleware.cs - Category search handler → Category enrichment: loads categories
- Category search handler → Child categories: requests children
src/VirtoCommerce.XCatalog.Data/Queries/SearchCategoryQueryHandler.cs - Child categories → Product query: filters by products
src/VirtoCommerce.XCatalog.Data/Queries/ChildCategoriesQueryHandler.cs - Brand search → Product query: queries brand facets
src/VirtoCommerce.XCatalog.Data/Queries/SearchBrandQueryHandler.cs - Product search handler → Query response models: returns results
src/VirtoCommerce.XCatalog.Data/Queries/SearchProductQueryHandler.cs - Category search handler → Query response models: returns results
src/VirtoCommerce.XCatalog.Data/Queries/SearchCategoryQueryHandler.cs - Catalog query handlers → Search index: serves catalog searches