DEV Community

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

Collapse
 
alexneamtu profile image
Alex Neamtu • Edited

What are the disadvantages of graphql? (Nested level count maybe?)

Collapse
 
blessinghirwa profile image
Blessing Hirwa

It has some limitations. One of them is that implementing caching is complicated compared to REST.

Collapse
 
alexneamtu profile image
Alex Neamtu

👍

Thread Thread
 
kitsunde profile image
Kit Sunde

If you have a system with resource policies. Like say level 1 customer support can only see customers numbers, account balances, but not individual orders, PII or inventory levels.

You'll have another kind of fan out complexity since you can just reach across the whole graph, you need to propagate policy decisions in some maintainable manner when the queries aren't just localised to just say the accounts balance endpoint itself.

GraphQL API migrations like renaming fields and restructuring is also left as an exercise to the reader. The answer commonly thrown around is "but you shouldn't", which of course you'll need to eventually have breaking changes it just avoids some struggles of RESTful API's.

All solvable problems obviously, but if you don't already have good answers, but do have a complex domain to deal with I wouldn't try until I understand exactly what I should do.

Thread Thread
 
alexneamtu profile image
Alex Neamtu

I love graphQL, not using it now, but I can't wait to use it again.
What I'm trying to say is that it has its downfalls.

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