Log in
Model

RatingSummary

Magento\ReviewGraphQl\Model\Resolver\Product\RatingSummary

What it does

This GraphQL resolver retrieves and returns the average rating summary for a product in Magento 2.

Developers use this class when they need to expose product rating data through GraphQL APIs, allowing frontend applications to display product ratings and reviews.

It checks if reviews are enabled, loads the rating summary for the specified product and store, and returns it as a float value.

Public Methods

  • resolve()