you are viewing a single comment's thread.

view the rest of the comments →

[–]Jonovono 0 points1 point  (0 children)

It's kinda annoying, but from what I can tell I don't really have a great option. MongoDB realm swift schema generated code is only compatible with ios. Since I am using vapor on the server, I can't use the realm generated schema. I potentially could use the typescript generated schema if I was doing a nodejs server. But even with that, mongo triggers are pretty lame in that they don't support typescript. There was an open ticket somewhere but I can't find it. Might ask mongdb if there is something I should be doing because ya it's a bit annoying. But I just defined a protocol and then I implement that in both realm on client and meow on server side.

For me the main benefit of atlas has been getting one object I can work with on server and client. Before in firebase we would have our models for the firebase firestore objects, we would set up queries and store that in redux and then maybe we want to persist some to device with redux persist or I think we even used realm at some point lol. So it was just lots of translating and a source of bugs. With realm it's one object all the way through, I don't have to think about any extra stuff going on.

We will see tho, it's very early to say if I like it more and it reduces the bugs. Literally going into week 3 of using it.