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.
'small_image' in 'ProductInterface' does not have enough info #88
Closed
Description
Preconditions
2.3-develop
branch
Steps to reproduce
- Using
/graphql
, POST a query that requests thesmall_image
for a product - The
string
returned for thesmall_image
field will be in the format/m/b/mb02-gray-0.jpg
. - The format returned does not have enough information for a client-rendered Magento application to append the uri to an
img
tag. The returned format ishttps://mmnl.test/media/catalog/product/cache/2765542505660baab28ecd555e27366e/m/b/mb02-gray-0.jpg
Expected result
small_image
(and other image values in theProductInterface
) should return a URL that can be used as-is to fetch the associated image
Actual result
small_image
is populated with a value that can not be used without obtaining other info about cache configuration.
AC:
- Rename
small_image
tosmall_image_url
and return URL in the following formathttps://mmnl.test/media/catalog/product/cache/2765542505660baab28ecd555e27366e/m/b/mb02-gray-0.jpg
- [Optional] Fix existing GraphQL tests. See \Magento\GraphQl\Catalog\ProductViewTest::testQueryAllFieldsSimpleProduct as an example.