Skip to content

Exclude data from relationships #252

Closed
@krzkrzkrz

Description

@krzkrzkrz

Couldnt find this in the doc. Wondering if there is a way to exclude the data node from relationships. Especially helpful for has_many associations with a ton of data, which makes the payload even larger.

Instead, have the option to include links.related

Would be nice if there was something like has_many :comments, exclude: [:data], include: [:'links.related']

By links.related in relationships. I mean something like:

"attributes": {
  ...
},
"relationships": {
  "comments": {
    "links": {
      "related": "http://localhost/api/v1/users/1/comments"
    }
},

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