Skip to content

Commit 1c0c1fc

Browse files
author
Eric Bohanon
committed
MAGETWO-83872: Write metadata service
1 parent e6c4364 commit 1c0c1fc

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductAttributeTypeTest.php

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ public function testAttributeTypeResolver()
4040
attribute_code:"disable_auto_group_change",
4141
entity_type:"customer"
4242
}
43+
{
44+
attribute_code:"special_price",
45+
entity_type:"Magento\\\\Catalog\\\\Api\\\\Data\\\\ProductInterface"
46+
}
4347
]
4448
)
4549
{
@@ -53,9 +57,21 @@ public function testAttributeTypeResolver()
5357
}
5458
QUERY;
5559
$response = $this->graphQlQuery($query);
56-
$expectedAttributeCodes = ['description', 'status', 'special_price', 'disable_auto_group_change'];
57-
$entityType = ['catalog_product', 'catalog_product', 'catalog_product', 'customer'];
58-
$attributeTypes = ['String', 'Int', 'Double','Boolean'];
60+
$expectedAttributeCodes = [
61+
'description',
62+
'status',
63+
'special_price',
64+
'disable_auto_group_change',
65+
'special_price'
66+
];
67+
$entityType = [
68+
'catalog_product',
69+
'catalog_product',
70+
'catalog_product',
71+
'customer',
72+
\Magento\Catalog\Api\Data\ProductInterface::class
73+
];
74+
$attributeTypes = ['String', 'Int', 'Double','Boolean', 'Double'];
5975
$this->assertAttributeType($attributeTypes, $expectedAttributeCodes, $entityType, $response);
6076
}
6177

lib/internal/Magento/Framework/GraphQl/Type/Definition/IntType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/**
1010
* Wrapper for GraphQl IntType
1111
*/
12-
class IntType extends \GraphQL\Type\Definition\IntType implements ScalarTypeInterface
12+
class IntType extends \GraphQL\Type\Definition\IntType implements TypeInterface
1313
{
1414

1515
}

0 commit comments

Comments
 (0)