-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Description
Thank you for making and publishing this hook. Saved me a ton of time and head scratching trying to other hooks and code to fetch associated data.
Have a request if you think worthy. How about an array on the target include that allows us to specify which fields to return? My postgres is a quite complex multi-tenant with a lot of relationships and useless associations and other fields that in these associations that is not relevant to the the response I need to return to the app.
I can discard the unnecessary data in an after hook but in my case would need to update and maintain 80+ tables - this option would save a ton of time and makes sense re: efficiency and compressing the response....
Whaddyathink?
const options = {
include: {
service: 'phones',
nameAs: 'phone',
keyHere: 'default_phone_id',
keyThere: 'id'
fields: ['name', 'number', 'extension', 'e164'] <-------- this
}
}
mikestefanello
Metadata
Metadata
Assignees
Labels
No labels