BatchProductLinks
Magento\CatalogGraphQl\Model\Resolver\Product\BatchProductLinks
What it does
This resolver handles batch retrieval and formatting of product links (related, upsell, cross-sell products) for GraphQL queries.
It converts product data into service contract arguments, executes batch queries for better performance, and transforms the results into GraphQL-compatible format with SKUs, link types, and positions.
Developers use this when implementing GraphQL endpoints that need to efficiently fetch product relationships.
Public Methods
- getServiceContract()
- convertToServiceArgument()
- convertFromServiceResult()