File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
app/code/Magento/ConfigurableProductGraphQl/Model Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 8
8
namespace Magento \ConfigurableProductGraphQl \Model ;
9
9
10
10
use Magento \Framework \GraphQl \Query \Resolver \TypeResolverInterface ;
11
+ use Magento \ConfigurableProduct \Model \Product \Type \Configurable as Type ;
11
12
12
13
/**
13
14
* {@inheritdoc}
14
15
*/
15
16
class ConfigurableProductTypeResolver implements TypeResolverInterface
16
17
{
18
+ /**
19
+ * Configurable product type resolver code
20
+ */
21
+ const TYPE_RESOLVER = 'ConfigurableProduct ' ;
22
+
17
23
/**
18
24
* {@inheritdoc}
19
25
*/
20
26
public function resolveType (array $ data ) : string
21
27
{
22
- if (isset ($ data ['type_id ' ]) && $ data ['type_id ' ] == 'configurable ' ) {
23
- return 'ConfigurableProduct ' ;
28
+ if (isset ($ data ['type_id ' ]) && $ data ['type_id ' ] == Type::TYPE_CODE ) {
29
+ return self ::TYPE_RESOLVER ;
30
+
24
31
}
25
32
return '' ;
26
33
}
You can’t perform that action at this time.
0 commit comments