XAPI Decoupling

Overview

To better support the growing business API with GraphQL, we are transitioning from a single VirtoCommerce.ExperienceApi module to a more composable architecture consisting of multiple new modules. This change aims to simplify business API development and the release cycle. The existing VirtoCommerce.ExperienceApi is now marked as archived, and its updates will be limited to Stable 8 and Stable 9 releases. The latest Edge release has switched to the new VirtoCommerce.Xapi module.

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.

Breaking Changes

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.

Frontend

  • GraphQL Schema Compatibility: All GraphQL schemas remain compatible, so no frontend modifications are required directly due to schema changes.
  • 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.

Changes with Details

The following new modules replace the single VirtoCommerce.ExperienceApi module:

Other modules updated to depend on VirtoCommerce.Xapi:

  • VirtoCommerce.ProfileExperienceApiModule
  • VirtoCommerce.Contracts
  • VirtoCommerce.PushMessages
  • VirtoCommerce.MarketingExperienceApi
  • VirtoCommerce.Quote
  • VirtoCommerce.CustomerReviews
  • VirtoCommerce.Skyflow
  • VirtoCommerce.TaskManagement
  • VirtoCommerce.FileExperienceApi
  • VirtoCommerce.WhiteLabeling

Update Path

To transition to the new modules, follow these steps:

  1. Uninstall VirtoCommerce.ExperienceApi.
  2. Install the new modules:
  • VirtoCommerce.Xapi
  • VirtoCommerce.XCart
  • VirtoCommerce.XCatalog
  • VirtoCommerce.XCMS
  • VirtoCommerce.XOrder
  1. Update other modules to the new version if required, ensuring they now depend on VirtoCommerce.Xapi:
  • VirtoCommerce.MarketingExperienceApi
  • VirtoCommerce.Quote
  • VirtoCommerce.CustomerReviews
  • VirtoCommerce.Skyflow
  • VirtoCommerce.TaskManagement
  • VirtoCommerce.FileExperienceApi
  • VirtoCommerce.WhiteLabeling
  1. For any custom modules, uninstall the NuGet packages from VirtoCommerce.ExperienceApi and replace them with the new ones. 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.
  2. Schema: validateCoupon command (was marked as Deprecated) was removed, use validateCoupon query.

Summary

The migration from VirtoCommerce.ExperienceApi to a suite of new modules (VirtoCommerce.Xapi, VirtoCommerce.XCart, VirtoCommerce.XCatalog, VirtoCommerce.XCMS, and VirtoCommerce.XOrder) marks a significant step towards a more composable and efficient architecture.

This change simplifies the development and release cycle of business APIs. The transition ensures compatibility with existing GraphQL schemas, requiring no front-end modifications. We are committed to supporting the archived VirtoCommerce.ExperienceApi in Stable 8 and 9 releases while focusing on the enhanced capabilities of the new modules.