Hacker News new | past | comments | ask | show | jobs | submit login

Yes, by using GraphQL's Query DSL, the client can control what to fetch :) From my opinion, the mainly difference is API Gateway can filter requests and protect the upstream services (GraphQL can't).



GraphQL can totally do these things, with an appropriate resolver. I mean, in the end, anything you can do using REST can be achieved with GraphQL.

But shouldn’t the individual services be protecting themselves?

That said, I think there’s a case for BFFs - even ones implemented in GQL - when there is a need to support devices or customers which you can change, and which may live longer than your API.


Edit: I meant to say "can't" change.


If you’re writing resolvers manually for something like this, your stack sucks. Use federation.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: