Skip to content

Commit e9f6eed

Browse files
author
Prabhu Ram
committed
MC-36977: [GraphQL] Add storeConfig attributes for product reviews
- Added store config
1 parent 3ada625 commit e9f6eed

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
9+
<type name="Magento\StoreGraphQl\Model\Resolver\Store\StoreConfigDataProvider">
10+
<arguments>
11+
<argument name="extendedConfigData" xsi:type="array">
12+
<item name="product_reviews_enabled" xsi:type="string">catalog/review/active</item>
13+
<item name="allow_guests_to_write_product_reviews" xsi:type="string">catalog/review/allow_guest</item>
14+
</argument>
15+
</arguments>
16+
</type>
17+
</config>

app/code/Magento/ReviewGraphQl/etc/schema.graphqls

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,8 @@ input ProductReviewRatingInput {
7676
id: String! @doc(description: "Base64 encoded rating ID.")
7777
value_id: String! @doc(description: "Base 64 encoded rating value id.")
7878
}
79+
80+
type StoreConfig @doc(description: "The type contains information about a store config") {
81+
product_reviews_enabled : String @doc(description: "Indicates whether product reviews are enabled. Possible values: 1 (Yes) and 0 (No)")
82+
allow_guests_to_write_product_reviews : String @doc(description: "Indicates whether guest users can write product reviews. Possible values: 1 (Yes) and 0 (No)")
83+
}

0 commit comments

Comments
 (0)