GraphQL Storefront API Updates - December 11th, 2019
timestamp1576088760001
Storefront API
Announcement
Enhancement
We’re excited to announce several improvements to the GraphQL Storefront API!
Bugs Fixed
- An issue which prevented looking up products on the
product
node via parent SKU code when the product had variants was fixed.
Enhancements
- The query complexity has been adjusted to allow requesting a similar number of individual
product
nodes as you can request products via theproducts
node, which is useful for asking for many “refined” products at once - for example, many products with selected option values. - The performance of product fetches has been slightly improved.
New Features
- An improved product options interface has been created as the
productOptions
node on a product. This improved node supports returning more granular detail on product options, such as their configuration detail or extended detail of option values. This release is focused on providing the full details on Swatch options.
Consider this query:
query ProductsWithImagesAndSwatches {
site {
product(entityId: 77) {
name
productOptions {
edges {
node {
displayName
... on MultipleChoiceOption {
displayStyle
values {
edges {
node {
label
... on SwatchOptionValue {
hexColors
imageUrl(width: 200)
}
}
}
}
}
}
}
}
}
}
}
Detail for all of the possible product option types will be added in future releases.