ProductStock
Magento\QuoteGraphQl\Model\CartItem\ProductStock
What it does
This class handles product stock availability checks for cart items in GraphQL operations.
Developers use it to verify if products (including bundle and configurable types) have sufficient inventory when adding to cart, and to retrieve available or saleable stock quantities.
It's particularly important for GraphQL cart mutations where stock validation is needed before completing add-to-cart operations.
Public Methods
- isProductAvailable()
- isStockAvailableBundle()
- getProductAvailableStock()
- getProductSaleableQty()