Update Change Stream example used by docs

XMLWordPrintableJSON

    • 1
    • None
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      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
              Reporter:
              Jeffrey Allen
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: