-
Notifications
You must be signed in to change notification settings - Fork 55
/
di.xml
executable file
·121 lines (95 loc) · 6.37 KB
/
di.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<?xml version="1.0"?>
<!--
/**
* ScandiPWA - Progressive Web App for Magento
*
* Copyright © Scandiweb, Inc. All rights reserved.
* See LICENSE for license details.
*
* @license OSL-3.0 (Open Software License ("OSL") v. 3.0)
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="Magento\CatalogGraphQl\Model\Resolver\Products\DataProvider\Product\CollectionProcessor\AttributeProcessor"
type="ScandiPWA\CatalogGraphQl\Model\Resolver\Products\DataProvider\Product\CollectionProcessor\AttributeProcessor" />
<preference for="Magento\CatalogGraphQl\Model\Resolver\Product\MediaGallery\Url"
type="ScandiPWA\CatalogGraphQl\Model\Resolver\Product\MediaGallery\Url" />
<preference for="Magento\CatalogGraphQl\Model\Resolver\Product\MediaGalleryEntries"
type="ScandiPWA\CatalogGraphQl\Model\Resolver\Product\MediaGalleryEntries"/>
<preference for="Magento\CatalogGraphQl\DataProvider\Product\SearchCriteriaBuilder"
type="ScandiPWA\CatalogGraphQl\DataProvider\Product\SearchCriteriaBuilder"/>
<!-- <preference for="Magento\CatalogGraphQl\Model\Resolver\Category\Products"-->
<!-- type="ScandiPWA\CatalogGraphQl\Model\Resolver\Category\Products"/>-->
<preference for="Magento\CatalogGraphQl\Model\Resolver\Products\DataProvider\Product"
type="ScandiPWA\CatalogGraphQl\Model\Resolver\Products\DataProvider\Product"/>
<preference for="Magento\CatalogWidget\Model\Rule\Condition\Product"
type="ScandiPWA\CatalogGraphQl\Model\Rule\Condition\Product" />
<preference for="Magento\CatalogGraphQl\Model\Resolver\Products\DataProvider\ProductSearch\ProductCollectionSearchCriteriaBuilder"
type="ScandiPWA\CatalogGraphQl\Model\Resolver\Products\DataProvider\ProductSearch\ProductCollectionSearchCriteriaBuilder" />
<!-- Performance related changes -->
<preference for="Magento\ConfigurableProductGraphQl\Model\Resolver\ConfigurableVariant"
type="ScandiPWA\CatalogGraphQl\Model\Resolver\ConfigurableVariant" />
<type name="ScandiPWA\CatalogGraphQl\Model\Resolver\ConfigurableVariant">
<arguments>
<argument name="variantCollection" xsi:type="object">ScandiPWA\CatalogGraphQl\Model\Variant\Collection</argument>
</arguments>
</type>
<preference for="Magento\BundleGraphQl\Model\Resolver\BundleItemLinks"
type="ScandiPWA\CatalogGraphQl\Model\Resolver\BundleItemLinks" />
<type name="ScandiPWA\CatalogGraphQl\Model\Resolver\BundleItemLinks">
<arguments>
<argument name="linkCollection" xsi:type="object">ScandiPWA\CatalogGraphQl\Model\Resolver\Links\Collection</argument>
</arguments>
</type>
<type name="Magento\Framework\GraphQl\Query\Resolver\ArgumentsCompositeProcessor">
<arguments>
<argument name="processors" xsi:type="array">
<item name="category_uid" xsi:type="object">ScandiPWA\CatalogGraphQl\Model\Resolver\Products\Query\CategoryUidArgsProcessor</item>
</argument>
</arguments>
</type>
<type name="Magento\CatalogGraphQl\Model\Resolver\Products\DataProvider\Product\CompositeCollectionProcessor">
<arguments>
<argument name="collectionProcessors" xsi:type="array">
<item name="images" xsi:type="object">ScandiPWA\CatalogGraphQl\Model\Resolver\Products\DataProvider\Product\CollectionProcessor\ImagesProcessor</item>
<item name="price" xsi:type="object">ScandiPWA\CatalogGraphQl\Model\Resolver\Products\DataProvider\Product\CollectionProcessor\PriceProcessor</item>
</argument>
</arguments>
</type>
<preference for="Magento\CatalogGraphQl\Model\Resolver\Product"
type="ScandiPWA\CatalogGraphQl\Model\Resolver\Product" />
<preference for="Magento\GroupedProductGraphQl\Model\Resolver\GroupedItems"
type="ScandiPWA\CatalogGraphQl\Model\Resolver\GroupedItems" />
<preference for="Magento\Elasticsearch\SearchAdapter\Query\Builder\MatchQuery"
type="ScandiPWA\CatalogGraphQl\SearchAdapter\Query\Builder\MatchQuery"/>
<type name="Magento\Framework\GraphQl\Query\QueryComplexityLimiter">
<arguments>
<argument name="queryDepth" xsi:type="number">20</argument>
<argument name="queryComplexity" xsi:type="number">750</argument>
</arguments>
</type>
<!-- Item (Magento\Catalog\Model\Product\Interceptor) with the same ID “XXX” already exists patch -->
<type name="Magento\Eav\Model\Entity\Collection\AbstractCollection">
<plugin name="find_duplicate_entry" type="ScandiPWA\CatalogGraphQl\Plugin\Collection" sortOrder="20"/>
</type>
<preference for="Magento\CatalogGraphQl\DataProvider\Product\LayeredNavigation\Builder\Price"
type="ScandiPWA\CatalogGraphQl\Model\Layer\Filter\Price" />
<preference for="Magento\CatalogGraphQl\DataProvider\Product\LayeredNavigation\Builder\Category"
type="ScandiPWA\CatalogGraphQl\Model\Layer\Filter\Category" />
<preference for="Magento\CatalogGraphQl\Model\Resolver\Category\SortFields"
type="ScandiPWA\CatalogGraphQl\Model\Resolver\Category\SortFields" />
<preference for="Magento\CatalogGraphQl\Model\Resolver\Product\Options"
type="ScandiPWA\CatalogGraphQl\Model\Resolver\Product\Options" />
<preference for="Magento\CatalogUrlRewrite\Model\ResourceModel\Category\Product"
type="ScandiPWA\CatalogGraphQl\Model\ResourceModel\Category\Product" />
<preference for="Magento\Framework\Search\Dynamic\Algorithm\Improved"
type="ScandiPWA\CatalogGraphQl\Search\Dynamic\Algorithm\Improved"/>
<preference for="Magento\DownloadableGraphQl\Resolver\Product\Links"
type="ScandiPWA\CatalogGraphQl\Model\Resolver\Product\Links" />
<type name="Magento\Elasticsearch\SearchAdapter\Aggregation\Builder">
<plugin name="aggregation_equalize_products_count_handler"
type="ScandiPWA\CatalogGraphQl\Plugin\SearchAdapter\Aggregation\BuilderPlugin" />
</type>
<preference for="Magento\Elasticsearch\Elasticsearch5\SearchAdapter\Aggregation\Interval"
type="ScandiPWA\CatalogGraphQl\Elasticsearch5\SearchAdapter\Aggregation\Interval" />
</config>