Skip to content

Commit

Permalink
Prevent product attribute dynamic generation for schema injection
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilja Lapkovskis committed Jul 2, 2019
1 parent a995059 commit 04123b9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@
</arguments>
</virtualType>

<!-- Prevent Magento to dynamically build product and category attributes -->
<virtualType name="ScandiPWA\CatalogGraphQl\GraphQlSchemaStitching\Reader" type="Magento\Framework\GraphQlSchemaStitching\Common\Reader">
<arguments>
<argument name="readers" xsi:type="array">
<item name="graphql_reader" xsi:type="object">Magento\Framework\GraphQlSchemaStitching\GraphQlReader</item>
<item name="categoryDynamicAttributeReader" xsi:type="object">Magento\CatalogGraphQl\Model\Config\CategoryAttributeReader</item>
</argument>
</arguments>
</virtualType>
<preference for="Magento\Framework\GraphQlSchemaStitching\Reader"
type="ScandiPWA\CatalogGraphQl\GraphQlSchemaStitching\Reader"/>
<!-- Prevent Magento to dynamically build product and category attributes -->

<type name="Magento\CatalogGraphQl\Model\Resolver\Products\Query\Search">
<arguments>
<argument name="pageSize" xsi:type="object">ScandiPWA\CatalogGraphQl\Model\Search\PageSizeProvider</argument>
Expand Down

0 comments on commit 04123b9

Please sign in to comment.