MongoDB Realm is a serverless platform and mobile database. MongoDB Stitch and Realm Database are now part of MongoDB Realm.
Questions tagged [mongodb-realm]
114 questions
2
votes
1 answer
Convert a Set to a Realm MutableSet
I am sure there is a really simple way to do this but just stumped. Trying to take a string list of comma separated values and put into a Realm MutableSet. Have used the approach below but doesn't seem very elegant. eg "name1, name2, name3".…

DavidS
- 520
- 1
- 4
- 13
2
votes
0 answers
Invalid session Error while trying to retrieve data using MongoDB Realm
I got this error while i tried to print a collection from MongoDB Realm database
INVALID_SESSION(realm::app::ServiceError:2): invalid session: access
token expired
Here is my code :
Realm.init(this);
app = new App(new…

Elhannaoui
- 23
- 3
2
votes
1 answer
MongoDB atlas trigger - execution time limit exceeded
I'm testing out a trigger on MongoDB atlas which runs a Realm function for adding an object to Algolia index upon insertion to the MongoDB collection. In my case the record gets uploaded to Algolia index successfully but the function doesn't stop…

cmgchess
- 7,996
- 37
- 44
- 62
2
votes
1 answer
How to see if Realm ObjectId equals String (JavaScript)
I'm using MongoDB's Realm and trying to see if an ObjectId is equal to a string with the same characters. I've tried casting the ObjectId to a string and vice versa, but No matter what I try, it doesn't see them as equal even though the values are…

Josh
- 51
- 1
2
votes
2 answers
How to check if the logged-in Realm user logged in via "Sign in with Apple"?
The alternative title is "How to check the logged-in Realm user logged in via certain authentication provider?" OR "How to check a user is using a specific authentication provider/method?"
For an app start with an anonymous user and then linked to…

XY L
- 25,431
- 14
- 84
- 143
2
votes
1 answer
Data type for an array of Object in realm - react-native realm
I'm using realm for Javascript using React-native
I want to generate a realm schema to hold an array of Object as this:
arrayOfObj:[{ key1:1111, key2:2222, key3:333 }]
What I have tried so far is using the mixed type in my schema
const mySchema =…

Amani
- 227
- 1
- 10
2
votes
0 answers
Correct data for realm decimal128 data type
I'm storing currency data in mongodb-realm.
This is my schema:
const Products = {
name: "Products",
properties: {
_id: "objectId",
price: {type: "decimal128", default:"3.1" },
}
}
When running my app I'm getting this…

Amani
- 227
- 1
- 10
2
votes
1 answer
How to automatically login users after Email/Password authentication
I'm currently building a blog sample app, using NextJS, ApolloClient and MongoDB + MongoRealm. The NextJS skeleton was built after the framework's official page tutorial.
At the moment, new users can signup, by accessing a SignUp form which is…

Balada Rock
- 33
- 7
2
votes
0 answers
Schema changes to an active MongoDB Realm Sync
I'm new to MongoDB Realm and hence experimenting with it. From what I've seen is that I can't modify the Realm Schema (except for when in Development mode!) from the Realm UI without terminating and restarting the Realm Sync process.
My concern is…

Siddharth Kamaria
- 2,448
- 2
- 17
- 37
2
votes
0 answers
How to create nested arrays in MongoDB Realm?
I'm creating a webapp that uses geojson data. I want to store this data in MongoDB Atlas and access it through a MongoDB Realm. I followed the official MongoDB Documentation. The problem is that when I create a schema for my collection, the…
user7270034
2
votes
1 answer
MongoDB Realm vs. Stitch login times - why is Realm so slow?
I've built a web tool using MongoDB databases hosted on Atlas, connected via Stitch. From what I understand, Stitch is now depreciated and has been turned into MongoDB Realm. So I tried to update my site, using the new Realm App instead of Stitch.…

CharlesT
- 93
- 7
2
votes
0 answers
MongoDB Realm GraphQL - returning multiple types as custom payload in a custom resolver
I am currently exploring MongoDB Realm, more specifically the GraphQL integration. I have successfully created resolvers which return a specific type, or an array of one type. However, I can't figure out how to return arrays of multiple types...
I…

Pinkney
- 134
- 1
- 6
2
votes
1 answer
How to avoid CORS issues when connecting to MongoDB Realm GraphQL endpoint with Axios?
I have a test database in MongoDB Atlas. Using the MongoDB Realm service, I've been able to set up a GraphQL endpoint for the database.
I can run queries internally with their sandbox (GraphiQL).
After configuring the API key auth…

Soviut
- 88,194
- 49
- 192
- 260
2
votes
1 answer
Swift : How to merge two Realm Results in on in swift
I am querying realm for two different keywords then I want to merge those two realm result into one so I loop through its.
I have this Object descendent class:
class Item: Object {
@objc dynamic var _id: ObjectId? = nil
@objc dynamic var…

e.iluf
- 1,389
- 5
- 27
- 69
2
votes
0 answers
How to restore User on Page reload in MongoDB Realm + VueJS App
I use MongoDB Realm Client SDK in Javascript to login and get user info.
But on page reload user has to login again. I tried to store the user object in localstorage but I don't see any methods or functions to assign this info back to the Realm…

user1880312
- 131
- 6