I am using the same exact query, parameters, except with differing “first” amount.
x-request-id: 344489ca-1254-42b5-9c10-6b4c683663ba-1743531803
When the first is set to just 20 , no results are returned (but the pageInfo hasNextPage is true)
x-request-id : e8da295d-ef4a-4aa0-bb7c-3d077918830f-1743531880
When first is set to a higher amount like 200, results are returned, but it returned less than 200 result (about 150 ish), and the pageInfo hasNextPage is true
I would like request just 20 result at a time due to rate limit concern, but it seems like no result is returned if I use a small amount of “first” , is this output intended from Shopify? Is there any workaround for this?
Hey @soulchild,
can you share a specific API call and the corresponding response?
Kevin 
Hi Kevin,
This happened on one of my customer’s store, sorry I am not able to divulge the whole API response publicly (I wasn’t able to replicate on my own test store), but I will mention the API URL, and input queries.
The API endpoint is admin/api/2025-01/graphql.json
I am trying to loop through all productVariants that belongs to a collection, and I am using the endcursor from the pageInfo , to start the pagination for the subsequent calls (using the $vcursor variable)
query($vcursor: String) {
productVariants(query: "collection:435226214617", after: $vcursor, sortKey: TITLE, first: 200){
pageInfo {
hasNextPage
startCursor
endCursor
}
edges {
cursor
node {
id
}
}
}
}
I noticed that after several iteration (with first set to “20”), the “edges” started return empty, and the pageInfo startCursor and endCursor become null, but hasNextPage is true.
If I tried to set the “first” to 200, about 155 results are returned.
Hey @soulchild
Could you try removing the sortKey
parameter completely and see if that resolves the pagination issue? Since you’re filtering by collection and sorting by TITLE, this mismatch might be causing the inconsistent results.
From the docs:
Sort the underlying list using a key. If your query is slow or returns an error, then try specifying a sort key that matches the field used in the search.
If removing the sort key doesn’t resolve the issue, this could be related to the product index in the store. In that case, please reach out to our support team directly as we have specific tools that can help resync the product index, which often clears up these types of inconsistencies.
Hi @KyleG-Shopify ,
I have tried removing sortKey parameter, and the same issue still occur
first set to 10
first set to 100
In that case, please reach out to our support team directly as we have specific tools that can help resync the product index, which often clears up these types of inconsistencies.
Can you elaborate more on the “support team” ? Do you mean I should inform the merchant to contact Shopify support to resync the product index? Or I should contact partner support? (I dont think there’s any partner support channel other than this forum)
Is there a way for merchant to resync the product index themselves? I am not sure how many merchants are affected, and if there will be future affected merchant, I only knew this because one merchant informed me. I don’t have resources to check if all merchants using my app are affected and ask them to contact support one by one unfortunately
.
Good question. When I’ve seen similar issues, its specific to a single shop not all merchants. Depending on your relationship with the merchant, you can have them reach out. It may be more effective to reach out through your partner account though, as you have more of the API Specific context (link this thread in your communication so they have the context as well).
https://help.shopify.com/en/support/partners
This issue has been re-appearing on at least 3 merchants who are using my app, 2 of which has uninstalled my app due to this issue.
It seems like it is very common for a store to have product index cache issue? I was assured that this is a rare occurrence and can be resolved by asking merchant to contact support, but the product index cache reset takes 1-2 days to complete, and some merchants do not have the patience to wait (for the reset to complete, and also to wait for their turn to reach merchant support) and will just uninstall the app.
It feel very unfair for app developers to being penalized because of a Shopify internal issue