Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit 9b2b6d7

Browse files
authored
Merge pull request #2737 from magento-devdocs/db_pwa_gql
PWA-2188 Adding PWA GQL topic
2 parents dce1c7f + 181325a commit 9b2b6d7

File tree

4 files changed

+74
-0
lines changed

4 files changed

+74
-0
lines changed

src/_data/toc/graphql.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,11 @@ pages:
318318
edition: ee-only
319319
exclude_versions: ["2.3"]
320320

321+
- label: contactUs mutation
322+
url: /graphql/mutations/contact-us.html
323+
edition: pwa-only
324+
exclude_versions: ["2.3"]
325+
321326
- label: createBraintreeClientToken mutation
322327
url: /graphql/mutations/create-braintree-client-token.html
323328

src/_data/var.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ ce: Magento Open Source
1717
ee: Adobe Commerce
1818
b2b: B2B for Adobe Commerce
1919
mbi: Adobe Commerce Reporting
20+
pwa: PWA Studio
2021

2122
# Cloud product name variables
2223

src/_includes/graphql/store-config.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Attribute | Data Type | Description | Default or example value
2626
`cms_no_route` | String | Identifies a specific CMS page that you want to appear when a 404 “Page Not Found” error occurs | `no-route`
2727
`code` | String | Deprecated. Use `store_code` instead. A unique identifier for the store | `default`
2828
`configurable_thumbnail_source` | String | Determines which thumbnail should be used in the cart for configurable products. Possible values: `parent` or `itself` (child) | `parent`
29+
`contact_enabled` | Boolean! | Indicates whether the Contact Us form is enabled | true or false
2930
`copyright` | String | The copyright statement that appears at the bottom of each page | Copyright © 2013-present Magento, Inc. All rights reserved.
3031
`default_description` | String | The description that provides a summary of your site for search engine listings and should not be more than 160 characters in length | null
3132
`default_display_currency_code` | String | The code representing the currency displayed on the store | `USD`
@@ -67,6 +68,7 @@ Attribute | Data Type | Description | Default or example value
6768
`magento_wishlist_general_is_enabled` | String | Indicates whether wish lists are enabled (1) or disabled (0) | 1
6869
`maximum_number_of_wishlists` | String | If multiple wish lists are enabled, the maximum number of wish lists the customer can have | 5
6970
`minimum_password_length` | String | The minimum number of characters required for a valid password. <br/>Configuration path: customer/password/minimum_password_length | 6
71+
`newsletter_enabled` | Boolean! | Indicates whether newsletters are enabled | true or false
7072
`no_route` | String | Contains the URL of the default page that you want to appear when if a 404 “Page not Found” error occurs | `cms/noroute/index`
7173
`payment_payflowpro_cc_vault_active` | String | Payflow Pro vault status | `0` (inactive) or `1` (active)
7274
`printed_card_price` | String | The default price of a printed card that accompanies an order | 10
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
group: graphql
3+
title: contactUs mutation
4+
pwa_only: true
5+
---
6+
7+
The `contactUs` mutation submits the contents of the Contact Us form.
8+
9+
## Syntax
10+
11+
`mutation: contactUs(input: ContacUsInput!): ContactUsOutput`
12+
13+
## Example usage
14+
15+
The following example adds a Contact Us form to the site.
16+
17+
**Request:**
18+
19+
```graphql
20+
mutation {
21+
contactUs(
22+
input: {
23+
comment: "My comment",
24+
email: "bobloblaw@example.com",
25+
telephone: "(555)-CALL-BOB",
26+
name: "Bob Loblaw" }
27+
) {
28+
status
29+
}
30+
}
31+
```
32+
33+
**Response:**
34+
35+
```json
36+
{
37+
"data": {
38+
"contactUs": {
39+
"status": true
40+
}
41+
}
42+
}
43+
```
44+
45+
## Input attributes
46+
47+
The `contactUs` mutation requires the `contactUsInput` object.
48+
49+
### contactUsInput object {#contactUsInput}
50+
51+
The `contactUsInput` object must contain the following attributes:
52+
53+
Attribute | Data Type | Description
54+
--- | --- | ---
55+
`email` | String! | The email address of the shopper
56+
`name` | String! | The full name of the shopper
57+
`telephone` | String | The shopper's telephone number
58+
`comment` | String! | The shopper's comment to the merchant
59+
60+
## Output attributes
61+
62+
The `contactUsOutput` object returns a Boolean value indicting the success or failure of the request.
63+
64+
Attribute | Data Type | Description
65+
--- | --- | ---
66+
`status` | Boolean! | Indicates whether the request was successful

0 commit comments

Comments
 (0)