mrichar1 / jsonapi-vuex

Use a JSONAPI api with a Vuex store, with data restructuring/normalization.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to update To-Many Relationships?

pharkasbence opened this issue · comments

How can I send a request like this (https://jsonapi.org/format/#crud-updating-to-many-relationships)?

POST /articles/1/relationships/comments HTTP/1.1
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json

{
  "data": [
    { "type": "comments", "id": "123" }
  ]
}

Hi - this is already open as #88 - it's on the todo list! 😃 I'll close this - feel free to add any extra comments on that issue.