There is a bug which is still not solved after so many complains about this issue.
{ shop { productTypes (first: 10, after:"cursor") { edges { node cursor } pageInfo { hasNextPage hasPreviousPage } } } }
Hey @tahafarooqui,
I've been able to replicate the issue you describe in #1 and #2. It seems we return PageInfo but don't accept any cursor arguments for that object. I'll be raising this with our developers to clarify the expected behaviour, and I'll post back here once I have an update.
I wasn't able to replicate what you described in your point #3. When I ask for the first 10 results in my test store, I get 10 back as expected. Are you sure the store you're querying has more than 1 product type?
For #4 please note that this isn't mentioned in our documentation and isn't currently expected in the pageInfo response. I will submit feedback to our product teams to have this property added, which will ensure it can be considered for any future changes to the platform. I can't make and promises as to if/when this will be implemented, but I will make sure this information gets to the right people who can make that decision.
JB | Developer Support @ 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 Shopify.dev or the Shopify Web Design and Development Blog
Hello @_JB , is there any news on this subject? We are developing apps that would benefit from this to work, as otherwise you need to cycle through all the products in order to get these infomations.
Any update with this issue?
Currently I have to query with
{
products(first: $limit, after: $cursor){
edges{
node{
tags
},
cursor
},
pageInfo{
hasNextPage
}
}
}
Instead of this:
{
shop{
productTags(first: $limit, cursor: $cursor){
edges{
node
cursor
},
pageInfo{
hasNextPage
}
}
}
}
BTW, I came across a query to /admin/internal/web/graphql/core endpoint.
I was wondering If I could use that in my app? instead of admin/api/2021-01/graphql.json
query ShopProductTags($sort: ShopTagSort) {
shop {
id
allProductTags(sort: $sort)
__typename
}
}
User | Count |
---|---|
13 | |
12 | |
6 | |
6 | |
5 |