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
So if you ever call serializerFor() yourself, without passing through serialize(), you get stale state in your serializer instance, including queryParams and the like. 😑 (Specifically, you get data from the last thing that was passed through SerializerRegistry.serialize().)
And by that point it's probably trying to include an association that doesn't even exist on the model for the records you passed it, and you get an explosion.
The text was updated successfully, but these errors were encountered:
The song goes a little like this.
this.request
prop on itself when you callserialize()
on it.serializerFor()
on it, it uses that savedthis.request
state to instantiate the serializer.serializerFor()
yourself, without passing throughserialize()
, you get stale state in your serializer instance, including queryParams and the like. 😑 (Specifically, you get data from the last thing that was passed throughSerializerRegistry.serialize()
.)FunctionRouteHandler.serialize()
callsSerializerRegistry.serializerFor()
if you pass it an explicit serializer type.serializer.serialize()
...this.request
prop that was populated when it was instantiated to answer things likegetQueryParamIncludes()
.The text was updated successfully, but these errors were encountered: