Open damienpontifex opened 3 years ago
Note for future: This feature request would have to be balanced against the need to sync the models by their relationship dependencies. In the above example, if "Song" has a 1:many relationship with "SongLyrics", then we'd have to sync SongLyrics first, regardless of their relative priorities, in order to maintain referential integrity.
Seems to have a similar desired outcome as #1106
Seems to have a similar desired outcome as #1106
I don't follow that, except insofar as the desired outcome is "all my data syncs"? It seems that #1106 is related to a max subscription error, as opposed to this request being about prioritizing subscriptions so they can be fulfilled in a customizable order.
I'd also like this... I thought I could create something similar with sync expressions (basically return a predicate like model.keys.owner == ready?userId:"bogus"
), but that doesn't seem to work due to https://github.com/aws-amplify/amplify-ios/issues/1177
This would be super useful and I don't see a way to work around it.
This issue is stale because it has been open for 14 days with no activity. Please, provide an update or it will be automatically closed in 7 days.
This would be ideal. In our scenario, one of our most necessary items is the User table. This table doesn't have any dependencies but gets relegated to the end of the sync due to the alphabetical sort in the sortByDependencyOrder method. It would be great if this initial sorting was adapted to utilize a user-preference priority as suggested here.
Anything that can be done to help progress this?
This is definitely a recurring issue for our users as they switch phones, receive app updates with new schemas, etc. The more data they accrue the longer they have to wait until the app can be used since we must wait until user and profile are synced. Add in data sync only running in the foreground and you end up with a decent number of people that call in frustrated.
I wonder if there could be some sort of config option that we could make to to eg. mark certain models to be synced in batches. Say eg. models that do not have relationships could be batched, and the onees with relationship woul still rely on one-by-one syncing...
Is your feature request related to a problem? Please describe.
Some of our models are essential for display on the initial screen a user sees. Other data is more of a nice to have as it requires deeper navigation. Equally some of this deeper data is significantly larger.
Syncing seems to happen all together, or maybe indeterminate is a better way to describe it
Describe the solution you'd like We'd want to define a high, medium and low priority of model entities as they'd be synced.
Say it was a music app where we sync song names and for whatever reason, their lyrics are a separate model. Something like
To also be clear, we still want to sync all the data, just that some of it would be preferable to be available ASAP vs others at the background rate would be fine
Describe alternatives you've considered N/A