Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Fixed
- Add @coerce Schema directive for surgical per-field scalar coercion

## [2.175.1] - 2026-05-05

### Changed
Expand Down
33 changes: 17 additions & 16 deletions graphql/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ directive @withSegment on FIELD_DEFINITION
directive @withOrderFormId on FIELD_DEFINITION
directive @withCurrentProfile on FIELD_DEFINITION
directive @toVtexAssets on FIELD_DEFINITION
directive @coerce on INPUT_FIELD_DEFINITION | ARGUMENT_DEFINITION

type Query {
"""
Expand Down Expand Up @@ -245,7 +246,7 @@ type Query {
"""
Category id
"""
id: Int
id: Int @coerce
): Category @cacheControl(scope: SEGMENT, maxAge: MEDIUM)

"""
Expand All @@ -255,7 +256,7 @@ type Query {
"""
Category tree level. Default: 3
"""
treeLevel: Int = 3
treeLevel: Int = 3 @coerce
): [Category] @cacheControl(scope: SEGMENT, maxAge: MEDIUM)

"""
Expand All @@ -265,7 +266,7 @@ type Query {
"""
Brand id
"""
id: Int
id: Int @coerce
): Brand @cacheControl(scope: PUBLIC, maxAge: MEDIUM)

"""
Expand All @@ -288,7 +289,7 @@ type Query {
"""
geoCoordinates for freight calculator
"""
geoCoordinates: [String]
geoCoordinates: [String] @coerce
"""
Country of postal code
"""
Expand Down Expand Up @@ -499,30 +500,30 @@ type Query {
"""
Desired latitude coordinate, for example: -22.944370
"""
lat: String!
lat: String! @coerce
"""
Desired longitude coordinate, for example: -43.182553
"""
long: String!
long: String! @coerce
"""
max distance of pickup points from given coordinates, in kilometers, default value 50
"""
maxDistance: Int = 50
): NearPickupPointQueryResponse
skuPickupSLAs(
itemId: String
seller: String
lat: String
long: String
itemId: String @coerce
seller: String @coerce
lat: String @coerce
long: String @coerce
country: String
): [CheckoutSLA]
skuPickupSLA(
itemId: String
seller: String
lat: String
long: String
itemId: String @coerce
seller: String @coerce
lat: String @coerce
long: String @coerce
country: String
pickupId: String
pickupId: String @coerce
): CheckoutSLA
"""
Get pickup point by its id
Expand Down Expand Up @@ -771,7 +772,7 @@ type Mutation {
@deprecated(
reason: "Field is no longer needed. Checkout cookie is automatically taken into account now"
)
itemId: String
itemId: String @coerce
assemblyOptionsId: String
options: [AssemblyOptionInput]
): OrderForm @withOrderFormId @withOwnerId
Expand Down
14 changes: 7 additions & 7 deletions graphql/types/OrderForm.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -186,27 +186,27 @@ type OrderFormShippingData {
scalar InputValues

input OrderFormItemInput {
id: Int
index: Int
quantity: Int
id: Int @coerce
index: Int @coerce
quantity: Int @coerce
seller: ID
inputValues: InputValues
options: [AssemblyOptionInput]
}

input OrderFormAddressInput {
addressId: String
addressId: String @coerce
addressType: String
postalCode: String
postalCode: String @coerce
country: String
receiverName: String
city: String
state: String
street: String
number: String
number: String @coerce
complement: String
neighborhood: String
geoCoordinates: [Float]
geoCoordinates: [Float] @coerce
isDisposable: Boolean
}

Expand Down
4 changes: 2 additions & 2 deletions graphql/types/Product.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -371,10 +371,10 @@ enum CrossSelingInputEnum {
}

input ItemInput {
itemId: ID
itemId: ID @coerce
sellers: [SellerInput]
}

input SellerInput {
sellerId: ID
sellerId: ID @coerce
}
8 changes: 5 additions & 3 deletions graphql/types/Profile.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,12 @@ input AddressInput {
neighborhood: String @sanitize(allowHTMLTags: false, stripIgnoreTag: true)
country: String @sanitize(allowHTMLTags: false, stripIgnoreTag: true)
state: String @sanitize(allowHTMLTags: false, stripIgnoreTag: true)
number: String @sanitize(allowHTMLTags: false, stripIgnoreTag: true)
number: String @coerce @sanitize(allowHTMLTags: false, stripIgnoreTag: true)
street: String @sanitize(allowHTMLTags: false, stripIgnoreTag: true)
geoCoordinates: [Float]
postalCode: String @sanitize(allowHTMLTags: false, stripIgnoreTag: true)
geoCoordinates: [Float] @coerce
postalCode: String
@coerce
@sanitize(allowHTMLTags: false, stripIgnoreTag: true)
city: String @sanitize(allowHTMLTags: false, stripIgnoreTag: true)
reference: String @sanitize(allowHTMLTags: false, stripIgnoreTag: true)
addressName: String @sanitize(allowHTMLTags: false, stripIgnoreTag: true)
Expand Down
6 changes: 3 additions & 3 deletions graphql/types/Shipping.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ type LogisticsItem {
}

input ShippingItem {
id: String
quantity: String
seller: String
id: String @coerce
quantity: String @coerce
seller: String @coerce
}
Loading
Loading