Skip to content

Commit d860874

Browse files
committed
Merge branch '88-small-image-url' of github.com:magento/graphql-ce into 88-small-image-url
2 parents ca8c7fc + a6d7d45 commit d860874

File tree

1 file changed

+3
-2
lines changed
  • app/code/Magento/CatalogGraphQl/Model/Resolver/Product

1 file changed

+3
-2
lines changed

app/code/Magento/CatalogGraphQl/Model/Resolver/Product/Image.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Magento\Catalog\Helper\ImageFactory as CatalogImageHelperFactory;
1111
use Magento\Catalog\Model\Product;
1212
use Magento\Framework\GraphQl\Config\Element\Field;
13+
use Magento\Framework\GraphQl\Exception\GraphQlInputException;
1314
use Magento\Framework\GraphQl\Query\ResolverInterface;
1415
use Magento\Framework\GraphQl\Schema\Type\ResolveInfo;
1516

@@ -33,7 +34,7 @@ public function __construct(
3334
}
3435

3536
/**
36-
* {@inheritdoc}
37+
* @inheritdoc
3738
*/
3839
public function resolve(
3940
Field $field,
@@ -43,7 +44,7 @@ public function resolve(
4344
array $args = null
4445
): array {
4546
if (!isset($value['model'])) {
46-
throw new \LogicException(__("Cannot resolve entity model"));
47+
throw new GraphQlInputException(__('"model" value should be specified'));
4748
}
4849
/** @var Product $product */
4950
$product = $value['model'];

0 commit comments

Comments
 (0)