GraphQL Storefront API Updates - April 3, 2020
1585925640001
Announcement
Enhancement
Storefront API
Bugs Fixed
- An issue where product
descriptionandrelatedProductswould sometimes returnnullwhen the product was looked up via aroutehas 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
pricesnode 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
priceRangesnode has been moved inside of thepricesnode, to make it easier to use together with multi-currency. The “standalone”priceRangesnode on theproductnode has been marked as deprecated and may be removed in a future release.
