Categories
CMS Development Magento

Add new ProductTierPrices field in GraphQl products query

I created a module to extend the behavior of tier prices, including a new field on the table, it is now saving to DB correctly.

My question is: I want to implement GraphQl products query so that the ProductTierPrices type can return this new field – I extended the class Product, to include this field, however in my resolver, when executing $product->getTierPrices(), the returned class is Magento\Catalog\Api\Data\ProductTierPriceInterface, and not my custom class…

How can I make it return my own class, or even have an object of my custom Product class when running $product = $value['model']?

Leave a Reply

Your email address will not be published. Required fields are marked *