Development discussions around Shopify APIs
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.
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
Any solution about pagination?
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.
Alex | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
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
@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.
Is that fixed ?
@Alex Is there any updates about this issue, i see that its already exist on Latest API, RC and the unstable API?
Bump.
Still getting complaints from our customers about this Shopify bug. 😞
Hey Alex,
It has been over a year and this functionality would extremely valuable to all app developers. Any update from your end?
We have solved this issue by creating a template that loops through all tags and collections and renders a list of all unique tags and collections.
Thanks @power777 . We also have a similar solution where we loop through all products and construct the set of unique tags. We have had it for years and works well, but as we are getting larger and larger customers it is becoming less efficient and it would be nice to have a simple API call that would return all unique tags.
I had the same issue with ProductVendors and solved it the same way. Pulling all 30K products and getting their vendors, then recording the distinct list of vendors. I hit throttling 10-12X during this process because I am pulling all orders. It sure would be nice to be able to use the GraphiQL API as it was designed vs. having to draw down thousands of rows and sift through them.
Also need this!! This seems like very basic functionality that Shopify should be able to implement
@Alex please let us know if this work is in progress
Could also use this. Any chance of adding cursor field and after argument customerTags and productTags?
Hi @Alex , Shopify
Did you got any resolution from dev team. We need badly pagination option.
My 2nd day as Shopify API developer and I already need this feature implemented 🙂
I need this feature as well. Please!
Hi @Alex,
Could you give us any news ?
It seems that on version 2021-10 this does not work either.
Please let us know.
All the best 😉
User | RANK |
---|---|
12 | |
6 | |
5 | |
5 | |
5 |
Learn these 5 things I had to learn the hard way with starting and running my own business
By Kitana Jan 27, 2023Would you love to unleash the unbridled power of the Google Shopping Channel into your sho...
By Gabe Jan 6, 2023How can you turn a hobby into a career? That’s what Emmanuel did while working as a wa...
By Skye Dec 30, 2022