Cannot get all product tags from GraphQL API { shop => productTags }

Highlighted
Shopify Partner
21 1 9

It appears that there is no way to pull all product tags from a store with more than 250 product tags when using the

{ shop => productTags } connection.

 

Example GraphQL API call:

{
  shop{
    productTags(first: 250){
      pageInfo{
        hasNextPage
      }
      edges{
        node
        cursor
      }
    }
  }
}

 

Issue #1

{ pageInfo => hasNextPage } always returns false, even if there are more than 250 product tags.

 

Issue #2

The "after" argument is not supported for productTags, so there is no way to pass a cursor to paginate the results, even through you are able to get a "cursor" back in the query result.

 

Issue #3

The "first" argument only accepts a limit of 250. If this limit was increased for this connection, we could at least grab more tags. The query cost is very low which makes me think all of the tags are stored in a simple way, which means we should be able to grab ALL tags for low query cost. A neat suggestion could be a constant that would allow you to pull ALL tags at once. E.g.:

{
  shop{
    productTags(first: ALL){
      edges{
        node
      }
    }
  }
}

 

---

 

These issues would technically apply to the productTypes and productVendors connections as well. But I imagine stores use more tags than those other attributes.

6 Likes
Highlighted

Hi Dan,

 

Did you ever find a solution? Being able to retrieve all unique tags for a shop would be very helpful and I really like your suggestion. 

 

Mariano

3 Revolutions | Guidelines Product Finder App
1 Like
Highlighted
Shopify Expert
2 0 0

Any solution about pagination? 

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1555 81 282

This appears to be an issue, it looks like we missed this. I've reported this as an issue and decided not to lock the thread (bumped after a significant amount of time) since I intend to report back here when a solution is implemented.

1 Like
Highlighted
Excursionist
25 1 7

Amazing to hear!

I hope I had a hand in necro'ing this issue with my new post linking to this and asking about the same issue :)

I look forward to getting this solution from you guys.

Thanks @Alex 

0 Likes
Highlighted
Tourist
12 0 3

@Alex I also have this issue with ProductVendor.  It states next page is false even when there are, and doesn't support the "after" tag.

1 Like
Highlighted
Tourist
8 0 1

Is that fixed ?

1 Like
Highlighted
Shopify Partner
4 0 0

@Alex  Is there any updates about this issue, i see that its already exist on Latest API, RC and the unstable API?

0 Likes
Highlighted
Shopify Partner
129 7 30

Bump. 

 

Still getting complaints from our customers about this Shopify bug. :(

0 Likes
Highlighted

Hey Alex,

It has been over a year and this functionality would extremely valuable to all app developers. Any update from your end? 

0 Likes