GraphQL says, "Hey, you have one chance at shooting this shot. You can only call my phone once. So when will it be?" However, REST API says, "Baby, you can call me as many times as you want. I don't bite." Say, for example, you want to fetch a ...
oluwatomisinlalude.xyz3 min readThere are still things to be mentioned:
Rest has no dependencies, while GrahQL has many. With Rest you show what you want on the server side, which may be safer than GraphQL, since I can enter a page in Javascript and modify the code to make the queries I want. In the end you have to work more with GraphQL
The example is wrong because I would only use one call not 3, that would show everything, while with GraphQL, I only get what I ask for.
Really insightful article, well written.
A quick tip: You might want to consider adding a cover photo?
Peter Thaleikis
Software Engineer and Indie Hacker
Would you usually have a user endpoint which returns all the data for this user?