Basic Apollo Questions


#1

Background:
I run a number of community based sites using a LEMP framework of sorts. (e.g. https://geoexpat.com ).

I have been looking at Meteor for a while (countless tutorials, books etc) and have been avoiding it, as it essentially is a do-all or nothing type framework for us.

However, with Apollo, I can see us writing some of our framework to output JSON as opposed to HTML and have Apollo consume that and interact with various front ends - Web and mobile.

Questions:

  1. Is my assumption correct? Can I use Apollo to slowly migrate to a more modern nodejs / api driven framework?

  2. JSX / React are a huge learning curve for me. Can I code in simple JS on meteor and connect that to Apollo render using Blaze and expect this approach to stay valid for a couple of years? Or should I bit the bullet and move to JSX / React type code?

  3. I have been using Iron Router in my tutorials. I like the CLI as it creates JS templates into which I can plug code in. Is there something that automates the JSX / React framework if I were to move to it?

  4. How does Meteor / Apollo invalidate data that is provided by a web service? Does Apollo keep polling the data or does Meteor keep polling Apollo?

I understand that this section is very much in the expert domain… but having looked at Apollo from a high level, I feel this is something that will help me make incremental progress towards modernising our site(s) and also creating mobile apps. But need some guidance before I jump in, to make sure I’m not going down a path that is not viable or will not be supported long term.


#2

1 - Yes apollo will allow you to migrate incrementally, it’s in development though.

2 - This one is tough, MDG is focusing a lot more ressources on React and Angular2 integration than Blaze, but I don’t think Blaze is going to be discontinued anytime soon. That said, I moved to React with Meteor a year ago and it’s working pretty well.

3 - I don’t know of any good CLI for React, but the boilerplate is pretty minimal overall.

4 - the goal is to have a diff server, I guess it will be able to push data over websockets but the development hasn’t started yet. At the moment, you can make the apollo client poll the apollo server.

Please someone correct me if I said something wrong.


#3

Thanks.

If I understand 4 correctly the current apollo stack is missing reactivity. For this to happen a diff server of some sort would need to be created.

With the examples that I’m looking at the closest one is the meteor client which talks to apollo / discourse.

For this client to be reactive, would the apollo server need to poll the discourse API or would the meteor client need to poll the apollo server?

I’d think it would be more efficient for Apollo to check the back end data sources and then pass the diffs / changes or a update signal of sorts to the meteor client.

Or am I completely out of sync here with how Apollo and Meteor are supposed to work together?