-
Notifications
You must be signed in to change notification settings - Fork 35
Closed
Description
The current documentation on SyncManager's pull() method implementation says the following:
The code example is misleading and contradicting the text above because:
- it uses
lastFinishedSyncStartto limit the returned result set (i.e. the returned items will be different than the full data set for the collection) and - it returns
{ items: data }which is expected to return the full data set for the collection (the SyncManager internally does a snapshot comparison to find the delta b/w the current collection and the returned collection)
Implementing the above example leads to SyncManager emptying the local collection after a 2nd sync when nothing has changed on the backend.
IMHO, the example should be updated to show both cases:
- when using the
lastFinishedSyncStartto get only the changes (added, modified, removed) and then return{ changes } - when not using
lastFinishedSyncStartto get all items in the collection and then return{ items }
Metadata
Metadata
Assignees
Labels
No labels
