3 ms·
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
by jjzhiyuan 4y ago
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).
- doctor_eval 4y agoGraphQL 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.
- eurasiantiger 4y agoIf you’re writing resolvers manually for something like this, your stack sucks. Use federation.
- doctor_eval 4y agoEdit: I meant to say "can't" change.