PHP 7.3 reached end of support in December 2021 and Adobe Commerce 2.3.x reaches end of support in September 2022. You may want to consider planning your upgrade now to Adobe Commerce 2.4.x and PHP 7.4.x to help maintain PCI compliance.
Virtual product data types
The VirtualProduct
data type implements the following interfaces:
All VirtualProduct
attributes are defined in the implemented interfaces.
Sample Query
The following products
query returns information about a virtual product.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{
products(
filter: {
sku: {
eq: "test-virtual-product"
}
}
) {
items {
sku
__typename
id
name
categories {
id
name
path
}
price_range {
minimum_price {
final_price {
currency
value
}
}
maximum_price {
final_price {
currency
value
}
}
}
stock_status
}
}
}
Response
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{
"data": {
"products": {
"items": [
{
"sku": "test-virtual-product",
"__typename": "VirtualProduct",
"id": 2047,
"name": "Test Virtual Product",
"categories": [
{
"id": 37,
"name": "Sale",
"path": "1/2/37"
}
],
"price_range": {
"minimum_price": {
"final_price": {
"currency": "USD",
"value": 123
}
},
"maximum_price": {
"final_price": {
"currency": "USD",
"value": 123
}
}
},
"stock_status": "IN_STOCK"
}
]
}
}
}