Resource Picker not returning new collections

Package: @shopify/app-bridge-react
Version: 4.2.0

Problem
Today I noticed that any new collections I create do not seem to be showing in the Resource Picker in App Bridge. Old collections I created a while ago are still showing, but any new ones do not seem to show.

For example, here is a screenshot of some collections in Shopify admin. The highlighted ones are some that I just created:

Here is the the Resource Picker in our app, only showing collections that were created weeks ago (the new ones just created are not showing):

In addition to the above, the new collections DO show if I search for them in the Resource Picker search box:

Also, I created these new collections and I’ve waited a couple of hours to see if there was just a delay in collections syncing across, but this hasn’t resolved the issue.

Thank you so much,
Adam Wooding

Please don’t hijack other peoples posts.

It seems like new collections are getting hidden for some reason. They show up when I set the filter option hidden as false in the resource picker following this docs

Sorry, first time here

Hi @adamwooding

I’m not exactly sure why these would be appearing as hidden, but if you follow the approach that @Estiak shared above, are the new collections appearing?

Hey @Liam-Shopify and @Estiak ! Thank you so, so much for your replies and suggestions.

Unfortunately, in our testing the issue is still unresolved.

We did test with Estiak’s suggestions but unfortunately no luck. Please see below screenshots:

At the moment, any new collections that merchants create are not displaying in the collection picker, which means that merchants are not able to select newly created collections.

Any advice or assistance would be very much appreciated :folded_hands:t5:

Hi,

We solved the issue by adding a new filter to refresh the cache.

...
filter: {
  hidden: false,
  query: `timestamp:${Date.now()}`,
}
...
2 Likes

Hi @Rex , @Liam-Shopify and @Estiak ,

Thank you all very much for your help and support with this. We realised that the Resource Picker, with type: 'collection' does not seem to re-fetch the collection list each time it’s loaded.

So even though we were adding new collections the Resource Picker was just opening each time and showing a cached list.

By implementing @Rex solution of adding the query: timestamp:${Date.now()}, to the filter, it forces the Resource Picker to fetch the latest collection list on each load.

Thank you so much!

1 Like

Glad we figured this out - thanks @Rex for posting this solution!!

1 Like

I don’t think this is a solution @Liam-Shopify. New collections should show up in the resource picker the next time the picker is opened, you shouldn’t need to break the cache through creating a timestamped query.

1 Like

Thanks so much @bkspace - I agree, the query: timestamp:${Date.now()}, is a hacky workaround and I do think that new collections should just show without having to break the cache.