Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add the watch functionality too #2

Open
kasir-barati opened this issue Aug 14, 2021 · 0 comments
Open

Please add the watch functionality too #2

kasir-barati opened this issue Aug 14, 2021 · 0 comments

Comments

@kasir-barati
Copy link

Hi, you miss the watch/change stream functionality. please add it. When I do this:

const userChangeStream = UserModel.watch();

userChangeStream.on('change', async (doc) => {
     if (doc.operationType === 'update') {
          console.log(doc.documentKey._id.toHexString()); // Object is of type 'unknown'.
     }
}

What can I do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant