Skip to content

Commit

Permalink
Merge pull request #2 from storefront-x/feature/PX-1428
Browse files Browse the repository at this point in the history
PX-1428 Gorans update
  • Loading branch information
bogdanwalek authored Dec 20, 2022
2 parents 3728f46 + c737f9b commit 996aeac
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 1 deletion.
3 changes: 2 additions & 1 deletion composer.json
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"php": ">=7.4",
"magento/framework": "^103.0.2",
"magento/module-graph-ql": "^100.4.2",
"magento/module-configurable-product-graph-ql": "^100.4.2"
"magento/module-configurable-product-graph-ql": "^100.4.2",
"magento/module-catalog-graph-ql": "100.4.*"
},
"license": [
"MIT"
Expand Down
1 change: 1 addition & 0 deletions etc/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<module name="Magento_GraphQl"/>
<module name="Magento_Backend"/>
<module name="Magento_ConfigurableProductGraphQl"/>
<module name="Magento_CatalogGraphQl"/>
</sequence>
</config>

4 changes: 4 additions & 0 deletions etc/schema.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ type ChildSku {
cart_item_id : Int @doc(description: "Id in cart")
sku : String @doc(description: "Product SKU")
}

input ProductAttributeFilterInput {
id: FilterEqualTypeInput @doc(description: "Filter product by the unique ID.")
}
34 changes: 34 additions & 0 deletions etc/search_request.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0"?>
<requests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Search/etc/search_request.xsd">
<!-- Request schema for product search excluding aggregation -->
<request query="graphql_product_search" index="catalogsearch_fulltext">
<queries>
<query xsi:type="boolQuery" name="graphql_product_search" boost="1">
<queryReference clause="must" ref="entity_id"/>
</query>
<query name="entity_id" xsi:type="filteredQuery">
<filterReference clause="must" ref="entity_id"/>
</query>
</queries>
<filters>
<filter xsi:type="termFilter" name="entity_id" field="_id" value="$id$"/>
</filters>
</request>
<!-- Request schema for product search including aggregation -->
<request query="graphql_product_search_with_aggregation" index="catalogsearch_fulltext">
<queries>
<query xsi:type="boolQuery" name="graphql_product_search_with_aggregation" boost="1">
<queryReference clause="must" ref="entity_id"/>
</query>
<query xsi:type="filteredQuery" name="entity_id">
<filterReference clause="must" ref="entity_id"/>
</query>
</queries>
<filters>
<filter xsi:type="termFilter" name="entity_id" field="_id" value="$id$"/>
</filters>
<aggregations>
</aggregations>
</request>
</requests>

0 comments on commit 996aeac

Please sign in to comment.