From 28a07115cbafbb892e3386187a32050653d33821 Mon Sep 17 00:00:00 2001 From: Alex Taranovsky Date: Fri, 19 Jun 2020 16:50:44 +0300 Subject: [PATCH 1/2] magento/devdocs#7364: Update the storeConfig query to include the new attributes https://devdocs.magento.com/guides/v2.4/graphql/queries/store-config.html --- .../v2.4/graphql/queries/store-config.md | 54 ++++++++++++++----- 1 file changed, 42 insertions(+), 12 deletions(-) diff --git a/src/guides/v2.4/graphql/queries/store-config.md b/src/guides/v2.4/graphql/queries/store-config.md index 5d0b4009209..c8ddb80b4e6 100644 --- a/src/guides/v2.4/graphql/queries/store-config.md +++ b/src/guides/v2.4/graphql/queries/store-config.md @@ -13,7 +13,7 @@ The `storeConfig` query defines information about a store's configuration. You c ### Query a store's configuration -The following call returns all details of a store's configuration. +There are `base` and `extended` store configuration settings which `storeConfig` query may return. The following call returns all `base` details of a store's configuration. **Request:** @@ -36,11 +36,6 @@ The following call returns all details of a store's configuration. secure_base_link_url secure_base_static_url secure_base_media_url - store_name - send_friend { - enabled_for_customers - enabled_for_guests - } } } ``` @@ -66,12 +61,7 @@ The following call returns all details of a store's configuration. "secure_base_url": "http://magento2.vagrant193/", "secure_base_link_url": "http://magento2.vagrant193/", "secure_base_static_url": "http://magento2.vagrant193/pub/static/version1536249714/", - "secure_base_media_url": "http://magento2.vagrant193/pub/media/", - "store_name": "My Store", - "send_friend": { - "enabled_for_customers": true, - "enabled_for_guests": false - } + "secure_base_media_url": "http://magento2.vagrant193/pub/media/" } } } @@ -185,6 +175,36 @@ The following query returns information about the store's catalog configuration. } ``` +### Query a store's customer configuration + +The following query returns information about the store's customer configuration. + +**Request:** + +```graphql +{ + storeConfig { + autocomplete_on_storefront + minimum_password_length + required_character_classes_number + } +} +``` + +**Response:** + +```json +{ + "data": { + "storeConfig": { + "autocomplete_on_storefront": true, + "minimum_password_length": "6", + "required_character_classes_number": "2" + } + } +} +``` + ### Query a store's fixed product tax configuration The following query returns enumeration values that indicate the store's fixed product tax configuration. @@ -301,6 +321,16 @@ Attribute | Data Type | Description | Example `root_category_id` | Int | The ID of the root category `title_separator` | String | Identifies the character that separates the category name and subcategory in the browser title bar | `-` +### Supported catalog attributes + +Use the `customer` attributes to retrieve information about the store's customer settings. These attributes are defined in the `CustomerGraphQl` module. + +Attribute | Data Type | Description | Configuration path | Default Value +--- | --- | --- +`autocomplete_on_storefront` | Boolean | Enable autocomplete on login and forgot password forms. | customer/password/autocomplete_on_storefront | true +`minimum_password_length` | String | The minimum number of characters required for a valid password. | customer/password/minimum_password_length | 6 +`required_character_classes_number` | String | The number of different character classes required in a password (lowercase, uppercase, digits, special characters). | customer/password/required_character_classes_number | 2 + ### Supported WEEE (fixed product tax) attributes The **Stores** > Settings > **Configuration** > **Sales** > **Tax** > **Fixed Product Taxes** panel contains several fields that determine how to display fixed product tax (FPT) values and descriptions. Use the following attributes to determine the values of the **Fixed Product Taxes** fields. These attributes are defined in the `WeeeGraphQl` module. From dfdb75bd1f360055c9a6ba4117c47adee62bb028 Mon Sep 17 00:00:00 2001 From: Kevin Harper Date: Mon, 22 Jun 2020 21:02:20 -0500 Subject: [PATCH 2/2] Grammar updates/change host names --- .../v2.4/graphql/queries/store-config.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/guides/v2.4/graphql/queries/store-config.md b/src/guides/v2.4/graphql/queries/store-config.md index c8ddb80b4e6..d45dc4d7f14 100644 --- a/src/guides/v2.4/graphql/queries/store-config.md +++ b/src/guides/v2.4/graphql/queries/store-config.md @@ -13,7 +13,7 @@ The `storeConfig` query defines information about a store's configuration. You c ### Query a store's configuration -There are `base` and `extended` store configuration settings which `storeConfig` query may return. The following call returns all `base` details of a store's configuration. +The `storeConfig` query can return `base` and `extended` store configuration setting. The following call returns all `base` details of a store's configuration. **Request:** @@ -54,14 +54,14 @@ There are `base` and `extended` store configuration settings which `storeConfig` "default_display_currency_code": "USD", "timezone": "America/Chicago", "weight_unit": "lbs", - "base_url": "http://magento2.vagrant193/", - "base_link_url": "http://magento2.vagrant193/", - "base_static_url": "http://magento2.vagrant193/pub/static/version1536249714/", - "base_media_url": "http://magento2.vagrant193/pub/media/", - "secure_base_url": "http://magento2.vagrant193/", - "secure_base_link_url": "http://magento2.vagrant193/", - "secure_base_static_url": "http://magento2.vagrant193/pub/static/version1536249714/", - "secure_base_media_url": "http://magento2.vagrant193/pub/media/" + "base_url": "http://magentohost.example.com/", + "base_link_url": "http://magentohost.example.com/", + "base_static_url": "http://magentohost.example.com/pub/static/version1536249714/", + "base_media_url": "http://magentohost.example.com/pub/media/", + "secure_base_url": "http://magentohost.example.com/", + "secure_base_link_url": "http://magentohost.example.com/", + "secure_base_static_url": "http://magentohost.example.com/pub/static/version1536249714/", + "secure_base_media_url": "http://magentohost.example.com/pub/media/" } } }