Hey!
Currently I am developing a solution to push payload collection data to meteor. In my current state the Server already returns JSON data to the client when rendering a route. The data is in the following format:
{
myCollection: [
{
_id: 'document-id',
...otherProperties,
},
],
}
When I know do a MyCollection.findOne() of course the client returns undefined because I dont do a subscription on client side. So its understandable why its undefined. But my goal is that Meteor now has a document on client without doing a subscription.
So I am looking for a client side method which would get executed before Meteor.startup and would be like:
Meteor.addCollectionPayloadData('myCollection', [{
_id: 'document-id',
...otherProperties,
},]);
Something like this. I hope you understand what I am looking for. What would be the Meteor-Way to solve this?