Skip to content

Commit ac557b2

Browse files
committed
Updating api_version for discounts sample app
1 parent 342923b commit ac557b2

File tree

4 files changed

+61
-17
lines changed

4 files changed

+61
-17
lines changed

sample-apps/discounts/extensions/product-discount-js/schema.graphql

Lines changed: 29 additions & 7 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

@@ -175,7 +175,7 @@ type CartDeliveryOption {
175175
"""
176176
The unique identifier of the delivery option.
177177
"""
178-
handle: String!
178+
handle: Handle!
179179

180180
"""
181181
The title of the delivery option.
@@ -2390,7 +2390,7 @@ enum CurrencyCode {
23902390
VEF @deprecated(reason: "`VEF` is deprecated. Use `VES` available from version `2020-10` onwards instead.")
23912391

23922392
"""
2393-
Venezuelan Bolivares (VES).
2393+
Venezuelan Bolivares Soberanos (VES).
23942394
"""
23952395
VES
23962396

@@ -2500,6 +2500,11 @@ type Customer implements HasMetafields {
25002500
"""
25012501
email: String
25022502

2503+
"""
2504+
The customer's first name.
2505+
"""
2506+
firstName: String
2507+
25032508
"""
25042509
Whether the customer has any of the given tags.
25052510
"""
@@ -2525,6 +2530,11 @@ type Customer implements HasMetafields {
25252530
"""
25262531
id: ID!
25272532

2533+
"""
2534+
The customer's last name.
2535+
"""
2536+
lastName: String
2537+
25282538
"""
25292539
Returns a metafield by namespace and key that belongs to the resource.
25302540
"""
@@ -2665,6 +2675,11 @@ input Discount {
26652675
The strategy that's applied to the list of discounts.
26662676
"""
26672677
enum DiscountApplicationStrategy {
2678+
"""
2679+
Apply all discounts with conditions that are satisfied.
2680+
"""
2681+
ALL
2682+
26682683
"""
26692684
Only apply the first discount with conditions that are satisfied.
26702685
"""
@@ -2717,7 +2732,7 @@ input FixedAmount {
27172732
}
27182733

27192734
"""
2720-
The result of the function. This type is deprecated in favor of `FunctionRunResult`.
2735+
The result of the function. In API versions 2023-10 and beyond, this type is deprecated in favor of `FunctionRunResult`.
27212736
"""
27222737
input FunctionResult {
27232738
"""
@@ -2746,6 +2761,13 @@ input FunctionRunResult {
27462761
discounts: [Discount!]!
27472762
}
27482763

2764+
"""
2765+
A function-scoped handle to a refer a resource.
2766+
The Handle type appears in a JSON response as a String, but it is not intended to be human-readable.
2767+
Example value: `"10079785100"`
2768+
"""
2769+
scalar Handle
2770+
27492771
"""
27502772
Represents information about the metafields associated to the specified resource.
27512773
"""
@@ -3706,7 +3728,7 @@ type Market implements HasMetafields {
37063728
"""
37073729
A human-readable unique string for the market automatically generated from its title.
37083730
"""
3709-
handle: String!
3731+
handle: Handle!
37103732

37113733
"""
37123734
A globally-unique identifier.
@@ -3844,7 +3866,7 @@ type Product implements HasMetafields {
38443866
"""
38453867
A unique human-friendly string of the product's title.
38463868
"""
3847-
handle: String!
3869+
handle: Handle!
38483870

38493871
"""
38503872
Whether the product has any of the given tags.
@@ -4173,4 +4195,4 @@ enum WeightUnit {
41734195
1 pound equals 16 ounces.
41744196
"""
41754197
POUNDS
4176-
}
4198+
}

sample-apps/discounts/extensions/product-discount-js/shopify.extension.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
api_version = "2023-10"
1+
api_version = "2024-01"
22

33
[[extensions]]
44
handle = "product-discount-js"

sample-apps/discounts/extensions/product-discount-rust/schema.graphql

Lines changed: 29 additions & 7 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

@@ -175,7 +175,7 @@ type CartDeliveryOption {
175175
"""
176176
The unique identifier of the delivery option.
177177
"""
178-
handle: String!
178+
handle: Handle!
179179

180180
"""
181181
The title of the delivery option.
@@ -2390,7 +2390,7 @@ enum CurrencyCode {
23902390
VEF @deprecated(reason: "`VEF` is deprecated. Use `VES` available from version `2020-10` onwards instead.")
23912391

23922392
"""
2393-
Venezuelan Bolivares (VES).
2393+
Venezuelan Bolivares Soberanos (VES).
23942394
"""
23952395
VES
23962396

@@ -2500,6 +2500,11 @@ type Customer implements HasMetafields {
25002500
"""
25012501
email: String
25022502

2503+
"""
2504+
The customer's first name.
2505+
"""
2506+
firstName: String
2507+
25032508
"""
25042509
Whether the customer has any of the given tags.
25052510
"""
@@ -2525,6 +2530,11 @@ type Customer implements HasMetafields {
25252530
"""
25262531
id: ID!
25272532

2533+
"""
2534+
The customer's last name.
2535+
"""
2536+
lastName: String
2537+
25282538
"""
25292539
Returns a metafield by namespace and key that belongs to the resource.
25302540
"""
@@ -2665,6 +2675,11 @@ input Discount {
26652675
The strategy that's applied to the list of discounts.
26662676
"""
26672677
enum DiscountApplicationStrategy {
2678+
"""
2679+
Apply all discounts with conditions that are satisfied.
2680+
"""
2681+
ALL
2682+
26682683
"""
26692684
Only apply the first discount with conditions that are satisfied.
26702685
"""
@@ -2717,7 +2732,7 @@ input FixedAmount {
27172732
}
27182733

27192734
"""
2720-
The result of the function. This type is deprecated in favor of `FunctionRunResult`.
2735+
The result of the function. In API versions 2023-10 and beyond, this type is deprecated in favor of `FunctionRunResult`.
27212736
"""
27222737
input FunctionResult {
27232738
"""
@@ -2746,6 +2761,13 @@ input FunctionRunResult {
27462761
discounts: [Discount!]!
27472762
}
27482763

2764+
"""
2765+
A function-scoped handle to a refer a resource.
2766+
The Handle type appears in a JSON response as a String, but it is not intended to be human-readable.
2767+
Example value: `"10079785100"`
2768+
"""
2769+
scalar Handle
2770+
27492771
"""
27502772
Represents information about the metafields associated to the specified resource.
27512773
"""
@@ -3706,7 +3728,7 @@ type Market implements HasMetafields {
37063728
"""
37073729
A human-readable unique string for the market automatically generated from its title.
37083730
"""
3709-
handle: String!
3731+
handle: Handle!
37103732

37113733
"""
37123734
A globally-unique identifier.
@@ -3844,7 +3866,7 @@ type Product implements HasMetafields {
38443866
"""
38453867
A unique human-friendly string of the product's title.
38463868
"""
3847-
handle: String!
3869+
handle: Handle!
38483870

38493871
"""
38503872
Whether the product has any of the given tags.
@@ -4173,4 +4195,4 @@ enum WeightUnit {
41734195
1 pound equals 16 ounces.
41744196
"""
41754197
POUNDS
4176-
}
4198+
}

sample-apps/discounts/extensions/product-discount-rust/shopify.extension.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
api_version = "2023-10"
1+
api_version = "2024-01"
22

33
[[extensions]]
44
handle = "product-discount-rust"
@@ -18,4 +18,4 @@ type = "function"
1818

1919
[extensions.ui.paths]
2020
create = "/app/volume-discount/:functionId/new"
21-
details = "/app/volume-discount/:functionId/:id"
21+
details = "/app/volume-discount/:functionId/:id"

0 commit comments

Comments
 (0)