marshmallow-jsonapi icon indicating copy to clipboard operation
marshmallow-jsonapi copied to clipboard

Support for Fetching Relationship Responses?

Open coneybeare opened this issue 4 years ago • 0 comments

The JSONAPI spec allows for the querying of relationship level data, but I haven't found any examples in the docs or repo on how best to handle this. It is a little different than a normal query, in that attributes are not included, and the self url is different:

HTTP/1.1 200 OK
Content-Type: application/vnd.api+json

{
  "links": {
    "self": "/articles/1/relationships/author",
    "related": "/articles/1/author"
  },
  "data": {
    "type": "people",
    "id": "12"
  }
}

What is the best way to go about serializing this data using marshmallow-jsonapi?

coneybeare avatar Oct 18 '21 16:10 coneybeare