Hi there! I started using 5.1.0-alpha02 and everyt...
# store
j
Hi there! I started using 5.1.0-alpha02 and everything went great. I had to fix two minor things, but it was fine: •
ExperimentalStoreApi
package changed • We had a couple of extensions on top of
StoreReadResponse
so I needed to take into account the new types. There was just one thing I'd like to understand around the
Converter
now being exposed to the
Store
. I understand that
fromOutputToLocal
is something that makes sense to the
MutableStore
. But, for the
Store
i was expecting this interface to be something like:
Copy code
fun fromNetworkToLocal(network: Network): Local
fun fromLocalToOutput(local: Local): Output
The most common Use case is to transform
DTO > Entity
and
Entity > Domain
Does it make sense to have separate Converters? One for Store and other for MutableStore?
👀 1
m
Sorry to be slow, very busy and was OOO for a bit. Taking a look 👀
So we can't separate converters without making a significant change to the existing Store internals, because
RealMutableStore
delegates to
RealStore
(providing
Converter
instance)
If I'm understanding correctly, you can handle those conversions in your
SourceOfTruth
bindings
j
Yeah… that is exactly what we are currently doing Having said that… maybe the Store shouldn’t have this converter exposed But thank you for your input!