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?
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.
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.
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 is built upon several core principles:
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.