GraphQL Storefront API Updates - April 3, 2020
timestamp1585925640001
Announcement
Enhancement
Storefront API
Bugs Fixed
- An issue where product
description
andrelatedProducts
would sometimes returnnull
when the product was looked up via aroute
has been fixed.
New Features
- The GraphQL Storefront API now supports running requests in the context of channels other than the default channel. See the updated documentation for details and best practices.
- You may now specify a currency when fetching a
prices
node to support multi-currency selling. If no currency is specified, prices will be returned in the store’s default currency. Note that the currency you request must be enabled on the store in order to retrieve prices.
Consider this example query:
query PricesInParticularCurrency {
site {
products(first: 3) {
edges {
cursor
node {
name
prices(currencyCode:EUR) {
price {
value
}
priceRange {
min {
value
}
max {
value
}
}
}
}
}
}
}
}
Deprecations
- The
priceRanges
node has been moved inside of theprices
node, to make it easier to use together with multi-currency. The “standalone”priceRanges
node on theproduct
node has been marked as deprecated and may be removed in a future release.