SearchResult
Magento\CatalogGraphQl\Model\Resolver\Products\SearchResult
What it does
This class serves as a Data Transfer Object (DTO) that encapsulates product search results for GraphQL queries in Magento 2.
Developers use it to access structured search data including product items, pagination details, aggregations/filters, and search suggestions in a format optimized for GraphQL responses.
It acts as a container that standardizes how product search data is passed between the GraphQL resolver layer and the response formatter.
Public Methods
- getTotalCount()
- getProductsSearchResult()
- getSearchAggregation()
- getPageSize()
- getCurrentPage()
- getTotalPages()
- getSuggestions()