Hey everyone,
Today, we published a first technical preview of the new Apollo data stack we are working on! We’re super excited about Apollo and what it means for modern application development in general, and for Meteor apps in particular.
I’m posting here to explain what Apollo is and how it fits with Meteor (for a lot of you this part will be familiar ground), and to give you some hints about how to experiment with Apollo in your existing Meteor app if you feel like trying new things.
SQL for Meteor
By far the most common feature request we hear for the Meteor framework is better support for different data sources, mainly referring to SQL databases and REST endpoints, but also other backends such as Redis and RethinkDB. Investigations into how to best support these backends, discussions about challenges developers face with Meteor’s current Livedata stack, and writing the Meteor Guide led us to realize the next generation data layer in Meteor will need to involve richer subscription semantics—something like GraphQL.
The Apollo project was born from the idea that a Meteor-like data system can be expanded to all backends via GraphQL. Although it’s easy to see Apollo as Livedata 2.0, we’ve given it it’s own name and identity as we realize that the problems it’s going to solve are not unique to Meteor developers, and we want to drive adoption across the JavaScript community.
If you’d like to hear more about the motivations behind Apollo, Sashko’s recent Meteor Night talk and accompanying blog post are a great place to start.
Trying out the Apollo alpha in a Meteor app
Apollo is incrementally adoptable in any JavaScript app, so it’s possible to use it alongside Livedata today in a Meteor app today. You don’t need to change anything about your existing data fetching logic now to take advantage of Apollo for part of your client and server.
Read the docs here: http://docs.apollostack.com/apollo-client/meteor.html
In particular, if you’re using Methods to fetch data non-reactively or you’re syncing data from other sources like REST APIs and SQL into MongoDB, then you might want to look more closely at Apollo now. Over the coming weeks and months, you can expect more guidance about the best way to run Apollo alongside DDP in an existing Meteor application.
Remember of course that Apollo is still in a very early stage of development, and we are going to be actively working on new features and improvements, including support for reactive queries. If this sounds like what you need, and you are thinking of using it in a serious production application, please get in touch as we’d love to hear about what you are doing, and make sure we can prioritize development accordingly!