This repository was archived by the owner on Nov 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Reworked GraphQL tutorial #8046
Merged
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
6432b4d
Updates
4efe4fa
Reworked graphql tutorial
bc2ebdb
Dusting off the lint
f7d331c
That wasn't me.
255de77
Merge branch 'master' into db_graphql_tutorial
dobooth 10da0df
Merge branch 'db_graphql_tutorial' of github.com:magento/devdocs into…
fb5fe58
Update src/guides/v2.3/graphql/tutorials/checkout/checkout-add-produc…
dobooth 3feb86e
Apply suggestions from code review
dobooth e34abca
Removed query per review
dobooth 3660040
Fixup per review
dobooth 1db53d7
Code block fixup
dobooth a58057e
Review fixups
dobooth 7ff0ee1
Reversion per review
dobooth 9abc94e
Added link
dobooth 5c6f0b3
Merge branch 'master' into db_graphql_tutorial
dobooth d8e40c0
Fix codeblock
dobooth 8b64330
Merge branch 'master' into db_graphql_tutorial
keharper 68ab141
Update src/guides/v2.3/graphql/tutorials/checkout/checkout-coupon.md
dobooth 02e4b62
Merge branch 'master' into db_graphql_tutorial
7f9f89e
Updates
a798196
Updated shipping address steps
0aa8fe1
Linty
d801e49
Updated steps
d72580b
trailing space
5a1a7f3
Merge branch 'master' into db_graphql_tutorial
dobooth 359cf83
Small tweak to coupon instructions.
29fbd91
Merge branch 'master' into db_graphql_tutorial
dobooth ce62e94
Added shipping method steps.
8e6dbd0
Merge branch 'db_graphql_tutorial' of github.com:magento/devdocs into…
810255a
Update checkout-shipping-address.md
keharper File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,9 +31,11 @@ If you add a product to the shopping cart as a registered customer, be sure to s | |
|
||
## Add a simple product into the shopping cart | ||
|
||
`{ CART_ID }` is the unique shopping cart ID from [Step 2. Create empty cart]({{ page.baseurl }}/graphql/tutorials/checkout/checkout-add-product-to-cart.html). | ||
The following mutation adds a simple product into the shopping cart. | ||
|
||
The following mutation adds a **simple product** into shopping cart. | ||
Replace `{ CART_ID }` with the unique shopping cart ID from [Step 2. Create empty cart]({{ page.baseurl }}/graphql/tutorials/checkout/checkout-add-product-to-cart.html). | ||
|
||
In this example, we will add the Aim Analog Watch (SKU 24-MG04) from the default Luma catalog to the cart. The SKU identifies the product to be added. | ||
|
||
**Request:** | ||
|
||
|
@@ -46,7 +48,7 @@ mutation { | |
{ | ||
data: { | ||
quantity: 1 | ||
sku: "simple-product" | ||
sku: "24-MG04" | ||
} | ||
} | ||
] | ||
|
@@ -75,9 +77,9 @@ mutation { | |
"cart": { | ||
"items": [ | ||
{ | ||
"id": "508", | ||
"id": "5", | ||
"product": { | ||
"sku": "simple-product", | ||
"sku": "24-MG04", | ||
"stock_status": "IN_STOCK" | ||
}, | ||
"quantity": 1 | ||
|
@@ -91,7 +93,8 @@ mutation { | |
|
||
## Add a virtual product into the shopping cart | ||
|
||
The following mutation adds a **virtual product** into shopping cart. | ||
The following mutation adds a virtual product into the shopping cart. | ||
In this example, we add the Beginner's Yoga video downloadable product (SKU 240-LV04). | ||
|
||
**Request:** | ||
|
||
|
@@ -104,7 +107,7 @@ mutation { | |
{ | ||
data: { | ||
quantity: 1 | ||
sku: "virtual-product" | ||
sku: "240-LV04" | ||
} | ||
} | ||
] | ||
|
@@ -133,9 +136,17 @@ mutation { | |
"cart": { | ||
"items": [ | ||
{ | ||
"id": "509", | ||
"id": "5", | ||
"product": { | ||
"sku": "virtual-product", | ||
"sku": "24-MG04", | ||
"stock_status": "IN_STOCK" | ||
}, | ||
"quantity": 1 | ||
}, | ||
{ | ||
"id": "6", | ||
"product": { | ||
"sku": "240-LV04", | ||
"stock_status": "IN_STOCK" | ||
}, | ||
"quantity": 1 | ||
|
@@ -147,6 +158,8 @@ mutation { | |
} | ||
``` | ||
|
||
The response lists all items currently in the cart, including the just-added video download. | ||
|
||
## Verify this step {#verify-step} | ||
|
||
1. Sign in as a customer to the website using the email `[email protected]` and password `b1b2b3l@w+`. | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add these back. They're the closing marks for the
data
and top-level` objects. Also I think the lack of blank line afterward is causing the display problems in GH.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done