Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Basic datastore id swap #1066

Merged
merged 10 commits into from
Feb 18, 2021
Merged

Basic datastore id swap #1066

merged 10 commits into from
Feb 18, 2021

Conversation

kingsleyzissou
Copy link
Contributor

Description

  • This is PR restores a basic id swap. It will remove the object with the client ID from the store
    • This won't replace items in the mutation queue that have the client id
  • The mutation queue was missing the ability to stop and restart the queue processor
  • Added manual stop and stop for replication in the example app
Checklist
  • npm test passes
  • npm run build works
  • tests are included
  • documentation is changed or added

@kingsleyzissou
Copy link
Contributor Author

@wtrocki I might actually do a shallow id swap for the items in the mutation queue, but ignore relationships. That will put us in a decent position. After this PR I will do the docs.

@wtrocki
Copy link
Contributor

wtrocki commented Feb 18, 2021

@kingsleyzissou do you mind updating the documentation. I think we could release entire offix after this change. Verification in progress

@kingsleyzissou
Copy link
Contributor Author

@wtrocki did a quick release for this: offix-datastore@0.3.18

@@ -16,6 +16,7 @@ export const EditTodo = ({ todo, toggleEdit }: EditTodoProps) => {
...todo,
title: todo.title,
description: todo.description,
_version: todo._version ?? 2,
Copy link
Contributor

@wtrocki wtrocki Feb 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why 2? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Completely arbitrary :D

@kingsleyzissou kingsleyzissou merged commit 5b0d0f3 into master Feb 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants