Skip to content

Commit 2ec6b9f

Browse files
committed
Update schemas to 2025-01
1 parent 64663df commit 2ec6b9f

File tree

66 files changed

+8084
-155
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+8084
-155
lines changed

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

Lines changed: 269 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ Only allow the field to be queried when targeting one of the specified targets.
88
"""
99
directive @restrictTarget(only: [String!]!) on FIELD_DEFINITION
1010

11+
"""
12+
Scale the Functions resource limits based on the field's length.
13+
"""
14+
directive @scaleLimits(rate: Float!) on FIELD_DEFINITION
15+
1116
"""
1217
Represents a generic custom attribute, such as whether an order is a customer's first.
1318
"""
@@ -114,7 +119,17 @@ type Cart {
114119
"""
115120
A list of lines containing information about the items the customer intends to purchase.
116121
"""
117-
lines: [CartLine!]!
122+
lines: [CartLine!]! @scaleLimits(rate: 0.005)
123+
124+
"""
125+
The localized fields available for the cart.
126+
"""
127+
localizedFields(
128+
"""
129+
The keys of the localized fields to retrieve.
130+
"""
131+
keys: [LocalizedFieldKey!]! = []
132+
): [LocalizedField!]!
118133
}
119134

120135
"""
@@ -149,7 +164,7 @@ type CartDeliveryGroup {
149164
"""
150165
A list of cart lines for the delivery group.
151166
"""
152-
cartLines: [CartLine!]!
167+
cartLines: [CartLine!]! @scaleLimits(rate: 0.005)
153168

154169
"""
155170
The destination address for the delivery group.
@@ -260,7 +275,8 @@ type CartLineCost {
260275
amountPerQuantity: MoneyV2!
261276

262277
"""
263-
The compare at amount of the merchandise line.
278+
The compare at amount of the merchandise line. This value varies depending on
279+
the buyer's identity, and is null when the value is hidden to buyers.
264280
"""
265281
compareAtAmountPerQuantity: MoneyV2
266282

@@ -2767,7 +2783,8 @@ The attributes associated with an HTTP request.
27672783
"""
27682784
input HttpRequest {
27692785
"""
2770-
The HTTP body.
2786+
The HTTP request body as a plain string.
2787+
Use this field when the body isn't in JSON format.
27712788
"""
27722789
body: String
27732790

@@ -2776,6 +2793,17 @@ input HttpRequest {
27762793
"""
27772794
headers: [HttpRequestHeader!]!
27782795

2796+
"""
2797+
The HTTP request body as a JSON object.
2798+
Use this field when the body's in JSON format, to reduce function instruction consumption
2799+
and to ensure the body's formatted in logs.
2800+
Don't use this field together with the `body` field. If both are provided, then the `body` field
2801+
will take precedence.
2802+
If this field is specified and no `Content-Type` header is included, then the header will
2803+
automatically be set to `application/json`.
2804+
"""
2805+
jsonBody: JSON
2806+
27792807
"""
27802808
The HTTP method.
27812809
"""
@@ -2837,15 +2865,38 @@ The attributes associated with an HTTP response.
28372865
"""
28382866
type HttpResponse {
28392867
"""
2840-
The HTTP body.
2868+
The HTTP response body as a plain string.
2869+
Use this field when the body is not in JSON format.
28412870
"""
28422871
body: String
28432872

2873+
"""
2874+
An HTTP header.
2875+
"""
2876+
header(
2877+
"""
2878+
A case-insensitive header name.
2879+
"""
2880+
name: String!
2881+
): HttpResponseHeader
2882+
28442883
"""
28452884
The HTTP headers.
28462885
"""
28472886
headers: [HttpResponseHeader!]! @deprecated(reason: "Use `header` instead.")
28482887

2888+
"""
2889+
The HTTP response body parsed as JSON.
2890+
If the body is valid JSON, it will be parsed and returned as a JSON object.
2891+
If parsing fails, then raw body is returned as a string.
2892+
Use this field when you expect the response to be JSON, or when you're dealing
2893+
with mixed response types, meaning both JSON and non-JSON.
2894+
Using this field reduces function instruction consumption and ensures that the data is formatted in logs.
2895+
To prevent increasing the function target input size unnecessarily, avoid querying
2896+
both `body` and `jsonBody` simultaneously.
2897+
"""
2898+
jsonBody: JSON
2899+
28492900
"""
28502901
The HTTP status code.
28512902
"""
@@ -3749,6 +3800,219 @@ type Localization {
37493800
market: Market!
37503801
}
37513802

3803+
"""
3804+
Represents the value captured by a localized field. Localized fields are
3805+
additional fields required by certain countries on international orders. For
3806+
example, some countries require additional fields for customs information or tax
3807+
identification numbers.
3808+
"""
3809+
type LocalizedField {
3810+
"""
3811+
The key of the localized field.
3812+
"""
3813+
key: LocalizedFieldKey!
3814+
3815+
"""
3816+
The title of the localized field.
3817+
"""
3818+
title: String!
3819+
3820+
"""
3821+
The value of the localized field.
3822+
"""
3823+
value: String
3824+
}
3825+
3826+
"""
3827+
Unique key identifying localized fields.
3828+
"""
3829+
enum LocalizedFieldKey {
3830+
"""
3831+
Localized field key 'shipping_credential_br' for country BR.
3832+
"""
3833+
SHIPPING_CREDENTIAL_BR
3834+
3835+
"""
3836+
Localized field key 'shipping_credential_cl' for country CL.
3837+
"""
3838+
SHIPPING_CREDENTIAL_CL
3839+
3840+
"""
3841+
Localized field key 'shipping_credential_cn' for country CN.
3842+
"""
3843+
SHIPPING_CREDENTIAL_CN
3844+
3845+
"""
3846+
Localized field key 'shipping_credential_co' for country CO.
3847+
"""
3848+
SHIPPING_CREDENTIAL_CO
3849+
3850+
"""
3851+
Localized field key 'shipping_credential_cr' for country CR.
3852+
"""
3853+
SHIPPING_CREDENTIAL_CR
3854+
3855+
"""
3856+
Localized field key 'shipping_credential_ec' for country EC.
3857+
"""
3858+
SHIPPING_CREDENTIAL_EC
3859+
3860+
"""
3861+
Localized field key 'shipping_credential_es' for country ES.
3862+
"""
3863+
SHIPPING_CREDENTIAL_ES
3864+
3865+
"""
3866+
Localized field key 'shipping_credential_gt' for country GT.
3867+
"""
3868+
SHIPPING_CREDENTIAL_GT
3869+
3870+
"""
3871+
Localized field key 'shipping_credential_id' for country ID.
3872+
"""
3873+
SHIPPING_CREDENTIAL_ID
3874+
3875+
"""
3876+
Localized field key 'shipping_credential_kr' for country KR.
3877+
"""
3878+
SHIPPING_CREDENTIAL_KR
3879+
3880+
"""
3881+
Localized field key 'shipping_credential_mx' for country MX.
3882+
"""
3883+
SHIPPING_CREDENTIAL_MX
3884+
3885+
"""
3886+
Localized field key 'shipping_credential_my' for country MY.
3887+
"""
3888+
SHIPPING_CREDENTIAL_MY
3889+
3890+
"""
3891+
Localized field key 'shipping_credential_pe' for country PE.
3892+
"""
3893+
SHIPPING_CREDENTIAL_PE
3894+
3895+
"""
3896+
Localized field key 'shipping_credential_pt' for country PT.
3897+
"""
3898+
SHIPPING_CREDENTIAL_PT
3899+
3900+
"""
3901+
Localized field key 'shipping_credential_py' for country PY.
3902+
"""
3903+
SHIPPING_CREDENTIAL_PY
3904+
3905+
"""
3906+
Localized field key 'shipping_credential_tr' for country TR.
3907+
"""
3908+
SHIPPING_CREDENTIAL_TR
3909+
3910+
"""
3911+
Localized field key 'shipping_credential_tw' for country TW.
3912+
"""
3913+
SHIPPING_CREDENTIAL_TW
3914+
3915+
"""
3916+
Localized field key 'shipping_credential_type_co' for country CO.
3917+
"""
3918+
SHIPPING_CREDENTIAL_TYPE_CO
3919+
3920+
"""
3921+
Localized field key 'tax_credential_br' for country BR.
3922+
"""
3923+
TAX_CREDENTIAL_BR
3924+
3925+
"""
3926+
Localized field key 'tax_credential_cl' for country CL.
3927+
"""
3928+
TAX_CREDENTIAL_CL
3929+
3930+
"""
3931+
Localized field key 'tax_credential_co' for country CO.
3932+
"""
3933+
TAX_CREDENTIAL_CO
3934+
3935+
"""
3936+
Localized field key 'tax_credential_cr' for country CR.
3937+
"""
3938+
TAX_CREDENTIAL_CR
3939+
3940+
"""
3941+
Localized field key 'tax_credential_ec' for country EC.
3942+
"""
3943+
TAX_CREDENTIAL_EC
3944+
3945+
"""
3946+
Localized field key 'tax_credential_es' for country ES.
3947+
"""
3948+
TAX_CREDENTIAL_ES
3949+
3950+
"""
3951+
Localized field key 'tax_credential_gt' for country GT.
3952+
"""
3953+
TAX_CREDENTIAL_GT
3954+
3955+
"""
3956+
Localized field key 'tax_credential_id' for country ID.
3957+
"""
3958+
TAX_CREDENTIAL_ID
3959+
3960+
"""
3961+
Localized field key 'tax_credential_it' for country IT.
3962+
"""
3963+
TAX_CREDENTIAL_IT
3964+
3965+
"""
3966+
Localized field key 'tax_credential_mx' for country MX.
3967+
"""
3968+
TAX_CREDENTIAL_MX
3969+
3970+
"""
3971+
Localized field key 'tax_credential_my' for country MY.
3972+
"""
3973+
TAX_CREDENTIAL_MY
3974+
3975+
"""
3976+
Localized field key 'tax_credential_pe' for country PE.
3977+
"""
3978+
TAX_CREDENTIAL_PE
3979+
3980+
"""
3981+
Localized field key 'tax_credential_pt' for country PT.
3982+
"""
3983+
TAX_CREDENTIAL_PT
3984+
3985+
"""
3986+
Localized field key 'tax_credential_py' for country PY.
3987+
"""
3988+
TAX_CREDENTIAL_PY
3989+
3990+
"""
3991+
Localized field key 'tax_credential_tr' for country TR.
3992+
"""
3993+
TAX_CREDENTIAL_TR
3994+
3995+
"""
3996+
Localized field key 'tax_credential_type_co' for country CO.
3997+
"""
3998+
TAX_CREDENTIAL_TYPE_CO
3999+
4000+
"""
4001+
Localized field key 'tax_credential_type_mx' for country MX.
4002+
"""
4003+
TAX_CREDENTIAL_TYPE_MX
4004+
4005+
"""
4006+
Localized field key 'tax_credential_use_mx' for country MX.
4007+
"""
4008+
TAX_CREDENTIAL_USE_MX
4009+
4010+
"""
4011+
Localized field key 'tax_email_it' for country IT.
4012+
"""
4013+
TAX_EMAIL_IT
4014+
}
4015+
37524016
"""
37534017
Represents a mailing address.
37544018
"""

checkout/javascript/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 = "2024-10"
1+
api_version = "2025-01"
22

33
[[extensions]]
44
name = "t:name"

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ schema {
33
mutation: MutationRoot
44
}
55

6+
"""
7+
Scale the Functions resource limits based on the field's length.
8+
"""
9+
directive @scaleLimits(rate: Float!) on FIELD_DEFINITION
10+
611
"""
712
Requires that exactly one field must be supplied and that field must not be `null`.
813
"""
@@ -90,7 +95,7 @@ type Cart {
9095
"""
9196
A list of lines containing information about the items the customer intends to purchase.
9297
"""
93-
lines: [CartLine!]!
98+
lines: [CartLine!]! @scaleLimits(rate: 0.005)
9499
}
95100

96101
"""
@@ -146,7 +151,8 @@ type CartLineCost {
146151
amountPerQuantity: MoneyV2!
147152

148153
"""
149-
The compare at amount of the merchandise line.
154+
The compare at amount of the merchandise line. This value varies depending on
155+
the buyer's identity, and is null when the value is hidden to buyers.
150156
"""
151157
compareAtAmountPerQuantity: MoneyV2
152158

checkout/javascript/cart-transform/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 = "2024-10"
1+
api_version = "2025-01"
22

33
[[extensions]]
44
name = "t:name"

0 commit comments

Comments
 (0)