forked from scandipwa/catalog-graphql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
di.xml
executable file
·91 lines (72 loc) · 4.64 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
<?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\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" />
<!-- 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\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\Match"
type="ScandiPWA\CatalogGraphQl\SearchAdapter\Query\Builder\Match"/>
<type name="Magento\Framework\GraphQl\Query\QueryComplexityLimiter">
<arguments>
<argument name="queryDepth" xsi:type="number">20</argument>
<argument name="queryComplexity" xsi:type="number">1500</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" />
</config>