GraphQL is an application-level query language that helps clients and servers communicate by establishing a common protocol for queries. It represents an alternative to the REST (REpresentational State Transfer) style: unlike REST, GraphQL gives the client, not the server, the power to define what kind of data will be included in the response to its query.

By now it's become very clear that use of GraphQL is on the rise. Countless businesses in diverse industries, from tech titans to lean startups, have expressed interest in the language. Several key indicators demonstrate just how popular GraphQL has become:

All of this interest is great news for GraphQL developers, and this enthusiasm is really a sign that there was a gap in technology that's being filled by GraphQL. So why is GraphQL so exciting, and where did all of this interest come from?

The Data Loading Problem

Cloud computing services have exploded in popularity in recent years. In turn, the cloud has become an essential part of the applications that run on our smartphones, web browsers and appliances. These applications rely on data from many different sources and databases in order to provide users with the information that they need.

However, fetching this data correctly must be carefully done in order to provide a satisfactory user experience. Your application needs to retrieve only the data that it actually needs in a single round trip or else risk poor performance. In addition, your application might come in several different versions, or be used on several different devices, and needs to maintain its level of performance as updates are rolled out and additional features are added. All of these factors heighten the complexity involved in designing a modern web or phone application that relies on accessing external data stores.

Enter GraphQL

Although many tools and products have attempted to solve this issue, GraphQL is the first truly comprehensive solution to the data loading problem. GraphQL's success can be largely attributed to a combination of three factors: openness, flexibility and power.

  • Openness: GraphQL is an open specification, not a piece of software. This means that it's possible for GraphQL to serve many different needs at once and for an ecosystem to emerge around the standard.
  • Flexibility: GraphQL isn't tied to any particular programming language, database or hosting environment. No matter what your tool set, you can easily start working with GraphQL.
  • Power: GraphQL is a declarative language: Instead of writing code, you write queries. This declarative approach allows you to move complexity out of your code base and into your tooling, which gives you high levels of performance, security and correctness.

GraphQL-First

GraphQL gives you the opportunity to change your software writing process to what's known as a "GraphQL-First" approach. When developing a new feature, a well-formulated GraphQL schema should be at the very center. By abstracting and separating your front end and back end, you now have tremendous flexibility in terms of changing and experimenting with languages, tools, technologies and paradigms.

With a GraphQL-First approach, client developers and service developers can work independently. The client teams can work with a mock schema and build the front end, while the service team can work on the back end and test against the GraphQL API. Once the work is done, the two teams can meet in the middle, confident that the various moving parts will all cooperate.

GitHub is just one example of a company that is now developing software "GraphQL-First." When GitHub developers work on certain new features, they build the GraphQL API first, and then their front-end developers build the user interface for that feature on top of the GraphQL API. One benefit of this approach is that it results in a very consistent and clean API. It also means that developers working with the GitHub API can use the new feature at the same time that it's available internally, providing feature parity between external and internal APIs.

Apollo

Meteor is working on a set of open source GraphQL tools and libraries as part of the Apollo project, including a GraphQL client and JavaScript server implementation. These technologies can be used independently, together, or with other community libraries to build the ideal GraphQL setup for a number of use cases.

Apollo is built upon several core principles:

  • 100 Percent Spec Compliance: Apollo is intended to be completely in line with the standard, avoiding technological lock-in.
  • Collaboration: Apollo is a community effort in which users and developers work together to discuss and construct the future of GraphQL.
  • Independence with interoperability: The various pieces of Apollo are designed to stand alone but also to work well together when the user so chooses.

The Future of GraphQL

2017 seems poised to be the year that GraphQL moves from being a technology to a movement, with the emergence of hundreds of new, useful GraphQL projects and libraries. Thousands of new jobs are requiring GraphQL skills, and more and more companies are moving to a GraphQL-First approach to their software development. Simply put, the future of GraphQL looks bright.