cancel
Showing results for 
Search instead for 
Did you mean: 

Add new ProductTierPrices field in GraphQl products query

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

Add new ProductTierPrices field in GraphQl products query

Hi all,
I created a module to extend the behaviour 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']?

 

Thank you.