Log in
Model

MediaGalleryTypeResolver

Magento\CatalogGraphQl\Model\MediaGalleryTypeResolver

What it does

This class determines the specific GraphQL type for media gallery items returned in product queries.

When a GraphQL query requests product media gallery data, this resolver inspects each media item and returns 'ProductImage' for images or 'ProductVideo' for external videos, allowing the GraphQL schema to properly type and structure the response data.

Public Methods

  • resolveType()