Using MongoDB Atlas and Realm

Have anyone tried to use Realm with Elm? What’s the best way to use Ream with Elm? Since it only has native SDK for Node and other platforms (iOS) and Android, namely. Is GraphQL the best way to integrate with Realm, is the Elm GraphQL support mature enough?

I don’t know atlas/realm but elm-graphql is pretty well regarded as a high quality package. I’ve heard people say its “best in class” in regards to graphql+type safety.

2 Likes

Thanks for the tip, Atlas and Realm are MongoDB cloud service that’s good for serverless and hosting, which makes it a good fit for an Elm web app.

However, the available SDK is for mobile apps and also for the Web, that is Javascript: Realm Web Quick Start — MongoDB Realm

I have tried Realm by itself, I can say that the realm-web package’s parts that run on the browser are actually methods that in the end create some JSON and send it with an XMLHttpRequest, so in theory, all the tasks that the realm-web package performs can be performed in Elm, but since the requests are internal API, it might break from time to time. Furthermore, it needs the effort to extract the spec from the package on how to interact with the server.

Given this, in case you are looking to execute native queries instead of GraphQL, I would recommend you use ports instead of trying the above-mentioned process.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.