Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-4073

Investigate NODE-4072 - Update Change Stream example used by docs

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Not Needed

      NODE-4072 Description

      What problem are you facing?

      We received feedback from an external user on the Node example for resumeAfter in Change Streams where the user stated that:

      collection.watch(
      { resumeAfter: resumeToken }
      
      );
      

      is incorrect, and instead the example should be:

      collection.watch(undefined,
      { resumeAfter: resumeToken }
      
      );
      

      They say they ran into this issue on node mongodb@4.4.1 with typescript. Here's a link to the docs ticket with their comment: https://jira.mongodb.org/browse/DOCSP-21313.

      After discussing with bailey.pearson, it sounds like we actually want the example to be:

      collection.watch([], { resumeAfter: resumeToken })
      

      Can we please update this example used by the documentation team?
      https://github.com/mongodb/node-mongodb-native/blob/main/test/integration/node-specific/examples/change_streams.test.js#L131

      Thank you!

      What driver and relevant dependency versions are you using?

      node mongodb@4.4.1 with typescript

      Steps to reproduce?

            Assignee:
            Unassigned Unassigned
            Reporter:
            dbeng-pm-bot PM Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: