im trying to search all products in some store, the piece of code that do that is this:
for(let i = 0; i < 2; i++ ){
resProds[resProds.length] = await client.query({
data: queryProds,
variables: { cursor: cursorProds}
})
cursorProds = resProds[resProds.length - 1].body.data.products.pageInfo.hasNextPage != true ? resProds[resProds.length - 1].body.data.products.pageInfo.endCursor : null
}
the response of this is always the same, it never changes, even if i put the next cursor on cursor as a string, and i dont know why, dont know even how to debug this, could someone help me?