Questions tagged [mongodb-stitch]

For questions related to the MongoDB Stitch Service API.

Stitch allows building an API for a MongoDB back end and other integrated services by concentrating on application logic rather than detail of delivery for data manipulation code.

Documentation is available at https://docs.mongodb.com/stitch/

And there are various tutorials available: https://docs.mongodb.com/stitch/tutorials/

165 questions
0
votes
1 answer

MongoDB - Stitch: Can't make custom user data to appear in userObject.customData

When I log with a user the userObject contains empty customData object despite saving a document in custom data collection pointing to the app user. I tried to follow the documentation: In the Users section of Mongo Stitch panel I enabled custom…
Eggon
  • 2,032
  • 2
  • 19
  • 38
0
votes
1 answer

Importing Exports within extendShinyjs in Shiny Server

I'm using MongoDB Stitch within my Shiny application, and to use my query function, I need to import the Stitch export from the MongoDB Stitch JavaScript SDK. The following is parsed with no issues locally using…
m.yoshih
  • 59
  • 6
0
votes
1 answer

How can I generate a Mongo ObjectId in a Mongo Stitch Function?

I am trying to generate a Mongo ObjectID in a stitch function before object insertion, and keep getting errors. I've tried const _id = ObjectId(); and also const _id = mongoService.ObjectId() and keep getting errors. Is it possible to generate a…
bgmaster
  • 2,313
  • 4
  • 28
  • 41
0
votes
0 answers

BSON.Timestamp conversion issue in Nodejs Mongodb Stitch?

I am using stitch function to get the last 7 days from event collection.below is my code.this is execute in stitch function. exports = async function() { var events = context.services.get("mongodb-atlas").db("utilo").collection("events"); var today…
0
votes
1 answer

MongoDB Stitch - How to keep datatype to int when decremented with update?

I am using mongodb stitch function, I have two collections like communities and posts. when i inserted a new document in post collection, we need to increment +1 a summary.postCount in communities collection.when i updated the status to deleted in…
Ramesh Reddy
  • 127
  • 2
  • 13
0
votes
1 answer

Create a collection in mongodb stitch app

Is there a way to create a collection in MongoDB stitch app in react-native. I tried the normal MongoDB way const stitchClient = Stitch.getAppClient(myAppID); const mongodb = stitchClient.getServiceClient(RemoteMongoClient.factory,…
calebdeji
  • 11
  • 4
0
votes
1 answer

MongoDB Stitch - How to keep datatype to int (without changing to double) when incremented with update?

I am using stitch in mongodb. In stitch, i write one nodejs function for increment and decrements purpose. if(changeEvent.fullDocument.type == 'article' || changeEvent.fullDocument.type == 'poll' ) { context.functions.execute("notifyTopic",…
Ramesh Reddy
  • 127
  • 2
  • 13
0
votes
1 answer

Unable to Load Library mongo_embedded

I am trying to use MongoDB in an Android project by following this guide: https://docs.mongodb.com/stitch/mongodb/find-documents-in-mongodb/ But the application is crashing at the following line: val mongoClient =…
uniQ
  • 115
  • 2
  • 16
0
votes
1 answer

Query and Sorting collection MongoDB Stitch

I am using react native and mongoDB stitch. My intention is, when I run query with a keyword, the result should be sorted with most match with keyword, As example, If I search for Aqua, the result should be sorted as Aqua Aquae Aquatica Aquatica…
Shaon Debnath
  • 95
  • 2
  • 10
0
votes
1 answer

How do MongoDB Stitch SDK's work in regards to client instantiation or how does Stitch.defaultAppClient.getServiceClient work?

I'm using expo to build out a React Native application and I'm running into issues when attempting to write code that accesses remote MongoDB servers. I'm attempting to use MongoDB's provided Stitch SDK's for React Native. When running const…
0
votes
0 answers

MongoDB Stitch Custom User Data

I am trying to experiment with MongoDB and MongoDB Stitch for mobile applications. I want to have user authentication and store a few details in MongoDB Atlas. Having a look at the documentations there is information about Custom User Data:…
uniQ
  • 115
  • 2
  • 16
0
votes
2 answers

How to get Jest to see the functions I am writing for MongoDB Stitch?

I am trying out Stitch, a serverless/hosted JavaScript environment from MongoDB. My main purpose is to help me learn modern JavaScript, but I am trying to write a useful app as well. I have written the following function, and saved it in my Stitch…
halfer
  • 19,824
  • 17
  • 99
  • 186
0
votes
1 answer

Mongodb Stitch realtime watch

What I intend to achieve is some sort of "live query" functionality. So far I've tried using the "watch" method. According to the documentation: You can open a stream of changes that match a filter by calling collection.watch(delegate:) with a…
Kisinga
  • 1,640
  • 18
  • 27
0
votes
1 answer

Connect to Stitch with React Native

I try to initialize a Stitch default app client, but I always get an error when initializing the client. Here is my code : import React from 'react'; import {View, Text, SafeAreaView} from 'react-native'; import {Stitch, AnonymousCredential} from…
Eric
  • 592
  • 10
  • 26
0
votes
1 answer

insertOne saves numeric values of object as string?

I am sending an object from Google Apps Script through a webhook to Mongo Stitch (with a http service). The input object is {A=185, B=8, C=200} and once inserted into the DB it becomes {A="185", B="8", C="200"}. How do I avoid the numbers being…
jlo
  • 2,157
  • 2
  • 17
  • 23