@graphcommerce/docs 7.1.0-canary.52 → 7.1.0-canary.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 7.1.0-canary.54
|
|
4
|
+
|
|
5
|
+
## 7.1.0-canary.53
|
|
6
|
+
|
|
7
|
+
### Patch Changes
|
|
8
|
+
|
|
9
|
+
- [#2119](https://github.com/graphcommerce-org/graphcommerce/pull/2119) [`6adb2e72e`](https://github.com/graphcommerce-org/graphcommerce/commit/6adb2e72ece8210757ced178779dfba11b1bcf55) - Clarify texts by adding formatting and correcting spelling. ([@carlocarels90](https://github.com/carlocarels90))
|
|
10
|
+
|
|
3
11
|
## 7.1.0-canary.52
|
|
4
12
|
|
|
5
13
|
## 7.1.0-canary.51
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Hygraph Dynamic Rows
|
|
2
|
+
|
|
3
|
+
As you might have learned, Dynamic Rows enable the addition of rows across
|
|
4
|
+
multiple pages through rule-based relationships, rather than manually adding a
|
|
5
|
+
row to each page. These rules hinge on shared attributes among the pages, with a
|
|
6
|
+
category being a typical example of such an attribute. To enable the Dynamic Row
|
|
7
|
+
UI Extension, follow the installation instructions as below.
|
|
8
|
+
|
|
9
|
+
> Installation
|
|
10
|
+
>
|
|
11
|
+
> [Click here to install the Dynamic Row UI Extension](https://app.hygraph.com/apps/dynamic-row-property-picker/new)
|
|
12
|
+
|
|
13
|
+
<img width="1792" alt="image" src="https://github.com/graphcommerce-org/graphcommerce/assets/49681263/3226eedb-e58c-4d3f-9516-14ff6ed56f24">
|
|
14
|
+
|
|
15
|
+
## Enabling the Application
|
|
16
|
+
|
|
17
|
+
Once you click the link and authorize the application, you'll be taken to the
|
|
18
|
+
app's configuration page. On this page, you can switch the application on or off
|
|
19
|
+
as needed.
|
|
20
|
+
|
|
21
|
+
<img width="1792" alt="image" src="https://github.com/graphcommerce-org/graphcommerce/assets/49681263/ec9b55f6-14f6-466e-8a31-0b893ffe1297">
|
|
22
|
+
|
|
23
|
+
## Enabling the field
|
|
24
|
+
|
|
25
|
+
Now to enable the field, go to your Hygraph schema. Under components you should
|
|
26
|
+
have a `Text` and `Number` component. Each of these have a field with api ID
|
|
27
|
+
`property`. You will have to delete this field in both components. This will
|
|
28
|
+
result in current field data being lost, so in case you are migrating to the
|
|
29
|
+
extended UI, make sure to have a copy of those fields somewhere else.
|
|
30
|
+
|
|
31
|
+
> Note
|
|
32
|
+
>
|
|
33
|
+
> Make sure you migrated your schema to Graphcommerce 7.0 with
|
|
34
|
+
> [our Hygraph-CLI.](./cli.md)
|
|
35
|
+
|
|
36
|
+
Replace the existing fields with the new `Property picker` field in the right sidebar
|
|
37
|
+
(it should be under `Slug` and above `Rich text`). While adding the
|
|
38
|
+
`Property picker` field make sure that you make it `required`.
|
|
39
|
+
|
|
40
|
+
<img width="1792" alt="image" src="https://github.com/graphcommerce-org/graphcommerce/assets/49681263/9206f86d-477c-4eaf-bec6-1648874bee5e">
|
|
41
|
+
|
|
42
|
+
## Start building with your new Dynamic Rows UI!
|
|
43
|
+
|
|
44
|
+
If you have any questions about the feature, please reach out to us in our Slack
|
|
45
|
+
channel.
|
|
@@ -23,7 +23,7 @@ There are multiple flows to handle payments.
|
|
|
23
23
|
|
|
24
24
|
### Redirecting payment gateway
|
|
25
25
|
|
|
26
|
-
The first step is to call setPaymentMethodOnCart and placeOrder
|
|
26
|
+
The first step is to call `setPaymentMethodOnCart` and `placeOrder`.
|
|
27
27
|
|
|
28
28
|
```ts
|
|
29
29
|
const variables = {
|
|
@@ -69,14 +69,16 @@ mutation MyGatewayPaymentOptionsAndPlaceOrder($cartId: String!) {
|
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
When the query succeeds the GraphCommerce payment module will redirect to the
|
|
72
|
-
payment_url
|
|
73
|
-
One of the following things can happen:
|
|
74
|
-
|
|
75
|
-
- Result 1
|
|
76
|
-
back to the `return_url` with the
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
72
|
+
`payment_url`. The customer handles it's payment on the payment gateway's
|
|
73
|
+
website. One of the following things can happen:
|
|
74
|
+
|
|
75
|
+
- **Result 1:** The customer has successfully paid and the customer is
|
|
76
|
+
redirected back to the `return_url` with the `$TOKEN` injected.
|
|
77
|
+
|
|
78
|
+
- **Result 2:** The customer has failed their payment and the customer is
|
|
79
|
+
redirected back to the `return_url` with the `$TOKEN` injected.
|
|
80
|
+
|
|
81
|
+
- **Result 3:** The customer presses back in their browser and we still get the
|
|
80
82
|
token from the `placeOrder` mutation.
|
|
81
83
|
|
|
82
84
|
GraphCommerce now needs to check if the payment has indeed succeeded by calling
|
|
@@ -95,7 +97,7 @@ mutation MyGatewayProcessPayment($cartId: String!, $token: String!) {
|
|
|
95
97
|
}
|
|
96
98
|
```
|
|
97
99
|
|
|
98
|
-
After that GraphCommerce
|
|
100
|
+
After that GraphCommerce can either:
|
|
99
101
|
|
|
100
102
|
- Redirect to the success page
|
|
101
103
|
- Restore the cart, show the error message and let the customer checkout again.
|
|
@@ -109,18 +111,17 @@ input PaymentMethodInput {
|
|
|
109
111
|
|
|
110
112
|
input MyGatewayPaymentInput {
|
|
111
113
|
"""
|
|
112
|
-
The URL to
|
|
114
|
+
The URL to which the customer should be redirected, after the payment has been processed.
|
|
113
115
|
|
|
114
|
-
This
|
|
115
|
-
$TOKEN will be repaced with the payment gateway token.
|
|
116
|
+
This should be a fully qualified URL: https://mydomain.com/checkout/payment?token=$TOKEN, where $TOKEN will be replaced with the payment gateway token.
|
|
116
117
|
|
|
117
|
-
This information should be stored in the database (
|
|
118
|
+
This information should be stored in the database (encrypted if required)
|
|
118
119
|
"""
|
|
119
120
|
return_url: String!
|
|
120
121
|
"""
|
|
121
122
|
Payment gateway can accept any custom field, for example an issuer or any additional information that can be configured in the checkout.
|
|
122
123
|
|
|
123
|
-
This information should be stored in the database (
|
|
124
|
+
This information should be stored in the database (encrypted if required)
|
|
124
125
|
"""
|
|
125
126
|
custom_field: String
|
|
126
127
|
}
|
package/package.json
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"name": "@graphcommerce/docs",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/docs",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce/docs",
|
|
5
|
-
"version": "7.1.0-canary.
|
|
5
|
+
"version": "7.1.0-canary.54",
|
|
6
6
|
"sideEffects": true,
|
|
7
7
|
"peerDependencies": {
|
|
8
|
-
"@graphcommerce/prettier-config-pwa": "^7.1.0-canary.
|
|
8
|
+
"@graphcommerce/prettier-config-pwa": "^7.1.0-canary.54"
|
|
9
9
|
},
|
|
10
10
|
"prettier": "@graphcommerce/prettier-config-pwa"
|
|
11
11
|
}
|