Skip to content

Commit 1ac7ea5

Browse files
authored
Merge pull request #412 from Shopify/api-vers-2024
Updating templates and sample apps for cart transform and discounts to use 2024-01
2 parents 610edf2 + 848f06b commit 1ac7ea5

File tree

24 files changed

+14027
-2663
lines changed

24 files changed

+14027
-2663
lines changed

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

Lines changed: 125 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ schema {
44
}
55

66
"""
7-
Exactly one field of input must be provided, and all others omitted.
7+
Requires that exactly one field must be supplied and that field must not be `null`.
88
"""
99
directive @oneOf on INPUT_OBJECT
1010

@@ -164,6 +164,11 @@ An operation to apply to the Cart.
164164
input CartOperation @oneOf {
165165
expand: ExpandOperation
166166
merge: MergeOperation
167+
168+
"""
169+
A cart line update operation. Only stores on the Shopify Plus plan can use apps with update operations.
170+
"""
171+
update: UpdateOperation
167172
}
168173

169174
"""
@@ -2435,6 +2440,11 @@ type Customer implements HasMetafields {
24352440
"""
24362441
email: String
24372442

2443+
"""
2444+
The customer's first name.
2445+
"""
2446+
firstName: String
2447+
24382448
"""
24392449
Whether the customer has any of the given tags.
24402450
"""
@@ -2460,6 +2470,11 @@ type Customer implements HasMetafields {
24602470
"""
24612471
id: ID!
24622472

2473+
"""
2474+
The customer's last name.
2475+
"""
2476+
lastName: String
2477+
24632478
"""
24642479
Returns a metafield by namespace and key that belongs to the resource.
24652480
"""
@@ -2520,10 +2535,20 @@ input ExpandOperation {
25202535
"""
25212536
expandedCartItems: [ExpandedItem!]!
25222537

2538+
"""
2539+
The image of the group.
2540+
"""
2541+
image: ImageInput
2542+
25232543
"""
25242544
The price adjustment to the group.
25252545
"""
25262546
price: PriceAdjustment
2547+
2548+
"""
2549+
Title override. If title is not provided, variant title is used.
2550+
"""
2551+
title: String
25272552
}
25282553

25292554
input ExpandedItem {
@@ -2532,12 +2557,47 @@ input ExpandedItem {
25322557
"""
25332558
merchandiseId: ID!
25342559

2560+
"""
2561+
The price adjustment for the expanded item.
2562+
"""
2563+
price: ExpandedItemPriceAdjustment
2564+
25352565
"""
25362566
The quantity of the expanded item.The max quantity is 2000.
25372567
"""
25382568
quantity: Int!
25392569
}
25402570

2571+
"""
2572+
A fixed price per unit adjustment to apply to the expanded item.
2573+
"""
2574+
input ExpandedItemFixedPricePerUnitAdjustment {
2575+
"""
2576+
The fixed price amount per quantity of the expanded item in presentment currency.
2577+
"""
2578+
amount: Decimal!
2579+
}
2580+
2581+
"""
2582+
A price adjustment to apply to the expanded item.
2583+
"""
2584+
input ExpandedItemPriceAdjustment {
2585+
"""
2586+
The price adjustment for the expanded item.
2587+
"""
2588+
adjustment: ExpandedItemPriceAdjustmentValue!
2589+
}
2590+
2591+
"""
2592+
A price adjustment to apply to a cart line.
2593+
"""
2594+
input ExpandedItemPriceAdjustmentValue @oneOf {
2595+
"""
2596+
A fixed price per unit adjustment to apply to the expanded item.
2597+
"""
2598+
fixedPricePerUnit: ExpandedItemFixedPricePerUnitAdjustment
2599+
}
2600+
25412601
"""
25422602
Transformations to apply to the Cart. In API versions 2023-10 and beyond, this
25432603
type is deprecated in favor of `FunctionRunResult`.
@@ -2559,6 +2619,13 @@ input FunctionRunResult {
25592619
operations: [CartOperation!]!
25602620
}
25612621

2622+
"""
2623+
A function-scoped handle to a refer a resource.
2624+
The Handle type appears in a JSON response as a String, but it is not intended to be human-readable.
2625+
Example value: `"10079785100"`
2626+
"""
2627+
scalar Handle
2628+
25622629
"""
25632630
Represents information about the metafields associated to the specified resource.
25642631
"""
@@ -3451,7 +3518,7 @@ type Market implements HasMetafields {
34513518
"""
34523519
A human-readable unique string for the market automatically generated from its title.
34533520
"""
3454-
handle: String!
3521+
handle: Handle!
34553522

34563523
"""
34573524
A globally-unique identifier.
@@ -3618,7 +3685,7 @@ type Product implements HasMetafields {
36183685
"""
36193686
A unique human-friendly string of the product's title.
36203687
"""
3621-
handle: String!
3688+
handle: Handle!
36223689

36233690
"""
36243691
Whether the product has any of the given tags.
@@ -3885,6 +3952,61 @@ For example, `"https://johns-apparel.myshopify.com"` is a valid URL. It includes
38853952
"""
38863953
scalar URL
38873954

3955+
"""
3956+
A cart line update operation. Only stores on the Shopify Plus plan can use apps with update operations.
3957+
"""
3958+
input UpdateOperation {
3959+
"""
3960+
The ID of the cart line.
3961+
"""
3962+
cartLineId: ID!
3963+
3964+
"""
3965+
The image override for the cart line item.
3966+
"""
3967+
image: ImageInput
3968+
3969+
"""
3970+
The price adjustment for the cart line item.
3971+
"""
3972+
price: UpdateOperationPriceAdjustment
3973+
3974+
"""
3975+
The title override for the cart line item. If not provided, the variant title is used.
3976+
"""
3977+
title: String
3978+
}
3979+
3980+
"""
3981+
A fixed price per unit adjustment to apply to a cart line.
3982+
"""
3983+
input UpdateOperationFixedPricePerUnitAdjustment {
3984+
"""
3985+
The fixed price amount per quantity of the cart line item in presentment currency.
3986+
"""
3987+
amount: Decimal!
3988+
}
3989+
3990+
"""
3991+
A price adjustment to apply to a cart line item.
3992+
"""
3993+
input UpdateOperationPriceAdjustment {
3994+
"""
3995+
The price adjustment per unit to apply to the cart line item.
3996+
"""
3997+
adjustment: UpdateOperationPriceAdjustmentValue!
3998+
}
3999+
4000+
"""
4001+
A price adjustment to apply to a cart line item.
4002+
"""
4003+
input UpdateOperationPriceAdjustmentValue @oneOf {
4004+
"""
4005+
A fixed price per unit adjustment to apply to a cart line.
4006+
"""
4007+
fixedPricePerUnit: UpdateOperationFixedPricePerUnitAdjustment
4008+
}
4009+
38884010
"""
38894011
A void type that can be used to return a null value from a mutation.
38904012
"""

0 commit comments

Comments
 (0)