Closed kevincrossgrove closed 8 months ago
Was getting an endless loading state in vike-react vike-react-query when using telefunc with MongoDB.
vike-react
vike-react-query
Here is an example
export default async function getEvent(eventCode: string) { const client = new MongoClient(process.env.MONGODB_CONNECTION_STRING || ""); const db = client.db(process.env.MONGODB_DATABASE_NAME); const eventsDB = db.collection("Events"); const event = await eventsDB.findOne<any>({ Code: eventCode, }); return event; }
It can easily be fixed by converting the _id property from an objectID to a string, or delete the _id, filing because there was no error messages
_id
Can you publish a reproduction? That'd be the best. I'll re-open then.
Was getting an endless loading state in
vike-react
vike-react-query
when using telefunc with MongoDB.Here is an example
It can easily be fixed by converting the
_id
property from an objectID to a string, or delete the_id
, filing because there was no error messages