{"action":"created","issue":{"url":"https://api.github.com/repos/emberjs/data/issues/4033","labels_url":"https://api.github.com/repos/emberjs/data/issues/4033/labels{/name}","comments_url":"https://api.github.com/repos/emberjs/data/issues/4033/comments","events_url":"https://api.github.com/repos/emberjs/data/issues/4033/events","html_url":"https://github.com/emberjs/data/pull/4033","id":124241576,"number":4033,"title":"[BUGFIX release] extractMeta impossible to use with JSONSerializer","user":{"login":"raido","id":659945,"avatar_url":"https://avatars.githubusercontent.com/u/659945?v=3","gravatar_id":"","url":"https://api.github.com/users/raido","html_url":"https://github.com/raido","followers_url":"https://api.github.com/users/raido/followers","following_url":"https://api.github.com/users/raido/following{/other_user}","gists_url":"https://api.github.com/users/raido/gists{/gist_id}","starred_url":"https://api.github.com/users/raido/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raido/subscriptions","organizations_url":"https://api.github.com/users/raido/orgs","repos_url":"https://api.github.com/users/raido/repos","events_url":"https://api.github.com/users/raido/events{/privacy}","received_events_url":"https://api.github.com/users/raido/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-12-29T17:23:11Z","updated_at":"2016-01-05T14:07:09Z","closed_at":"2016-01-05T14:07:09Z","pull_request":{"url":"https://api.github.com/repos/emberjs/data/pulls/4033","html_url":"https://github.com/emberjs/data/pull/4033","diff_url":"https://github.com/emberjs/data/pull/4033.diff","patch_url":"https://github.com/emberjs/data/pull/4033.patch"},"body":"When using JSONSerializer it is impossible to extract metadata from query response because when payload is modified in normalizeQueryResponse (or any other hook) the metadata will go missing by the time extractMetadata is called.\r\n\r\nI dug up earlier implementation before v1.13 and back then extractMeta was called before extractQueryResponse etc. methods - https://github.com/emberjs/data/blob/v1.0.0-beta.19.2/packages/ember-data/lib/serializers/json-serializer.js#L763\r\n\r\nWhich means that extractMeta always received unmodified payload. After 1.13 (making it a breaking change in a minor version) this changed, so extractMeta was called in _normalizeResponse method (https://github.com/emberjs/data/blob/v1.13.0/packages/ember-data/lib/serializers/json-serializer.js#L446, https://github.com/emberjs/data/blob/v2.2.1/packages/ember-data/lib/serializers/json-serializer.js#L437), which is the end path for all the normalize(Query/Find) etc. methods. This is the main issue here, because for example if one passes extracted array of records from the payload  to normalizeQueryResponse _super call, then there will no metadata left to extract. \r\n\r\nThis restores previous \"extract\" method implementation logic, where first \"extractMeta\" is called and then \"normalize*\" methods."},"comment":{"url":"https://api.github.com/repos/emberjs/data/issues/comments/169010011","html_url":"https://github.com/emberjs/data/pull/4033#issuecomment-169010011","issue_url":"https://api.github.com/repos/emberjs/data/issues/4033","id":169010011,"user":{"login":"raido","id":659945,"avatar_url":"https://avatars.githubusercontent.com/u/659945?v=3","gravatar_id":"","url":"https://api.github.com/users/raido","html_url":"https://github.com/raido","followers_url":"https://api.github.com/users/raido/followers","following_url":"https://api.github.com/users/raido/following{/other_user}","gists_url":"https://api.github.com/users/raido/gists{/gist_id}","starred_url":"https://api.github.com/users/raido/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raido/subscriptions","organizations_url":"https://api.github.com/users/raido/orgs","repos_url":"https://api.github.com/users/raido/repos","events_url":"https://api.github.com/users/raido/events{/privacy}","received_events_url":"https://api.github.com/users/raido/received_events","type":"User","site_admin":false},"created_at":"2016-01-05T14:07:09Z","updated_at":"2016-01-05T14:07:09Z","body":"There's a clever trick how to have metadata with JSONSerializer - https://ember-twiddle.com/efc6b04753e705b40bbc?openFiles=application.serializer.js%2Cuser.adapter.js"}}