henvo / ra-jsonapi-client

JSON API data provider for react-admin.
MIT License
72 stars 70 forks source link

Modifying relationships #10

Open shadowhand opened 5 years ago

shadowhand commented 5 years ago

The current implementation doesn't handle modifying resources that have relations, because it submits related references in data.attributes instead of data.relationships.

For instance, assigning a post to an author should submit something like:

{data: {type: "posts", attributes: { ... }, relationships: {author: {data: {id: "1"}}}}

Refs #8

henvo commented 5 years ago

Hey @shadowhand thank you for your input!

I will have a look into this as soon as I have some time left.

But nonetheless pull requests are always welcome!