diff --git a/src/Listener/JsonApiListener.php b/src/Listener/JsonApiListener.php index e24d9b25..b7fe5a23 100644 --- a/src/Listener/JsonApiListener.php +++ b/src/Listener/JsonApiListener.php @@ -1341,6 +1341,11 @@ protected function _convertJsonApiDocumentArray(array $document): array { $result = []; + // support deletion of relationships as per https://jsonapi.org/format/#crud-updating-to-one-relationships + if($document['data'] === null) { + return $result; + } + // convert primary resource if (array_key_exists('id', $document['data'])) { $result['id'] = $document['data']['id'];