You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While upgrading to Ember-data 1.13 I received this error:
serializer.normalizePayload has been deprecated. Please use serializer.normalizeResponse with the new Serializer API to modify the payload.
So I began replacing it as suggested, however during testing I discovered that normalizePayload was previously called via store.pushPayload, but normalizeResponse is not. So those cases where I manually push a payload (eg sockets/realtime) I manually need to normalize first.
Is this intended?
The text was updated successfully, but these errors were encountered:
@esbanarango I ended up overriding the pushPayload in my serializer and manually calling it.
// app/serializers/application.js
import Ember from 'ember';
export default DS.RESTSerializer.extend({
// If someone invokes push payload, we want to be sure the data is normalized
pushPayload(store, payload) {
payload = this._normalizePayloadData(store, payload);
return this._super(store, payload);
}
});
I'd love it if a member of the DS team would weigh in on this. I doubt that this solution would be endorsed.
While upgrading to Ember-data 1.13 I received this error:
So I began replacing it as suggested, however during testing I discovered that
normalizePayload
was previously called viastore.pushPayload
, butnormalizeResponse
is not. So those cases where I manually push a payload (eg sockets/realtime) I manually need to normalize first.Is this intended?
The text was updated successfully, but these errors were encountered: