-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Realm
-
Labels:None
I believe I found an error in the docs for the web SDK. There is a section on "Instantiate a MongoDB connection handle" that has this:
const mongo = app.currentUser.mongoClient(CLUSTER_NAME);
const collection = mongo.db(DATABASE_NAME).collection(COLLECTION_NAME);
However, the CLUSTER_NAME is wrong because it is actually the SERVICE_NAME you have defined in your App Services rather than the actual name of the cluster.
Therefore, with the CLUSTER NAME, you get
With the service name works well.