Skip to content

How can my SyncManager pull deletes? #1046

Answered by maxnowack
MechMel asked this question in Q&A
Discussion options

You must be logged in to vote

If the pull method returns an object with the items property, the content of the SignalDB collection will be replaced with this data. This means, if the response doesn't contain a specific item. It will be deleted locally. You could also return an object with a changes property, if you want to control this by yourself.

The pull method must return a promise that resolves to an object with either an items property containing all items that should be applied to the collection or a changes property containing all changes { added: T[], modified: T[], removed: T[] }.

from https://signaldb.js.org/sync/implementation/#implementing-the-pull-method

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by maxnowack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1020 on October 16, 2024 11:18.