When querying variants with productVariants, variants with selling plans return a count of 0 for sellingPlanGroupsCount, even when you can see the sellingPlanGroups have nodes.
Is this a bug, or have I misunderstood sellingPlanGroupsCount?
Example pictured here:
Query:
{
productVariant1: productVariant(
id: "gid://shopify/ProductVariant/40292651761828"
) {
id
title
sellingPlanGroupsCount {
count
precision
}
sellingPlanGroups(first: 10) {
edges {
node {
name
}
}
}
}
productVariant2: productVariant(
id: "gid://shopify/ProductVariant/40292651827364"
) {
id
title
sellingPlanGroupsCount {
count
precision
}
sellingPlanGroups(first: 10) {
edges {
node {
name
}
}
}
}
productVariant3: productVariant(
id: "gid://shopify/ProductVariant/42379248533668"
) {
id
title
sellingPlanGroupsCount {
count
precision
}
sellingPlanGroups(first: 10) {
edges {
node {
name
}
}
}
}
}
Response:
{
"data": {
"productVariant1": {
"id": "gid://shopify/ProductVariant/40292651761828",
"title": "xs",
"sellingPlanGroupsCount": {
"count": 0,
"precision": "EXACT"
},
"sellingPlanGroups": {
"edges": [
{
"node": {
"name": "Subscribe and save"
}
}
]
}
},
"productVariant2": {
"id": "gid://shopify/ProductVariant/40292651827364",
"title": "small",
"sellingPlanGroupsCount": {
"count": 0,
"precision": "EXACT"
},
"sellingPlanGroups": {
"edges": [
{
"node": {
"name": "Subscribe and save"
}
}
]
}
},
"productVariant3": {
"id": "gid://shopify/ProductVariant/42379248533668",
"title": "Default Title",
"sellingPlanGroupsCount": {
"count": 0,
"precision": "EXACT"
},
"sellingPlanGroups": {
"edges": []
}
}
},
"extensions": {
"cost": {
"requestedQueryCost": 24,
"actualQueryCost": 14,
"throttleStatus": {
"maximumAvailable": 2000,
"currentlyAvailable": 1986,
"restoreRate": 100
}
}
}
}