I’m a little lost on the optimal setup for my app. It’s a simple recipe app, but I want to maintain synchronization across platforms.
My system consists of both Android and IOS apps and a React web app. Initially, I was using Realm only as an on-device database for Android and IOS, and all three apps were interacting with Node to synch data to MongoDB.
I figured I try to get them all synching through Realm Cloud. The mobile apps are now synching to Cloud, but I’m not sure how best to approach Web.
Is it possible to use the Realm package to interact with Cloud from the client? Or would I need to leverage GraphQL? Or do I need to patch everything through my server code (i.e. server receives post call, then posts to Realm Cloud on behalf of client)?
This tutorial seems to suggest that I would be able to add Realm as a client-side dependency. But this is definitely not working for my React app. I’ve been trying for a few days, but the Realm Node package doesn’t seem to like my app.
Alternatively, this post seems to suggest that I need to route data through GraphQL so I can handle subscriptions.
Or, do I just interact with Realm Cloud from my backend? This would seem the most reasonable at the moment, but adds an extra step of communication and forces me to rig up some complicated notifications for when data is changed via mobile and needs to be reflected on web.