Sure, the main reason I was thinking about splitting the logic is that, although we are currently only developing an iOS app, at some future point we will likely develop an Android app too. So I thought it would be smart to factor out the specifics of the database interactions into a MongoDB Function or a custom GraphQL query so that this code could be shared between the different apps. There isn’t very much offline functionality we need for the app, so I am now thinking it might make sense to use MongoDB Functions or GraphQL for most interactions, and only Realm Sync when needed for offline functionality.
Do you think that makes sense? Or would there be a better way to abstract away the database interactions code to be used by both an iOS and Android app, while still allowing offline functionality?