I was wondering if it was possible to create a Meteor collection that I could publish to, but where there is no collection created in my Mongo DB. I just want something that I can do custom publications to like:
What is described in the guide is what I am doing. I have it all working. But with those examples, a collection in my database is created. What I want to know is how to create a Meteor collection (via Mongo.Collection) without having a collection created in my database, while also being able to do a custom publication with it.
Got it, sorry I missed that. I don’t think you can get away from creating the Collection (unless you’re creating a local/unmanaged collection). You might want to consider replacing your pub/sub approach with a Method call (that pulls from your external API) that feeds into a local Collection. Another option is to consider using Apollo.
We considered using a method, but we want to be able to use fast render for this. We also just like the idea of keeping our data access APIs consistent.
Apollo will have to wait, unfortunately. We don’t have the time to do it now.
Guess we will just have to leave an empty collection in our DB… not really a big deal, just feels wrong.