-
- Notifications
You must be signed in to change notification settings - Fork 159
Closed
Labels
Description
When I patch to an endpoint the relationship returns data: [], which isn't always true.
For example, if I had ingredients and recipes, I query for recipes?include=ingredients and I will get the included ingredients as expected.
However, if I PATCH to recipe, the relationship returns an empty array, even though relationships exist
For example:
{ "data":{ "attributes":{ "id":203, "title":"Cake", }, "relationships":{ "ingredients":{ "links":{...}, "data":[ ] <------- Shouldn't be empty or present? } }, "type":"recipes", "id":"203" } } In my case I'm building an ember app, so ember thinks that the relationships just magically disappear and content on the page will disappear on update.