Solved

Storefront API misbehaving on old apps

polguixe
Shopify Partner
18 1 4

We have realized that some apps are not responding as expected recently.

 

Query used:

 

query ProductsWithQuery {
  collection(handle: "test") {
    products(first: 200) {
      edges {
        node {
          id
          handle
          variants(first: 10) {
            edges {
              node {
                id
                quantityAvailable
                image {
                  url
                }
                price {
                  amount
                }
              }
            }
          }
        }
      }
      pageInfo {
        hasNextPage
        hasPreviousPage
      }
    }
  }
}

 

For the same store, we have 2 apps:

  • Old app: created circa 2020 - It was created as a private app and then converted to a custom app.
  • New app: created today.

Both apps have the same permissions, and executing the query above, we see this difference on the number of results:

  • Old app: 14 products.
  • New app: 86 products - full list.

All products are available and enabled on the respective sales channels.

 

Our theory is that old apps may have a different behaviour to new app. Could this be the case?

 

New app:

Screenshot 2023-05-30 at 21.18.14.png

 

Old app:

Screenshot 2023-05-30 at 21.26.34.png

 

 

 

https://origen.studio
Accepted Solution (1)

polguixe
Shopify Partner
18 1 4

This is an accepted solution.

Ok, so on our side we have solved it by creating new apps. As it is a web app the token can be refreshed easily. 

 

In the case of the native apps, this solution is less ideal, and it is more on Shopify's side to solve it. 

https://origen.studio

View solution in original post

Replies 4 (4)

paddymac
Shopify Partner
2 0 4

@polguixe a very similar situation has just happened to our app today, 30th May 2023.


We use the storefront api to query products in collections from our native mobile apps. Its a very simple query:

query AllProducts 
{ 
  collection(handle: \"framed-prints\") 
    { 
      handle title products(first: 10) 
      { 
        edges 
        { 
          node 
          { 
            handle 
          }
        }
      }
    }
}

 

Using our existing storefront api access token no products get returned. This just start happening today as up until now it was working.

I created a new app with the same access scopes and with the new access token products are being returned correctly. Somehow Shopify have caused old apps to stop returning products!

Our big issue is that our customer's iOS and Android apps use the existing token, getting these updated will be very disruptive. 

Can someone in the Shopify tech team look into this issue please?


codrindiaconu
Shopify Partner
1 0 1

I have reported something similar on the 8th and then again on the 16th. On both occasions the issue seems to have self resolved within an hour or so. You can follow the discussion on discord here https://discord.com/channels/842813079926603828/877582067750305832/1105172770091978822

 

Essentially this has been ongoing for some time but today it never ended up recovering. I ended up creating an new access token, thank you @paddymac , and i got my hydrogen app working but not fully since there's no way to have a new private token and a new public token.

polguixe
Shopify Partner
18 1 4

This is an accepted solution.

Ok, so on our side we have solved it by creating new apps. As it is a web app the token can be refreshed easily. 

 

In the case of the native apps, this solution is less ideal, and it is more on Shopify's side to solve it. 

https://origen.studio
F24s
Shopify Partner
3 1 0

When we had a problem with retrieving all the products in a collection (some recent, some old) we solved it by creating new products and variants for the old products. So this does seem to work not just for new apps but for new content (in our case products). I would like to hear from a Shopify official about why this happens, and how they plan to resolve it.