Trying to pull multiple variants for a given product, when supplying the cursor, the results are the same, and if we loop through this creates an endless loop.
example query and response when running manually in postman
{
product (id: "gid://shopify/Product/6691885514921") {
id
variants (first: 2) {
pageInfo {
hasNextPage
}
edges {
cursor
node {
id
sku
}
}
}
}
}
{
"data": {
"product": {
"id": "gid://shopify/Product/6691885514921",
"variants": {
"pageInfo": {
"hasNextPage": true
},
"edges": [
{
"cursor": "eyJsYXN0X2lkIjozOTcxMjIwMTA0ODIzM30=",
"node": {
"id": "gid://shopify/ProductVariant/39712201048233",
"sku": "CV-13350-P"
}
},
{
"cursor": "eyJsYXN0X2lkIjozOTcxMjIwMTA4MTAwMX0=",
"node": {
"id": "gid://shopify/ProductVariant/39712201081001",
"sku": "CV-13351-P"
}
}
]
}
}
},
"extensions": {
"cost": {
"requestedQueryCost": 5,
"actualQueryCost": 5,
"throttleStatus": {
"maximumAvailable": 1000.0,
"currentlyAvailable": 163,
"restoreRate": 50.0
}
}
}
}
----------------------------------------------
{
product (id: "gid://shopify/Product/6691885514921") {
id
variants (first: 2, after: "eyJsYXN0X2lkIjozOTcxMjIwMTA4MTAwMX0=") {
pageInfo {
hasNextPage
}
edges {
cursor
node {
id
sku
}
}
}
}
}
{
"data": {
"product": {
"id": "gid://shopify/Product/6691885514921",
"variants": {
"pageInfo": {
"hasNextPage": true
},
"edges": [
{
"cursor": "eyJsYXN0X2lkIjozOTcxMjIwMTA0ODIzM30=",
"node": {
"id": "gid://shopify/ProductVariant/39712201048233",
"sku": "CV-13350-P"
}
},
{
"cursor": "eyJsYXN0X2lkIjozOTcxMjIwMTA4MTAwMX0=",
"node": {
"id": "gid://shopify/ProductVariant/39712201081001",
"sku": "CV-13351-P"
}
}
]
}
}
},
"extensions": {
"cost": {
"requestedQueryCost": 5,
"actualQueryCost": 5,
"throttleStatus": {
"maximumAvailable": 1000.0,
"currentlyAvailable": 199,
"restoreRate": 50.0
}
}
}
}