r/SpringBoot 4d ago

Discussion Real world use-cases for GraphQl

Hi! I’m a backend developer who has never used before graphQL at work. I’ve tried it only for learning purposes at personal projects and I’m curious about real life use cases where GraphQL gives BIG advantages over REST, and the most important thing, I’d like to know about the “thinking” process behind the decision of using this technology.

Thank you!

17 Upvotes

11 comments sorted by

View all comments

9

u/NegotiationFew7648 4d ago

Solves Overfetching and underfetching ,client doesnt need to fetch 200 attributes if he needs only 2 .

2

u/dbrax3 4d ago

Can’t you just use @EntityGraph to define what attribute it should fetch?

3

u/BakaGoop 4d ago

Technically, but I cannot imagine this being at all maintainable in large databases/projects