vtex-apps / store-graphql

GraphQL schema and resolvers for the VTEX Commerce Stores API
78 stars 45 forks source link

fix: UnitMultiplier type from simulation call is always a float number #661

Closed iago1501 closed 4 months ago

iago1501 commented 4 months ago

What problem is this solving?

Products are allowed to add float values in unitMultiplier, such as kilogram and meter types, for example:

image

How to test it?

Select store-graphql at: Workspace

Query:

query getShippingEstimates(
$items: [ShippingItem]
$postalCode: String
$country: String
) {
shipping(items: $items, postalCode: $postalCode, country: $country) {
items {
id
seller
sellerChain
price
listPrice
sellingPrice
measurementUnit
unitMultiplier
}
logisticsInfo {
itemIndex
slas {
id
friendlyName
price
shippingEstimate
shippingEstimateDate
deliveryChannel
}
}
}
}
{
"items": [
{
"id": "1638431",
"quantity": 1,
"seller": "1"
}
],
"country": "BRA",
"postalCode": "49032-000"
}

Screenshots or example usage:

image

image

Related to / Depends on

Zendesk: #869926

How does this PR make you feel? :link:

vtex-io-ci-cd[bot] commented 4 months ago

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

vtex-io-ci-cd[bot] commented 4 months ago

Your PR has been merged! App is being published. :rocket: Version 2.170.1 → 2.170.2

After the publishing process has been completed (check #vtex-io-releases) and doing A/B tests with the new version, you can deploy your release by running:

vtex deploy vtex.store-graphql@2.170.2

After that your app will be updated on all accounts.

For more information on the deployment process check the docs. :book: