The Meteor JavaScript application framework has been making waves in the Node.js community this year. First, at the end of March, it moved to support the Node Package Manager, bringing thousands of popular JavaScript applications into the Meteor stack. Today, the Meteor team announced Apollo, a new application-level query language.
The purpose of Apollo is to bring the gospel of the GraphQL query language to JavaScript developers. For developers working with multiple front ends and using server-side JavaScript, Apollo provides an end-to-end method for querying data on the back end.
(Related: What Meteor’s CEO has to say about JavaScript)
That data is queried in a manner that brings it to the client ready for use, rather than still in need of manipulation and data transformations. GraphQL was built at Facebook, but has since then gathered a large ecosystem of contributors. It is this ecosystem that Meteor hopes to take advantage of by bringing those components and client-side integrations to other JavaScript users.
Apollo consists of a client and server as well. Jonas Helfer, core developer on Meteor.js, wrote about the Apollo server in early April: “Whenever possible, code should be structured in such a way that it is as close as possible to our mental model of it. Every time we have to translate between our code and our mental model, it takes effort. We all know that the way the code looks in our source reflects the way we think about it. If the code is messy and hard to read, it’s much more likely that we’ll be unsure about what exactly it’s doing. That makes the code much harder to debug, and it makes mistakes much more likely. The primary goal of Apollo server should therefore be to make the structure of the code as clear as possible.”
The Apollo Server is capable of handling the data transfers from server to client, and can handle the data transformations that are often required to make that data compatible with the various front ends used across desktop and mobile browsers.
Apollo is currently in alpha, and today marks the first release of the project.