DEV Community

Discussion on: Why do Webdevs keep trying to kill REST?

Collapse
 
bklau2006 profile image
BK Lau • Edited

My own take on REST and GraphQL with analogues from the SQL database world:

REST <---> direct client SELECT query to database
GraphQL <--> a call to stored procedure on database

There are no free lunches. REST is more flexible and simpler but you have to do more work on the client side to merge together data queried from diverse sources.
GraphQL basically delegate the merging work to the server side but some handlers has to do the job. And you need some query/merging schema know-how to do the job.