Skip to content

Commit

Permalink
Brought back the 'news_from_date' and 'news_to_date'.
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredsgenkins committed Nov 9, 2020
1 parent 84c5e81 commit 558966a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 98 deletions.

This file was deleted.

31 changes: 0 additions & 31 deletions src/etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,9 @@
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\CatalogGraphQl\Model\Resolver\Products\FilterArgument\ProductEntityAttributesForAst">
<plugin name="ScandiPWA::ProductEntityAttributesForAst" type="ScandiPWA\CatalogGraphQl\Plugin\Resolver\Products\FilterArgument\ProductEntityAttributesForAst" sortOrder="1" disabled="false"/>
</type>

<preference for="Magento\CatalogGraphQl\Model\Resolver\Products\DataProvider\Product\CollectionProcessor\AttributeProcessor"
type="ScandiPWA\CatalogGraphQl\Model\Resolver\Products\DataProvider\Product\CollectionProcessor\AttributeProcessor" />


<virtualType name="ScandiPWA\CatalogGraphQl\Model\Search\PageSizeProvider" type="Magento\Search\Model\Search\PageSizeProvider">
<arguments>
<argument name="pageSizeBySearchEngine" xsi:type="array">
<item name="elasticsearch" xsi:type="number">10000</item>
<item name="elasticsearch5" xsi:type="number">10000</item>
</argument>
</arguments>
</virtualType>

<type name="ScandiPWA\CatalogGraphQl\Plugin\Resolver\Products\FilterArgument\ProductEntityAttributesForAst">
<arguments>
<argument name="attributes" xsi:type="array">
<item name="news_to_date" xsi:type="string">news_to_date</item>
<item name="category_url_key" xsi:type="string">category_url_key</item>
<item name="category_url_path" xsi:type="string">category_url_path</item>
<item name="conditions" xsi:type="string">conditions</item>
</argument>
</arguments>
</type>

<preference for="Magento\CatalogGraphQl\Model\Resolver\Product\MediaGallery\Url"
type="ScandiPWA\CatalogGraphQl\Model\Resolver\Product\MediaGallery\Url" />

Expand All @@ -53,12 +28,6 @@
<preference for="Magento\CatalogWidget\Model\Rule\Condition\Product"
type="ScandiPWA\CatalogGraphQl\Model\Rule\Condition\Product" />

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

<!-- Performance related changes -->
<preference for="Magento\ConfigurableProductGraphQl\Model\Resolver\ConfigurableVariant"
type="ScandiPWA\CatalogGraphQl\Model\Resolver\ConfigurableVariant" />
Expand Down
2 changes: 2 additions & 0 deletions src/etc/schema.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ type MediaGalleryImageOfType @doc(description: "Products thumbnail image") {
input ProductAttributeFilterInput {
conditions: FilterTypeInput @doc(description: "Searches products by JSON formatted conditions")
customer_group_id: FilterTypeInput @doc(description: "Modifies product prices based on customer group")
news_from_date: FilterTypeInput @doc(description: "The beginning date for new product listings, and determines if the product is featured as a new product.")
news_to_date: FilterTypeInput @doc(description: "The end date for new product listings.")
}

type MediaGalleryEntry @doc(description: "MediaGalleryEntry defines characteristics about images and videos associated with a specific product") {
Expand Down

0 comments on commit 558966a

Please sign in to comment.