File tree Expand file tree Collapse file tree 11 files changed +86
-18
lines changed
DownloadableGraphQl/Model/Resolver/Product
EavGraphQl/Model/Resolver Expand file tree Collapse file tree 11 files changed +86
-18
lines changed Original file line number Diff line number Diff line change 11
11
use Magento \Framework \GraphQl \Query \Resolver \TypeResolverInterface ;
12
12
13
13
/**
14
- * { @inheritdoc}
14
+ * @inheritdoc
15
15
*/
16
16
class ProductLinkTypeResolverComposite implements TypeResolverInterface
17
17
{
Original file line number Diff line number Diff line change 16
16
use Magento \Framework \GraphQl \Query \ResolverInterface ;
17
17
18
18
/**
19
- * Fixed the id related data in the product data
20
- *
21
19
* {@inheritdoc}
20
+ *
21
+ * Fixed the id related data in the product data
22
22
*/
23
23
class EntityIdToId implements ResolverInterface
24
24
{
Original file line number Diff line number Diff line change 8
8
namespace Magento \CatalogGraphQl \Model \Resolver \Product ;
9
9
10
10
use Magento \Framework \Exception \LocalizedException ;
11
+ use Magento \Framework \GraphQl \Query \Resolver \ContextInterface ;
11
12
use Magento \Framework \GraphQl \Schema \Type \ResolveInfo ;
12
13
use Magento \Catalog \Model \Product ;
13
14
use Magento \Framework \GraphQl \Config \Element \Field ;
19
20
class MediaGalleryEntries implements ResolverInterface
20
21
{
21
22
/**
23
+ * {@inheritdoc}
24
+ *
22
25
* Format product's media gallery entry data to conform to GraphQL schema
23
26
*
24
- * {@inheritdoc}
27
+ * @param \Magento\Framework\GraphQl\Config\Element\Field $field
28
+ * @param ContextInterface $context
29
+ * @param ResolveInfo $info
30
+ * @param array|null $value
31
+ * @param array|null $args
32
+ * @throws \Exception
33
+ * @return array
25
34
*/
26
35
public function resolve (
27
36
Field $ field ,
Original file line number Diff line number Diff line change 19
19
class NewFromTo implements ResolverInterface
20
20
{
21
21
/**
22
+ * {@inheritdoc}
23
+ *
22
24
* Transfer data from legacy news_from_date and news_to_date to new names corespondent fields
23
25
*
24
- * {@inheritdoc}
26
+ * @param \Magento\Framework\GraphQl\Config\Element\Field $field
27
+ * @param \Magento\Framework\GraphQl\Query\Resolver\ContextInterface $context
28
+ * @param ResolveInfo $info
29
+ * @param array|null $value
30
+ * @param array|null $args
31
+ * @throws \Exception
32
+ * @return null|array
25
33
*/
26
34
public function resolve (
27
35
Field $ field ,
Original file line number Diff line number Diff line change 8
8
namespace Magento \CatalogGraphQl \Model \Resolver \Product ;
9
9
10
10
use Magento \Framework \Exception \LocalizedException ;
11
+ use Magento \Framework \GraphQl \Query \Resolver \ContextInterface ;
11
12
use Magento \Framework \GraphQl \Schema \Type \ResolveInfo ;
12
13
use Magento \Catalog \Model \Product ;
13
14
use Magento \Catalog \Model \Product \Option ;
20
21
class Options implements ResolverInterface
21
22
{
22
23
/**
24
+ * {@inheritdoc}
25
+ *
23
26
* Format product's option data to conform to GraphQL schema
24
27
*
25
- * {@inheritdoc}
28
+ * @param \Magento\Framework\GraphQl\Config\Element\Field $field
29
+ * @param ContextInterface $context
30
+ * @param ResolveInfo $info
31
+ * @param array|null $value
32
+ * @param array|null $args
33
+ * @throws \Exception
34
+ * @return null|array
26
35
*/
27
36
public function resolve (
28
37
Field $ field ,
Original file line number Diff line number Diff line change 8
8
namespace Magento \CatalogGraphQl \Model \Resolver \Product ;
9
9
10
10
use Magento \Framework \Exception \LocalizedException ;
11
+ use Magento \Framework \GraphQl \Query \Resolver \ContextInterface ;
11
12
use Magento \Framework \GraphQl \Schema \Type \ResolveInfo ;
12
13
use Magento \Catalog \Model \Product ;
13
14
use Magento \Catalog \Pricing \Price \FinalPrice ;
@@ -47,9 +48,17 @@ public function __construct(
47
48
}
48
49
49
50
/**
51
+ * {@inheritdoc}
52
+ *
50
53
* Format product's tier price data to conform to GraphQL schema
51
54
*
52
- * {@inheritdoc}
55
+ * @param \Magento\Framework\GraphQl\Config\Element\Field $field
56
+ * @param ContextInterface $context
57
+ * @param ResolveInfo $info
58
+ * @param array|null $value
59
+ * @param array|null $args
60
+ * @throws \Exception
61
+ * @return array
53
62
*/
54
63
public function resolve (
55
64
Field $ field ,
Original file line number Diff line number Diff line change 8
8
namespace Magento \CatalogGraphQl \Model \Resolver \Product ;
9
9
10
10
use Magento \Framework \Exception \LocalizedException ;
11
+ use Magento \Framework \GraphQl \Query \Resolver \ContextInterface ;
11
12
use Magento \Framework \GraphQl \Schema \Type \ResolveInfo ;
12
13
use Magento \Catalog \Model \Product ;
13
14
use Magento \Catalog \Model \ProductLink \Link ;
14
15
use Magento \Framework \GraphQl \Config \Element \Field ;
15
16
use Magento \Framework \GraphQl \Query \ResolverInterface ;
16
17
17
18
/**
18
- * Format the product links information to conform to GraphQL schema representation
19
- *
20
19
* {@inheritdoc}
20
+ *
21
+ * Format the product links information to conform to GraphQL schema representation
21
22
*/
22
23
class ProductLinks implements ResolverInterface
23
24
{
@@ -27,9 +28,17 @@ class ProductLinks implements ResolverInterface
27
28
private $ linkTypes = ['related ' , 'upsell ' , 'crosssell ' ];
28
29
29
30
/**
31
+ * {@inheritdoc}
32
+ *
30
33
* Format product links data to conform to GraphQL schema
31
34
*
32
- * {@inheritdoc}
35
+ * @param \Magento\Framework\GraphQl\Config\Element\Field $field
36
+ * @param ContextInterface $context
37
+ * @param ResolveInfo $info
38
+ * @param array|null $value
39
+ * @param array|null $args
40
+ * @throws \Exception
41
+ * @return null|array
33
42
*/
34
43
public function resolve (
35
44
Field $ field ,
Original file line number Diff line number Diff line change 8
8
namespace Magento \CatalogGraphQl \Model \Resolver \Product ;
9
9
10
10
use Magento \Framework \Exception \LocalizedException ;
11
+ use Magento \Framework \GraphQl \Query \Resolver \ContextInterface ;
11
12
use Magento \Framework \GraphQl \Schema \Type \ResolveInfo ;
12
13
use Magento \Catalog \Model \Product ;
13
14
use Magento \Catalog \Model \Product \TierPrice ;
14
15
use Magento \Framework \GraphQl \Config \Element \Field ;
15
16
use Magento \Framework \GraphQl \Query \ResolverInterface ;
16
17
17
18
/**
18
- * Format a product's tier price information to conform to GraphQL schema representation
19
- *
20
19
* {@inheritdoc}
20
+ *
21
+ * Format a product's tier price information to conform to GraphQL schema representation
21
22
*/
22
23
class TierPrices implements ResolverInterface
23
24
{
24
25
/**
26
+ * {@inheritdoc}
27
+ *
25
28
* Format product's tier price data to conform to GraphQL schema
26
29
*
27
- * {@inheritdoc}
30
+ * @param \Magento\Framework\GraphQl\Config\Element\Field $field
31
+ * @param ContextInterface $context
32
+ * @param ResolveInfo $info
33
+ * @param array|null $value
34
+ * @param array|null $args
35
+ * @throws \Exception
36
+ * @return null|array
28
37
*/
29
38
public function resolve (
30
39
Field $ field ,
Original file line number Diff line number Diff line change 8
8
namespace Magento \DownloadableGraphQl \Model \Resolver \Product ;
9
9
10
10
use Magento \Framework \Exception \LocalizedException ;
11
+ use Magento \Framework \GraphQl \Query \Resolver \ContextInterface ;
11
12
use Magento \Framework \GraphQl \Schema \Type \ResolveInfo ;
12
13
use Magento \Catalog \Model \Product ;
13
14
use Magento \Downloadable \Helper \Data as DownloadableHelper ;
20
21
use Magento \Framework \GraphQl \Query \ResolverInterface ;
21
22
22
23
/**
23
- * Format for downloadable product types
24
- *
25
24
* {@inheritdoc}
25
+ *
26
+ * Format for downloadable product types
26
27
*/
27
28
class DownloadableOptions implements ResolverInterface
28
29
{
@@ -65,9 +66,17 @@ public function __construct(
65
66
}
66
67
67
68
/**
69
+ * {@inheritdoc}
70
+ *
68
71
* Add downloadable options to configurable types
69
72
*
70
- * {@inheritdoc}
73
+ * @param \Magento\Framework\GraphQl\Config\Element\Field $field
74
+ * @param ContextInterface $context
75
+ * @param ResolveInfo $info
76
+ * @param array|null $value
77
+ * @param array|null $args
78
+ * @throws \Exception
79
+ * @return null|array
71
80
*/
72
81
public function resolve (
73
82
Field $ field ,
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ public function __construct(
47
47
}
48
48
49
49
/**
50
- * @inheritDoc
50
+ * @inheritdoc
51
51
*/
52
52
public function resolve (
53
53
Field $ field ,
@@ -67,6 +67,8 @@ public function resolve(
67
67
}
68
68
69
69
/**
70
+ * Get entity type
71
+ *
70
72
* @param array $value
71
73
* @return int
72
74
* @throws LocalizedException
@@ -81,6 +83,8 @@ private function getEntityType(array $value): int
81
83
}
82
84
83
85
/**
86
+ * Get attribute code
87
+ *
84
88
* @param array $value
85
89
* @return string
86
90
* @throws LocalizedException
@@ -95,6 +99,8 @@ private function getAttributeCode(array $value): string
95
99
}
96
100
97
101
/**
102
+ * Get attribute options data
103
+ *
98
104
* @param int $entityType
99
105
* @param string $attributeCode
100
106
* @return array
You can’t perform that action at this time.
0 commit comments