Realm Object Server, Custom Backend, and Object Validation


Essentially, I have a Rails backend in front of a Postgres DB. The Rails backend contains all the business logic for model validation, etc.

Of course, I intend to duplicate this logic on the client, but you can’t trust the client. What I would like to do is sync the data to the realm server, and then make an API call to my server and attempt to store the object (Using graphQL or something). If the object is invalid, I would like to return an invalid message to the server, and then (for example) delete the invalid object and propagate the error back to the client.

Is this possible? And is this possible with the Postgres Adapter?

I’ve searched through the docs, but if you could point me in the direction I need to go I would really appreciate it.

Thank you.