Log in
Model

RelatedProductDataProvider

Magento\RelatedProductGraphQl\Model\DataProvider\RelatedProductDataProvider

What it does

This data provider retrieves related, up-sell, and cross-sell products for GraphQL queries in Magento 2.

Developers use this class when implementing GraphQL resolvers that need to fetch product relationships, providing both detailed product data with specific attributes and efficient bulk relationship mappings for multiple products.

Public Methods

  • getData()
  • getRelations()