Skip to content

Commit 5991e29

Browse files
committed
MAGETWO-87264: Finalizing - refactoring code for Pr
1 parent 1397b4f commit 5991e29

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

app/code/Magento/BundleGraphQl/Model/BundleProductTypeResolver.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,19 @@
66

77
namespace Magento\BundleGraphQl\Model;
88

9+
use Magento\Framework\GraphQl\Config\Data\TypeResolverInterface;
10+
911
/**
1012
* {@inheritdoc}
1113
*/
12-
class BundleProductTypeResolver
14+
class BundleProductTypeResolver implements TypeResolverInterface
1315
{
1416
/**
1517
* {@inheritdoc}
1618
*/
17-
public function resolveType($typeId)
19+
public function resolveType(array $data)
1820
{
19-
if ($typeId == 'bundle') {
21+
if (isset($data['type_id']) && $data['type_id'] == 'bundle') {
2022
return 'BundleProduct';
2123
}
2224
}

0 commit comments

Comments
 (0)