-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Obtaining the version number of the domain object that was last know to the a client? #1046
Comments
Replicache itself doesn't track a version per domain object -- it thinks of the entire client view as one entity that moves atomically. Replicache does track the version of the client view that it has, and it is sent as the In the row versioning strategy, the cookie is a key to a larger structure stored server side which indeed encodes the version of every entity independently. So if you had the cookie in the push request, and if you were using the Row Versioning strategy or something similar you could know what version of an entity the client made changes to. Sadly, the cookie isn't sent in the push request. Perhaps it should be. But it's easy to workaround this. You can provide a custom pusher and puller implementation. The puller can snarf the cookie out of the response each time a pull is sent and stash it someplace, and the push can add the cookie to the request. |
We're trying to think about conflicts and merge strategies, so we're wondering whether it's possible, during a push, to know the last version number that the client knew a domain object to be in. On the server this would be useful information because if:
Is it possible to obtain this version from the client? Is this something that the client itself must track, maybe by storing it in a mutation?
The text was updated successfully, but these errors were encountered: