Skip to content

Commit bfe8829

Browse files
authored
Merge pull request #438 from Shopify/bump-val-sample-version
Bump API version for validation function examples
2 parents 7ff4bee + b0a154f commit bfe8829

File tree

5 files changed

+143
-17
lines changed

5 files changed

+143
-17
lines changed

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

Lines changed: 47 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ type CartDeliveryOption {
194194
"""
195195
The unique identifier of the delivery option.
196196
"""
197-
handle: String!
197+
handle: Handle!
198198

199199
"""
200200
The title of the delivery option.
@@ -1527,7 +1527,7 @@ enum CountryCode {
15271527
TO
15281528

15291529
"""
1530-
Turkey.
1530+
Türkiye.
15311531
"""
15321532
TR
15331533

@@ -2519,6 +2519,11 @@ type Customer implements HasMetafields {
25192519
"""
25202520
email: String
25212521

2522+
"""
2523+
The customer's first name.
2524+
"""
2525+
firstName: String
2526+
25222527
"""
25232528
Whether the customer has any of the given tags.
25242529
"""
@@ -2544,6 +2549,11 @@ type Customer implements HasMetafields {
25442549
"""
25452550
id: ID!
25462551

2552+
"""
2553+
The customer's last name.
2554+
"""
2555+
lastName: String
2556+
25472557
"""
25482558
Returns a metafield by namespace and key that belongs to the resource.
25492559
"""
@@ -2696,6 +2706,13 @@ input FunctionRunResult {
26962706
errors: [FunctionError!]!
26972707
}
26982708

2709+
"""
2710+
A function-scoped handle to a refer a resource.
2711+
The Handle type appears in a JSON response as a String, but it is not intended to be human-readable.
2712+
Example value: `"10079785100"`
2713+
"""
2714+
scalar Handle
2715+
26992716
"""
27002717
Represents information about the metafields associated to the specified resource.
27012718
"""
@@ -2764,6 +2781,11 @@ type Input {
27642781
Information about the shop.
27652782
"""
27662783
shop: Shop!
2784+
2785+
"""
2786+
The validation rule that owns the current function.
2787+
"""
2788+
validation: Validation!
27672789
}
27682790

27692791
"""
@@ -3653,7 +3675,7 @@ type Market implements HasMetafields {
36533675
"""
36543676
A human-readable unique string for the market automatically generated from its title.
36553677
"""
3656-
handle: String!
3678+
handle: Handle!
36573679

36583680
"""
36593681
A globally-unique identifier.
@@ -3779,7 +3801,7 @@ type Product implements HasMetafields {
37793801
"""
37803802
A unique human-friendly string of the product's title.
37813803
"""
3782-
handle: String!
3804+
handle: Handle!
37833805

37843806
"""
37853807
Whether the product has any of the given tags.
@@ -4037,6 +4059,26 @@ For example, "05:43:21".
40374059
"""
40384060
scalar TimeWithoutTimezone
40394061

4062+
"""
4063+
A customization that validates a cart and/or checkout.
4064+
"""
4065+
type Validation implements HasMetafields {
4066+
"""
4067+
Returns a metafield by namespace and key that belongs to the resource.
4068+
"""
4069+
metafield(
4070+
"""
4071+
The key for the metafield.
4072+
"""
4073+
key: String!
4074+
4075+
"""
4076+
The container the metafield belongs to. If omitted, the app-reserved namespace will be used.
4077+
"""
4078+
namespace: String
4079+
): Metafield
4080+
}
4081+
40404082
"""
40414083
A void type that can be used to return a null value from a mutation.
40424084
"""
@@ -4065,4 +4107,4 @@ enum WeightUnit {
40654107
1 pound equals 16 ounces.
40664108
"""
40674109
POUNDS
4068-
}
4110+
}

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

Lines changed: 47 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ type CartDeliveryOption {
194194
"""
195195
The unique identifier of the delivery option.
196196
"""
197-
handle: String!
197+
handle: Handle!
198198

199199
"""
200200
The title of the delivery option.
@@ -1527,7 +1527,7 @@ enum CountryCode {
15271527
TO
15281528

15291529
"""
1530-
Turkey.
1530+
Türkiye.
15311531
"""
15321532
TR
15331533

@@ -2519,6 +2519,11 @@ type Customer implements HasMetafields {
25192519
"""
25202520
email: String
25212521

2522+
"""
2523+
The customer's first name.
2524+
"""
2525+
firstName: String
2526+
25222527
"""
25232528
Whether the customer has any of the given tags.
25242529
"""
@@ -2544,6 +2549,11 @@ type Customer implements HasMetafields {
25442549
"""
25452550
id: ID!
25462551

2552+
"""
2553+
The customer's last name.
2554+
"""
2555+
lastName: String
2556+
25472557
"""
25482558
Returns a metafield by namespace and key that belongs to the resource.
25492559
"""
@@ -2696,6 +2706,13 @@ input FunctionRunResult {
26962706
errors: [FunctionError!]!
26972707
}
26982708

2709+
"""
2710+
A function-scoped handle to a refer a resource.
2711+
The Handle type appears in a JSON response as a String, but it is not intended to be human-readable.
2712+
Example value: `"10079785100"`
2713+
"""
2714+
scalar Handle
2715+
26992716
"""
27002717
Represents information about the metafields associated to the specified resource.
27012718
"""
@@ -2764,6 +2781,11 @@ type Input {
27642781
Information about the shop.
27652782
"""
27662783
shop: Shop!
2784+
2785+
"""
2786+
The validation rule that owns the current function.
2787+
"""
2788+
validation: Validation!
27672789
}
27682790

27692791
"""
@@ -3653,7 +3675,7 @@ type Market implements HasMetafields {
36533675
"""
36543676
A human-readable unique string for the market automatically generated from its title.
36553677
"""
3656-
handle: String!
3678+
handle: Handle!
36573679

36583680
"""
36593681
A globally-unique identifier.
@@ -3779,7 +3801,7 @@ type Product implements HasMetafields {
37793801
"""
37803802
A unique human-friendly string of the product's title.
37813803
"""
3782-
handle: String!
3804+
handle: Handle!
37833805

37843806
"""
37853807
Whether the product has any of the given tags.
@@ -4037,6 +4059,26 @@ For example, "05:43:21".
40374059
"""
40384060
scalar TimeWithoutTimezone
40394061

4062+
"""
4063+
A customization that validates a cart and/or checkout.
4064+
"""
4065+
type Validation implements HasMetafields {
4066+
"""
4067+
Returns a metafield by namespace and key that belongs to the resource.
4068+
"""
4069+
metafield(
4070+
"""
4071+
The key for the metafield.
4072+
"""
4073+
key: String!
4074+
4075+
"""
4076+
The container the metafield belongs to. If omitted, the app-reserved namespace will be used.
4077+
"""
4078+
namespace: String
4079+
): Metafield
4080+
}
4081+
40404082
"""
40414083
A void type that can be used to return a null value from a mutation.
40424084
"""
@@ -4065,4 +4107,4 @@ enum WeightUnit {
40654107
1 pound equals 16 ounces.
40664108
"""
40674109
POUNDS
4068-
}
4110+
}

checkout/rust/cart-checkout-validation/default/shopify.extension.toml.liquid

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 = "{{handle}}"

checkout/wasm/cart-checkout-validation/default/schema.graphql

Lines changed: 47 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ type CartDeliveryOption {
194194
"""
195195
The unique identifier of the delivery option.
196196
"""
197-
handle: String!
197+
handle: Handle!
198198

199199
"""
200200
The title of the delivery option.
@@ -1527,7 +1527,7 @@ enum CountryCode {
15271527
TO
15281528

15291529
"""
1530-
Turkey.
1530+
Türkiye.
15311531
"""
15321532
TR
15331533

@@ -2519,6 +2519,11 @@ type Customer implements HasMetafields {
25192519
"""
25202520
email: String
25212521

2522+
"""
2523+
The customer's first name.
2524+
"""
2525+
firstName: String
2526+
25222527
"""
25232528
Whether the customer has any of the given tags.
25242529
"""
@@ -2544,6 +2549,11 @@ type Customer implements HasMetafields {
25442549
"""
25452550
id: ID!
25462551

2552+
"""
2553+
The customer's last name.
2554+
"""
2555+
lastName: String
2556+
25472557
"""
25482558
Returns a metafield by namespace and key that belongs to the resource.
25492559
"""
@@ -2696,6 +2706,13 @@ input FunctionRunResult {
26962706
errors: [FunctionError!]!
26972707
}
26982708

2709+
"""
2710+
A function-scoped handle to a refer a resource.
2711+
The Handle type appears in a JSON response as a String, but it is not intended to be human-readable.
2712+
Example value: `"10079785100"`
2713+
"""
2714+
scalar Handle
2715+
26992716
"""
27002717
Represents information about the metafields associated to the specified resource.
27012718
"""
@@ -2764,6 +2781,11 @@ type Input {
27642781
Information about the shop.
27652782
"""
27662783
shop: Shop!
2784+
2785+
"""
2786+
The validation rule that owns the current function.
2787+
"""
2788+
validation: Validation!
27672789
}
27682790

27692791
"""
@@ -3653,7 +3675,7 @@ type Market implements HasMetafields {
36533675
"""
36543676
A human-readable unique string for the market automatically generated from its title.
36553677
"""
3656-
handle: String!
3678+
handle: Handle!
36573679

36583680
"""
36593681
A globally-unique identifier.
@@ -3779,7 +3801,7 @@ type Product implements HasMetafields {
37793801
"""
37803802
A unique human-friendly string of the product's title.
37813803
"""
3782-
handle: String!
3804+
handle: Handle!
37833805

37843806
"""
37853807
Whether the product has any of the given tags.
@@ -4037,6 +4059,26 @@ For example, "05:43:21".
40374059
"""
40384060
scalar TimeWithoutTimezone
40394061

4062+
"""
4063+
A customization that validates a cart and/or checkout.
4064+
"""
4065+
type Validation implements HasMetafields {
4066+
"""
4067+
Returns a metafield by namespace and key that belongs to the resource.
4068+
"""
4069+
metafield(
4070+
"""
4071+
The key for the metafield.
4072+
"""
4073+
key: String!
4074+
4075+
"""
4076+
The container the metafield belongs to. If omitted, the app-reserved namespace will be used.
4077+
"""
4078+
namespace: String
4079+
): Metafield
4080+
}
4081+
40404082
"""
40414083
A void type that can be used to return a null value from a mutation.
40424084
"""
@@ -4065,4 +4107,4 @@ enum WeightUnit {
40654107
1 pound equals 16 ounces.
40664108
"""
40674109
POUNDS
4068-
}
4110+
}

checkout/wasm/cart-checkout-validation/default/shopify.extension.toml.liquid

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 = "{{handle}}"

0 commit comments

Comments
 (0)