Reply to post:

GraphQL a cut above the REST, say query lang's fans: Airbnb, Knotel, others embrace the tech

Tom 38

GraphQL is like an aggregator of databases - many (maybe most? I haven't seen enough personally..) are backed by an RDBMS. The benefit of GraphQL is that you describe the data that is available and define how to get it from various data stores on the backend, and then the frontend user has more flexibility in requesting what data they are interested in for that specific page. The aggregator is then responsible for assembling the pieces of information and returning it all back to the client in one response. A typical REST service architecture (say a forum), you might make a request to get info on the user, one for their posts, one for their friends, etc etc. With graphql, that's one query, even if those things live in different data stores.

The benefit is that you have one language for making these requests and that you make fewer requests in order to get the information that the frontend needs. Frontend devs only need to know what data is available from GraphQL, and backend devs only need to be able to describe that data to the aggregator.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon