This repository was archived by the owner on Dec 19, 2019. It is now read-only.
This repository was archived by the owner on Dec 19, 2019. It is now read-only.
Return full canonical product URL within product object #2
Closed
Description
As a Magento developer, I want GraphQL product data to include the canonical product URL so that it's easy for me to render links to any product.
Canonical URL resolution is already implemented in \Magento\UrlRewriteGraphQl\Model\Resolver\UrlRewrite::resolve, which can be used a reference.
See how to expose a new query via GraphQL in Magento
Acceptance criteria:
canonical_url
field is added toProductInterface
GraphQL interface. See Magento/CatalogGraphQl/etc/schema.graphqls- Changes are covered with web API functional tests. See \Magento\GraphQl\Catalog\ProductViewTest::testQueryAllFieldsSimpleProduct as an example.