Even if we transform data as
transform($data){
return ['id' => $data['id']];
}
the response will contain empty attributes object and link object with self-link
like
"data" : {
"type": "users" ,
"id": "55" ,
"attributes": { } ,
"links": {
"self": "http://127.0.0.1:80/users/55"
}
}
There is no way to receive a simple response for request like /articles/1/relationships/author
r like in examples https://jsonapi.org/format/#fetching-relationships
"data" : {"type": "users" , "id": "55" }