{"action":"created","issue":{"url":"https://api.github.com/repos/emberjs/data/issues/1945","repository_url":"https://api.github.com/repos/emberjs/data","labels_url":"https://api.github.com/repos/emberjs/data/issues/1945/labels{/name}","comments_url":"https://api.github.com/repos/emberjs/data/issues/1945/comments","events_url":"https://api.github.com/repos/emberjs/data/issues/1945/events","html_url":"https://github.com/emberjs/data/issues/1945","id":33547272,"number":1945,"title":"Allow Store#pushPayload to delete records in store","user":{"login":"nixpulvis","id":715947,"avatar_url":"https://avatars.githubusercontent.com/u/715947?v=3","gravatar_id":"","url":"https://api.github.com/users/nixpulvis","html_url":"https://github.com/nixpulvis","followers_url":"https://api.github.com/users/nixpulvis/followers","following_url":"https://api.github.com/users/nixpulvis/following{/other_user}","gists_url":"https://api.github.com/users/nixpulvis/gists{/gist_id}","starred_url":"https://api.github.com/users/nixpulvis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nixpulvis/subscriptions","organizations_url":"https://api.github.com/users/nixpulvis/orgs","repos_url":"https://api.github.com/users/nixpulvis/repos","events_url":"https://api.github.com/users/nixpulvis/events{/privacy}","received_events_url":"https://api.github.com/users/nixpulvis/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/emberjs/data/labels/Review%20for%201.0","name":"Review for 1.0","color":"006b75"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2014-05-15T01:01:17Z","updated_at":"2016-10-23T12:16:37Z","closed_at":null,"body":"It would be nice to allow the deletion of records via a specially formatted message passed to `Store#pushPayload`. This would allow api designers to send a message for a record indicating it was deleted.\r\n\r\nThe use case for this for me at the moment is for integration with WebSockets. I'm building an adapter which calls `pushPayload` when it receives a message.\r\n\r\n```js\r\nvar _this = this;\r\nvar socket = new WebSocket('ws://' + window.location.host + '/api/v1/events/doors');\r\nsocket.onmessage = function(event) {\r\n  _this.get('store').pushPayload('door', JSON.parse(event.data));\r\n}\r\n```\r\n\r\nMaybe sending a message like\r\n\r\n```json\r\n{\r\n  \"post\": { \"id\": \"1\" },\r\n  \"_method\": \"delete\"\r\n}\r\n```\r\n\r\nAllowing this to also remove records would be awesome."},"comment":{"url":"https://api.github.com/repos/emberjs/data/issues/comments/255585436","html_url":"https://github.com/emberjs/data/issues/1945#issuecomment-255585436","issue_url":"https://api.github.com/repos/emberjs/data/issues/1945","id":255585436,"user":{"login":"pangratz","id":341877,"avatar_url":"https://avatars.githubusercontent.com/u/341877?v=3","gravatar_id":"","url":"https://api.github.com/users/pangratz","html_url":"https://github.com/pangratz","followers_url":"https://api.github.com/users/pangratz/followers","following_url":"https://api.github.com/users/pangratz/following{/other_user}","gists_url":"https://api.github.com/users/pangratz/gists{/gist_id}","starred_url":"https://api.github.com/users/pangratz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pangratz/subscriptions","organizations_url":"https://api.github.com/users/pangratz/orgs","repos_url":"https://api.github.com/users/pangratz/repos","events_url":"https://api.github.com/users/pangratz/events{/privacy}","received_events_url":"https://api.github.com/users/pangratz/received_events","type":"User","site_admin":false},"created_at":"2016-10-23T12:16:37Z","updated_at":"2016-10-23T12:16:37Z","body":"@Asherlc, yep. Having such a functionality defined in JSON-API at first would definitely help this issue being moved forward.\r\n\r\nhttps://github.com/json-api/json-api/issues/795#issuecomment-240385923 is a relevant comment."}}
{"actor":{"display_login":"pangratz"}}