Storefront API - How to extend storefront API for customization

Hi,
How to extend the Litium Ecommerce storefront API code for customization. I am interested in learning more about the best practices for extending the API and how to ensure that my customizations are compatible with future releases.

Specifically, I am interested in the following:

  • How to add new endpoints to the API
  • How to extend existing endpoints
  • How to customize the viewmodel builder from backend

I have reviewed the Litium Ecommerce documentation and tutorials, but I am still having some difficulty understanding how to extend the API code. I would appreciate any guidance or resources that you can provide.

Litium version: 8.12.0

1 Like

Hi, Hi we are having the same thoughts about it. @ludvig.block or anybody else

Adding extension or changing the Storefront API will be done with GraphQL Federation, where you extending (modifying) the schema without needing to change the default schema, this functionality is not in place yet. The GraphQL Federation will then request the custom GraphQL endpoint and fetch the extra data for the schema. Introduction to Apollo Federation - Apollo GraphQL Docs is a good source to read to get more inforamtion about how the GraphQL Federation is working.

The custom GraphQL endpoint can be build in whatever language you prefer like nodejs or aspnet core.

View model builders in the way they are used in Mvc accelerator are not used, instead the schema deliver the data and the component that making the request is responsible to build the view model.

Thank you for your response. Could you please provide an estimated timeline or roadmap for the release of this feature? Additionally, when is the StoreFront API expected to transition from its current Release Candidate (RC) status to a finalized, “done” solution?

You can find our Roadmap (litium.com) ibut also the more specificReact accelerator prerelease stages (litium.com) and Storefront API prerelease stages (litium.com) where we listed the features that we have identified.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.