Skip to content

@vue-storefront/magento-api@2.6.0

Compare
Choose a tag to compare
@github-actions github-actions released this 04 Apr 13:49
· 34 commits to main since this release
d3c30ca

Minor Changes

  • 7ce4f9e: [CHANGED] Enhanced default GQL queries

    • 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
    // get category `children` categories
    
    const category = sdk.commerce.categorySearch();
    const children = category.children;
    • CategoryListQuery new fields:
      • children.url_key - The url key assigned to the category.
    // get `url_key` of category children
    
    const categoryList = sdk.commerce.categoryList();
    
    for (let categoryChildren of categoryList.children) {
      const url_key = categoryChildren.url_key;
    }
    // get ConfigurableProduct `variants` products
    
    const products = sdk.commerce.products();
    
    for (let product of products) {
      if (product.__typename === "ConfigurableProduct") {
        const variants = products.variants;
      }
    }

Patch Changes