Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update changelog for a multistore #7346

Merged
merged 2 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/content/3.middleware/2.guides/4.federation.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ If you want to retrieve a loaded integration within the context of another, you
Usage:

```javascript
const sapcc = context.getApiClient("sapcc");
const sapcc = await context.getApiClient("sapcc");
```

The `getApiClient` method takes a single argument, which is the key of the api client you wish to retrieve. This is the key you would define in the `middleware.config.js` file for the integration you wish to retrieve. The key is essentially an identifier for the integration.
Expand All @@ -38,7 +38,7 @@ export const integrations = {
extendApiMethods: {
getPDP: async (context, params: { id: string }) => {
const sapccApi = context.api; // You can access integration methods directly
const contentful = context.getApiClient("contentful"); // You can access other integrations using getApiClient
const contentful = await context.getApiClient("contentful"); // You can access other integrations using getApiClient

const [product, content] = Promise.all(
sapccApi.getProduct({ id: params.id }),
Expand Down Expand Up @@ -99,7 +99,7 @@ export const integrations = {
extendApiMethods: {
enrichedSearch: async (context, params: { productId: string }) => {
const sapccApi = context.api;
const legacyCustomSystem = context.getApiClient("legacyCustomSystem");
const legacyCustomSystem = await context.getApiClient("legacyCustomSystem");

const [prouctStock, product] = await Promise.all([
legacyCustomSystem.api.getProductStock({
Expand Down
6 changes: 6 additions & 0 deletions docs/content/3.middleware/4.reference/change-log.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,12 @@ const { createApiClient } = apiClientFactory({
export { createApiClient };
```

- **[CHANGED]** - Middleware `getApiClient` is now an asynchronous function. Please, read the [data federation](https://docs.alokai.com/middleware/guides/federation#using-getapiclient-method-to-access-different-api-client) guide to get more information.

:::warning
This change may introduce breaking changes in some projects. Please ensure to update your project accordingly if necessary.
:::

## 4.0.1

### Patch Changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
### Patch Changes

- Updated dependencies:
- @vue-storefront/[email protected]
- @vue-storefront/[email protected] - Please refer to the [middleware changelog](https://docs.alokai.com/middleware/reference/change-log#_510) for more details.

## 4.1.1

### Patch Changes

- Updated dependencies:
- @vue-storefront/[email protected]
- @vue-storefront/[email protected] - Please refer to the [middleware changelog](https://docs.alokai.com/middleware/reference/change-log#_500) for more details.

## 4.1.0

Expand Down
Loading