The most popular and comprehensive Open Source ECM platform
GraphQL: Simplifying the Complexity of Large Microservice Projects
GraphQL is a query language used with APIs. It is a concise and flexible query language that lets clients pinpoint and return only required the data. It is interesting because it helps overcome some of these common problems that occur with a REST API architecture:
- Inefficient data loading
- Fixed data structures for communication
- Tedious coding to build and publish API updates
Twitter is an example of one company that has adopted GraphQL. Initially Twitter was written using Ruby-on-Rails, but the implementation grew to an unmanageable state. Then Twitter engineers re-architected the platform to use microservices, but ultimately they made yet another move and decided to use GraphQL.
Steve Cosenza, Twitter Senior staff Engineer, said that “while the microservices approach enabled increased development speeds at first it also resulted in a scattered and disjointed Twitter API. Independent teams designed and built endpoints for their specific use cases with little coordination. This led to fragmentation and, inevitably, a slowing of developer productivity.”
Twitter isn’t the only big tech company that has moved to GraphQL. Netflix and AirBnB are other examples.
Garrett Heinlen, a Netflix software engineer, said that “having this unified graph is going to allow us to answer questions from the product teams that we haven’t been able to answer before because the information was in siloed systems. Now, all the data in your organization is accessible and available, and you just build against it. GraphQL starts teams talking to each other on how they can evolve the schema. It improves the way Front-end and Back-end engineers work together. And it acts as a living source of Documentation for your system.”