Log in
Model

ProductCategories

Magento\CatalogGraphQl\Model\Resolver\Product\ProductCategories

What it does

This class retrieves all category IDs where a product is visible for a specific store.

Developers use it to get category associations for products in GraphQL queries, excluding root categories from the results.

It queries the category-product index table to efficiently fetch category relationships.

Public Methods

  • getCategoryIdsByProduct()