Skip to content
Last update: December 27, 2024

Migration to New xAPI Modules

In July 2024, we migrated to a new xAPI architecture to better support the evolving needs of our business API with GraphQL. The VirtoCommerce.ExperienceApi module has been replaced with a suite of new, more specialized modules. This change is part of our effort to simplify business API development and streamline our release cycle.

Actions required

Please migrate from the legacy VirtoCommerce.ExperienceApi module to the new modules listed below:

  • xApi: Core business API module.
  • xCart: Cart-related functionalities management.
  • xCatalog: Catalog-related operations management.
  • xCMS: Content Management System integration.
  • xOrder: Order processing.

Breaking changes

Frontend

  • GraphQL schema compatibility: All GraphQL schemas remain compatible, so no frontend modifications are required directly due to schema changes.

    Note

    Deprecated validateCoupon mutation was removed. Use validateCoupon query instead.

  • API endpoint changes: If your frontend directly calls endpoints provided by VirtoCommerce.ExperienceApi, verify and update the endpoint URLs to match the new module structure if necessary.

  • Testing: Thoroughly test frontend interactions to ensure smooth functionality with the new backend modules.

Custom modules

  • Dependency changes: Custom modules that depended on VirtoCommerce.ExperienceApi will need to be updated to depend on the appropriate new modules (VirtoCommerce.Xapi, VirtoCommerce.XCart, VirtoCommerce.XCatalog, VirtoCommerce.XCMS, VirtoCommerce.XOrder).
  • Uninstall old packages: Ensure to uninstall the NuGet packages from VirtoCommerce.ExperienceApi and replace them with the new packages.
  • Code adjustments: Review and adjust your code to align with the new module structures and namespaces.

Update path

To migrate to the new modules:

  1. Uninstall VirtoCommerce.ExperienceApi.
  2. Install the new modules:

  3. Update other modules to the new version if required, ensuring they now depend on VirtoCommerce.Xapi:

  4. For any custom modules, uninstall the NuGet packages from VirtoCommerce.ExperienceApi and replace them with the new ones.

  5. Models, service interfaces, GraphQL schema types, and input types, commands, queries, and aggregates are moved to respective Core projects of the new modules (XCatalog.Core, XCart.Core, etc.) with namespaces adjusted. Data projects contain service implementations, command and query builders, command and query handlers, and middleware.

Update and support

VirtoCommerce.ExperienceApi is archived and will be supported in Stable 8 and Stable 9 releases. Future developments will focus on the new VirtoCommerce.Xapi and related modules. The latest Edge release has adopted the new modules.