Model
ProductDataProvider
Magento\CatalogGraphQl\Model\ProductDataProvider
What it does
This class provides product data retrieval functionality for GraphQL queries in Magento 2.
Developers use it to fetch product information by ID, converting product objects into arrays suitable for GraphQL responses.
It acts as a data provider layer between the GraphQL resolvers and the product repository.
Public Methods
- getProductDataById()