Allow separate collection types for query and mutation? #894
Unanswered
MartinBernstorff
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi guys!
I'm quite new to frontend, and would like to enforce some rough architecture rules.
My app needs undo/redo functionality, and I want to protect myself and others from accidentally calling the persistence layer without adding a command to the undo/redo stack.
To do this, I've added another "action" layer like so:
This is working wonderfully, enforced with jsboundaries. However, for now, the components also need to depend directly on persistence to be able to do a live query.
I would love if I could expose the read-only parts of the collection to the component-layer, without exposing the mutations (insert, update, delete). Is this possible?
Beta Was this translation helpful? Give feedback.
All reactions