title: Is it possible to add parameters to an existing Firestore query?
body: <p>Is there a way to modify a Firestore query?</p>
  <p>When I use the code below the query will ignore the <strong>startAfter</strong></p>
  <pre><code>let query = firestore.collection('results')
  .where('groupId', '==', req.query.groupId)
  .where('seasonInfo.roundId', '==', req.query.roundId)
  .orderBy('results.totalPoints', 'desc')
  .orderBy('lastPick', 'asc')
  
  if (req.query.lastPoints &amp;&amp; req.query.lastDate) {
      query.startAfter(parseInt(req.query.lastPoints), req.query.lastDate) 
  }
  const pickDocs = await query.limit(10).get()
  </code></pre>
  <p>So I have to write the whole thing in order to make it work.</p>
  <pre><code>let query = firestore.collection('results')
  .where('groupId', '==', req.query.groupId)
  .where('seasonInfo.roundId', '==', req.query.roundId)
  .orderBy('results.totalPoints', 'desc')
  .orderBy('lastPick', 'asc')
  
  if (req.query.lastPoints &amp;&amp; req.query.lastDate) {
      query = firestore.collection('results')
      .where('groupId', '==', req.query.groupId)
      .where('seasonInfo.roundId', '==', req.query.roundId)
      .orderBy('results.totalPoints', 'desc')
      .orderBy('lastPick', 'asc')
      .startAfter(parseInt(req.query.lastPoints), req.query.lastDate) 
  }
  const pickDocs = await query.limit(10).get()
  </code></pre>
  <p>Is it possible to modify a query without re-entering all data?</p>