Thursday, December 13, 2018

How Facebook Made a Universal Open Source Language for the Web

In the last couple of years in my job at the TSX, I had to learn a bit about REST and some other methods for querying data. If I was still working, it probably wouldn't have been long before I encountered GraphQL, an open source query language invented at Facebook. I can understand the need for it; it seems a bit like DITA for data.

Wired has an article explaining what QraphQL is and how it came to be.
The diversity of languages creates a need for a lingua franca that applications can use to talk to one another, regardless of the language used to create them. For example, the mobile version of a travel app might need to extract a flight schedule or upload changes to your profile on a server running software written in a different programming language. Meanwhile, application developers increasingly outsource parts of their software to cloud services that handle tasks such as sending text messages; the companies offering those services need to make them compatible with multiple programming languages.
Historically, that lingua franca has been something called REST, short for "representational state transfer," a simple but sometimes blunt approach to sharing information between applications and servers. But a more flexible alternative called Graph Query Language, developed by Facebook, is spreading fast and has won over companies ranging from GitHub to Audi.
I'm not surprised that GraphQL was developed at Facebook, given the size of the Facebook user base and the amount of data that a typical Facebook page must handle. It makes sense that they would need a tool that can create leaner data queries than legacy tools like SQL and REST. I am a bit surprised that they made it open source, given some of the other news about the company, but it's a good thing that they did, even if it means that technical writers are going to have to learn how to document yet another API.

No comments: