title: Pass option { useUnifiedTopology: true } to the MongoClient constructor
body: <p>Does anyone know why I'm still receiving a deprecation warning even though I've already specified <code>useUnifiedTopoology: true</code> in my <code>MongoClient</code> constructor?</p>
  <p>Thank you in advance!</p>
  <pre class="lang-js prettyprint-override"><code>const mongodb = require('mongodb')
  const MongoClient = mongodb.MongoClient
  const connectionURL = 'connectionurl'
  const databaseName = 'db'
  
  const client = new MongoClient(connectionURL, { useNewUrlParser: true, useUnifiedTopology: true});
  
  const insertHandler = async(data, collectionName) =&gt; {
    await client.connect().then(async() =&gt; {
      const collection = client.db(databaseName).collection(collectionName)
      await collection.insertOne(data)
    }).catch(error =&gt; {
      console.log(&quot;Failed to insert:&quot;, error)
    })
  }
  
  module.exports = {
    insertHandler: insertHandler
  }
  </code></pre>
  <p>And I'm getting the following error:</p>
  <pre><code>DeprecationWarning: current Server Discovery and Monitoring engine
  is deprecated, and will be removed in a future version. To use the
  new Server Discover and Monitoring engine, pass option { useUnifiedTopology:
  true } to the MongoClient constructor.
  </code></pre>
  <p><a href="https://i.stack.imgur.com/TZP9j.png" rel="noreferrer"><img src="https://i.stack.imgur.com/TZP9j.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/QKW2Z.png" rel="noreferrer"><img src="https://i.stack.imgur.com/QKW2Z.png" alt="enter image description here" /></a></p>