Skip to content

Commit d6dad52

Browse files
author
Dominic
committed
reove hardcoded value
1 parent 908a6bb commit d6dad52

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/code/Magento/ConfigurableProductGraphQl/Model/ConfigurableProductTypeResolver.php

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

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

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

0 commit comments

Comments
 (0)