I am trying to fetch productVariants using GraphQL query. It works fine when I use just the pagination but it does not work when I add the filter product_status. Here are my query and response.
Working Scenario:
Query
query {
productVariants(query: "product_status:ACTIVE,ARCHIVED,DRAFT", first: 5) {
edges {
node {
id
}
}
}
}
Response:
{
"data": {
"productVariants": {
"edges": []
}
},
"extensions": {
"cost": {
"requestedQueryCost": 5,
"actualQueryCost": 2,
"throttleStatus": {
"maximumAvailable": 2000,
"currentlyAvailable": 1998,
"restoreRate": 100
}
}
}
}
I want to filter variants on their parent product’s status.