Skip to content

Filter which properties are shown #259

@OscarGodson

Description

@OscarGodson

Right now I have a CurrentUserModel and a UserModel. the CurrentUserModel is just a UserModel minus properties I don't want to show in responses like group memberships such as user settings like email_notifications. It would be neat if you could do something like:

// UserModel fetches
UserModel.first(id, {
  includes: ['foo', 'bar'],
  properties: {
    hide: ['email_notifications']
  } 
});
// GroupModel fetches with UserModel's being eagerly loaded
GroupModel.first(id, {
  includes: ['users'],
  properties: {
    users: {
     hide: ['email_notifications']
    }
  } 
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions