Model
CanonicalUrl
Magento\CatalogGraphQl\Model\Resolver\Product\CanonicalUrl
What it does
This GraphQL resolver retrieves the canonical URL for a product in Magento 2's GraphQL API.
Developers use this when building headless storefronts or custom frontends that need to access a product's SEO-friendly canonical URL path, which helps search engines identify the primary URL for a product regardless of how it's accessed through different categories.
Public Methods
- resolve()