-
Notifications
You must be signed in to change notification settings - Fork 641
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
Make identifiers mutable #887
Comments
Thinking about it a bit... This would open up a possibility to support offline capabilities. A model can be assigned a transient ID while its being synced to the backend. It could very well be added to the store, the user would have an instant feedback, and still show some indication that the model has not synced yet. And when it has an ID from the backend it would update the references and clean up. |
@mweststrate did you have a try on this? identifier.ts
object-node.ts
identifier-cache.ts
Heres my test
It throws an exception at |
Any update on this or workaround? |
This is absolutely necessary for offline capabilities. I'll follow this thread closely and I'll try to come up with ideas. The approach of @broncha seems interesting. |
Any workarounds? I'd like to add offline capabilities to a MST app of mine but I'm a bit lost. |
Hey ! Some time elapsed since the last update in this post. Do someone find out a possible workaround ? Maybe for further explanations if it was needed, this feature would be really interesting, as the creator of the post said, for server-side generated IDs. If implemented, this feature will allow models to define a "pushToBackend" action (callable for example with Is this breaking the philosophy of MST ? Thanks for those who will answer ! |
Hi @Grolaf - I don't know of anyone who is working on this particular feature. I haven't thought much about it, myself. If it's something you're very interested in, I'd be happy to see if we can make a plan and maybe put together a PR. I don't know if this breaks any MST philosophy, but I also don't know yet if it doesn't, either, haha. All that to say, I don't have a strong opinion one way or another, I don't think much work is happening on this. Would be open to starting work on it, but I'd want to learn more about the use cases and go about it quite carefully. Sorry it's not a more interesting answer! |
Thank you for answering @coolsoftwaretyler ! I would be happy to do it, but since I don't know about MST code yet, it will take me some time to dive in. I'll do it on my free time and probably try some things. Anyway, I think that I have time as this post is open since 2018 😄 . |
Sounds good! As you make progress will you please respond here so we can coordinate? Thanks! |
Mutating identifiers should be an exception, but potentially it would be nice if it was possible to make sure that we can swap client side identifiers for server side generated ones. Should
The text was updated successfully, but these errors were encountered: