Below is the code I have tried:
deleteAJobWithEvents(event){
const data = event.store.readQuery({
query: ClientJobsList,
variables: {id:1}
});
data.client.jobs.filter(job => job.id !== 101);
console.log(data);
event.store.writeQuery({ query: ClientJobsList, data});
}
After logging 'data', it displays the same data without any filtering applied
This hint pertains to the structure of the 'data' object
{
"data": {
"client": {
"id": "1",
"client_name": "Marouane",
"jobs": [
{
"id": "101",
"title": "cbkvjk",
"order": 88,
"client_id": "1"
},
.........
]
}
}
}