konecty / Konecty

Konecty Open source Tech Business Platform
https://konecty.com
GNU Affero General Public License v3.0
19 stars 8 forks source link

improve find to get more fields from lookups #69

Open marcusdemoura opened 10 months ago

marcusdemoura commented 10 months ago

When querying the scope of lookups is very limited could be possible to list the field inside plan and konecty makes the lookup:

fields: ['code', 'plan.permissions', 'plan.expiration']

{
  _id: 'sample-1',
  plan: {
     _id: 'sample-2-plan',
     code: 123,
     name: 'Sample plan'
     permissions: ['permission-1', 'permission-2'],
     expiration: date
  }
}

at least the SDK could abstract the secondary queries.