When deserializing a patch request for relationships you may encounter a payload that does not include any attributes, see https://jsonapi.org/format/#crud-updating-resource-relationships This means that this code will fail: https://github.com/danivek/json-api-serializer/blob/ae86169c67bf4d8c5737a81bd7e87cf1063757f0/lib/JSONAPISerializer.js#L473-L476