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

Update Change Stream example used by docs

    • 1
    • Not Needed

      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:
            daria.pardue@mongodb.com Daria Pardue
            Reporter:
            jeffrey.allen@mongodb.com Jeffrey Allen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: