Skip to content

Commit

Permalink
chore: update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
Razz21 committed Jan 23, 2024
1 parent 9998202 commit f0261ca
Showing 1 changed file with 42 additions and 1 deletion.
43 changes: 42 additions & 1 deletion .changeset/tidy-kangaroos-deliver.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,48 @@
- [`CategorySearchQuery`](https://docs.vuestorefront.io/integrations/magento/api/magento-types/CategorySearchQuery) new fields:
- `url_key` - The url key assigned to the category.
- `children` - Child categories tree.
- `include_in_menu`
- `is_anchor`
- `level`
- `name`
- `position`
- `product_count`
- `uid`
- `url_key`
- `url_path`
- `url_suffix`

```js
// get category `children` categories

const category = sdk.commerce.categorySearch();
const children = category.children;
```

- [`CategoryListQuery`](https://docs.vuestorefront.io/integrations/magento/api/magento-types/CategoryListQuery) new fields:
- `url_key` - The url key assigned to the category.
- `children.url_key` - The url key assigned to the category.

```js
// get `url_key` of category children

const categoryList = sdk.commerce.categoryList();

for (let categoryChildren of categoryList.children) {
const url_key = categoryChildren.url_key;
}
```

- [`ProductListsQuery`](https://docs.vuestorefront.io/integrations/magento/api/magento-types/ProductListsQuery) new fields:
- `variants` - An array of variants of [`ConfigurableProduct`](https://docs.vuestorefront.io/integrations/magento/api/magento-types/ConfigurableProduct)

```js
// get ConfigurableProduct `variants` products

const products = sdk.commerce.products();

for (let product of products) {
if (product.__typename === "ConfigurableProduct") {
const variants = products.variants;
}
}
```

0 comments on commit f0261ca

Please sign in to comment.