bradraj app.store.all
is sort of a fancy alias for app.request
to /api/{model}s
+ app.store.pushObject
, so it will obviously not be available before app.request
.
If you need this data on every page load, before the first page has been rendered, what you probably want instead is pre-loaded data. You could add a new relationship on the forum virtual model, which lets you access your models. That's how the original version of FoF Terms worked for example, though it has now been changed to only load terms when the terms modal appears. I can't think if any current example.
Alternatively if you need your data for a specific page, you could extend the page oninit
hook. If you have multiple pages, you can extend the parent Page.oninit
then check which page has been loaded and have a flag that tells you whether your data was already loaded in this browser tab. Or hook into the page resolver for the same effect.