Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Incorrect type in API response from insertOne #2

@thecodedrift

Description

@thecodedrift

src: https://github.com/taskless/mongo-data-api/blob/972d2b6bedeb4a4806e774510626ab57accae203/src/client.ts#L277

Because mongo-data-api uses EJSON types when talking to a realm app, the inserted ID is automatically upgraded to an ObjectId, not a string.

Workaround: Until fixed, you can forcibly cast into an ObjectId using new ObjectId(str)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions