I just checked it with the Ember extension in Chrome and Firefox: After login I have 6 model types with 0 data. After refresh I have 7 model types with a lot of data. But despite 0 data, peekRecord returns a model?
This sounds like an Ember Data bug to me as your code is pretty straightforward and the request is being made the same way in both cases (if i’m understanding that right). In the first case it’s just not being serialized into the store/response array properly. If you haven’t already I’d look at ember data issues and considering opening one. A minimal reproduction would be ideal if you can duplicate this.
Other things you could check off the top of my head:
make sure you only have one version of ember data in your package lock
do you have any code anywhere that’s clearing the store or unloading records?
do you have a custom serializer?
If it were me I’d try and step through the model hook in the debugger, and also step through the ember data serialization guts to see what’s going on and where it’s failing.