Edit in GitHubLog an issue

Product interface implementations

Adobe Commerce and Magento Open Source provides multiple product types, and most of these product types have specialized attributes that are not defined in the [ProductInterface(https://developer.adobe.com/commerce/webapi/graphql-api/index.html#definition-ProductInterface)].

Product typeImplementsHas product-specific attributes?
Yes
Yes
Yes
Yes
Yes
No
No

Query for product-specific attributes

To return attributes that are specific to a product type, append a structure similar to the following to the end of the Products output object:

Copied to your clipboard
... on <ProductType> {
items{
<ProductType-attribute1>
<ProductType-attribute2>
...
}
}

For example, to return GroupedProduct attributes, construct your query like this:

Copied to your clipboard
{
products(filter:
{sku: {eq: "24-WG085_Group"}}
)
{
items {
uid
name
sku
__typename
... on GroupedProduct {
items{
qty
position
product{
sku
name
__typename
url_key
}
}
}
}
}
}
Copied to your clipboard
{
"data": {
"products": {
"items": [
{
"uid": "NDU=",
"name": "Set of Sprite Yoga Straps",
"sku": "24-WG085_Group",
"__typename": "GroupedProduct",
"items": [
{
"qty": 0,
"position": 0,
"product": {
"sku": "24-WG085",
"name": "Sprite Yoga Strap 6 foot",
"__typename": "SimpleProduct",
"url_key": "sprite-yoga-strap-6-foot"
}
},
{
"qty": 0,
"position": 1,
"product": {
"sku": "24-WG086",
"name": "Sprite Yoga Strap 8 foot",
"__typename": "SimpleProduct",
"url_key": "sprite-yoga-strap-8-foot"
}
},
{
"qty": 0,
"position": 2,
"product": {
"sku": "24-WG087",
"name": "Sprite Yoga Strap 10 foot",
"__typename": "SimpleProduct",
"url_key": "sprite-yoga-strap-10-foot"
}
}
]
}
]
}
}
}
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.