title: Excluding results from Objection/Knex query based on withGraphFetched results
body: <p>I have two models in Objection - &quot;brands&quot; and &quot;offers&quot;.</p>
  <p>Brand:</p>
  <pre><code>const { Model } = require('objection')
  
  class Brand extends Model {
    static get tableName() {
      return 'brands'
    }
  
    ...
  
    static get relationMappings() {
      const Offer = require('./offer-model')
  
      return {
        offer: {
          relation: Model.HasManyRelation,
          modelClass: Offer,
          join: { from: 'brands.id', to: 'offers.brand_id' }
        }
      }
    }
  }
  </code></pre>
  <p>Offer:</p>
  <pre><code>const { Model } = require('objection')
  
  class Offer extends Model {
    static get tableName() {
      return 'offers'
    }
  }
  </code></pre>
  <p>A brand has many offers, but I want to get brands which have at least 1 offer using withGraphFetched, excluding brands which have no offers. Here's what I have so far:</p>
  <pre><code>const brandModel = this.objection.models.brand
  const query = brandModel.query().withGraphFetched('offer')
  query.page(page, page_size)
  const offers = await query
  </code></pre>
  <p>This returns the &quot;joined&quot; data, but also returns brands which don't have offers. For example:</p>
  <pre><code>[{
    id:1,
    name: 'brand 1',
    offers: [{offerId: 1, offerName: 'offer 1'}]
  },{
    id:2,
    name: 'brand 2',
    offers: []
  }]
  </code></pre>
  <p>In the above data, I don't want the brand with ID 2 to be in the result set.</p>
  <p>I am using Objection/Knex to paginate the results, so I can't just exclude the brands with empty object arrays after the query has been executed.</p>
  <p>I can achieve this using raw queries, but that means I can't use the Objection dynamic attributes and a few other key parts of Objection.</p>
  <p>Thanks!</p>