Skip to content

Filter which properties are shown #259

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']
    }
  } 
});

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions