You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to JSON API spec, you can update a relationship by using the "relationships" link ex post/1/relationships/comments.
Currently Devour only allows this through the resource link post/1 by adding the respective relationship object in the data sent to the server.
If we add a method similar in behavior to all and one to the url builder we could allow relationships links to work.
Ex
Hi
According to JSON API spec, you can update a relationship by using the "relationships" link ex
post/1/relationships/comments
.Currently Devour only allows this through the resource link
post/1
by adding the respectiverelationship
object in the data sent to the server.If we add a method similar in behavior to
all
andone
to the url builder we could allowrelationships
links to work.Ex
After this we could do something like
jsonApi.one('post', 1).relationships().all('comments').post([{id: comment1Id}, {id: comment2Id}])
The "relationships" url could be configurable to allow more flexibility.
What do you think?
The text was updated successfully, but these errors were encountered: