Skip to content

Commit 93a7377

Browse files
author
Ryan Workman
committed
Update cart-transform examples to match API changes and add shopify_function rust crate
1 parent c7d9e64 commit 93a7377

File tree

21 files changed

+9496
-469
lines changed

21 files changed

+9496
-469
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/target
22
Cargo.lock
3+
.output.graphql
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
[package]
2-
name = "bundle_cart_transform"
2+
name = "bundles_cart_transform"
33
version = "1.0.0"
44
edition = "2021"
55

66
[dependencies]
7-
serde_json = "1.0"
87
serde = { version = "1.0.13", features = ["derive"] }
8+
serde_with = "1.13.0"
9+
serde_json = "1.0"
10+
shopify_function = "0.2.4"
11+
graphql_client = "0.12.0"
912

1013
[profile.release]
1114
lto = true
1215
opt-level = 's'
16+
strip = true

checkout/rust/cart-transform/bundles/input.graphql.liquid

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ query Input {
44
id
55
quantity
66
merchandise {
7+
__typename
78
... on ProductVariant {
89
id
910
component_parents: metafield(
@@ -24,6 +25,12 @@ query Input {
2425
) {
2526
value
2627
}
28+
price_adjustment: metafield(
29+
namespace: "custom"
30+
key: "price_adjustment"
31+
) {
32+
value
33+
}
2734
}
2835
}
2936
}

0 commit comments

Comments
 (0)