DEV Community

Discussion on: 4 reasons why you should use GraphQL over REST APIs

Collapse
 
vladi160 profile image
vladi160 • Edited

This is not true: "REST causes over-fetching or under-fetching".
"In REST you can define the request object on the Backend and in GraphQL you define the object on the Frontend." - what means that ?

Edit:

The heading must be "why you should not use".
Don't use something, just because it is a hype.

The advantages of GraphQL are the same and for REST .
The disadvantages of REST are the same and for GraphQL

  • "Limitations of REST - Over fetching" - then don't over fetching
  • "Limitations of REST - Under fetching" - then don't under fetching

It is just a POST request to the same URL, nothing fancy.
May be, the packages for GraphQL are advantage like state management, but you can use the most popular of them with REST API, too.

Some comments have been hidden by the post's author - find out more