Skip to content

Commit f3f9531

Browse files
author
Ryan Workman
authored
Merge pull request #179 from Shopify/update-cart-transform
Add wasm extension example and update PriceAdjustmentValue type
2 parents 53465af + 2de4410 commit f3f9531

File tree

10 files changed

+3072
-6
lines changed

10 files changed

+3072
-6
lines changed

checkout/rust/cart-transform/bundles/schema.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2866,7 +2866,7 @@ input PriceAdjustmentValue {
28662866
"""
28672867
The value of the price adjustment.
28682868
"""
2869-
value: Float!
2869+
value: Decimal!
28702870
}
28712871

28722872
"""

checkout/rust/cart-transform/bundles/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ fn get_merge_cart_operations(cart: &Cart) -> Vec<CartOperation> {
8181
if let Some(price_adjustment) = &definition.price_adjustment {
8282
price = Some(PriceAdjustment {
8383
percentage_decrease: Some(PriceAdjustmentValue {
84-
value: *price_adjustment
84+
value: (*price_adjustment).to_string()
8585
})
8686
});
8787
}

checkout/rust/cart-transform/default/schema.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2866,7 +2866,7 @@ input PriceAdjustmentValue {
28662866
"""
28672867
The value of the price adjustment.
28682868
"""
2869-
value: Float!
2869+
value: Decimal!
28702870
}
28712871

28722872
"""
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
query Input {
2+
cart {
3+
lines {
4+
id
5+
quantity
6+
}
7+
}
8+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ "schemaVersions": { "cart_transform": { "major": 1, "minor": 0 } } }

0 commit comments

Comments
 (0)