Unable to query product variants - when tagged in bulk

Unable to query product variants - when tagged in bulk

ozzyonfire
Shopify Partner
49 2 17

Started seeing this issue pop up yesterday. I am doing a basic query for product variants (query is based on a collection or tag). 

 

When I view these items in the admin interface I can see hundreds of items show up in the list. I use the filter in the UI to setup this view. 

 

However, when I do my graphql query I am only getting ~20 or so items returned to me. 

Screenshot 2023-07-25 at 10.33.15 AM.png

Above - I only asked for 20 products, but I should expect to see hasNextPage to be "true" not false. I've tried to do this using the BulkQuery and just normal queries in GraphQl. 

 

Oddly, if I find an item that isn't returned to me (but should be) I can just go in, make a minor change, and click "Save". After the save, then this product starts to be returned from the query!

 

The way these products were tagged was using the "Add Tags" button under the "..." button on the products page.

Screenshot 2023-07-25 at 12.20.44 PM.png

 

Something is buggy when it comes to this "Add tags" function. Has anyone else run into some strange issues around querying product variants?

 

Obviously this is having a major impact on my stores (and my apps). 

Reply 1 (1)

Etra
Shopify Partner
37 0 19

Has anyone else run into some strange issues around querying product variants?

Yes there have been various strange issues with GraphQL queries for products/variants lately. One was fixed today as we experienced it for our app but there is another one we are experiencing that has not been resolved yet. (Results returned for one specific query but none for the other query. Both are for product but I encountered it for productVariant as well). So strange stuff for sure.

Returns a result:

product(id: $id) {
title
featuredImage {
url
}


Does not return a result:

 

product(id: $id) {
title
featuredImage {
url
}
variants (first: 25) {


---

Of course, the product exists as the first query returns a result and the second one does not.