Skip to content

Commit d9eb81e

Browse files
author
Govind Sharma
authored
Update DownloadableProductTypeResolver.php
1 parent 9c36f6f commit d9eb81e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/code/Magento/DownloadableGraphQl/Model/DownloadableProductTypeResolver.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
namespace Magento\DownloadableGraphQl\Model;
99

1010
use Magento\Framework\GraphQl\Query\Resolver\TypeResolverInterface;
11+
use Magento\Downloadable\Model\Product\Type as Type;
1112

1213
/**
1314
* {@inheritdoc}
@@ -19,7 +20,7 @@ class DownloadableProductTypeResolver implements TypeResolverInterface
1920
*/
2021
public function resolveType(array $data) : string
2122
{
22-
if (isset($data['type_id']) && $data['type_id'] == 'downloadable') {
23+
if (isset($data['type_id']) && $data['type_id'] == Type::TYPE_DOWNLOADABLE) {
2324
return 'DownloadableProduct';
2425
}
2526
return '';

0 commit comments

Comments
 (0)