Skip to content

Commit

Permalink
Merge branch '88-small-image-url' of github.com:magento/graphql-ce in…
Browse files Browse the repository at this point in the history
…to 88-small-image-url
  • Loading branch information
rogyar committed Sep 17, 2018
2 parents ca8c7fc + a6d7d45 commit d860874
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Magento\Catalog\Helper\ImageFactory as CatalogImageHelperFactory;
use Magento\Catalog\Model\Product;
use Magento\Framework\GraphQl\Config\Element\Field;
use Magento\Framework\GraphQl\Exception\GraphQlInputException;
use Magento\Framework\GraphQl\Query\ResolverInterface;
use Magento\Framework\GraphQl\Schema\Type\ResolveInfo;

Expand All @@ -33,7 +34,7 @@ public function __construct(
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function resolve(
Field $field,
Expand All @@ -43,7 +44,7 @@ public function resolve(
array $args = null
): array {
if (!isset($value['model'])) {
throw new \LogicException(__("Cannot resolve entity model"));
throw new GraphQlInputException(__('"model" value should be specified'));
}
/** @var Product $product */
$product = $value['model'];
Expand Down

0 comments on commit d860874

Please sign in to comment.