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
Culprit seems to be in packages/serializer/index.js from line 628. The else if(related && related.id) fails when related is null and it then just returns null. I guess the format is also wrong when a belongsTo relationship is found as no {data: ...} is present within the else if either.
Currently an empty belongsTo relationship looks like this in the server response:
While JSON API states the following format must be followed:
The only difference with hasMany relationships is that those must (and do) have a
data: []
instead ofdata: null
.Relevant literature: http://jsonapi.org/format/#document-resource-object-relationships
It also states there that a relationship response must contain at least one of
data
,links
ormeta
.I have not checked if the server handles this correctly when sending a request.
The text was updated successfully, but these errors were encountered: