DEV Community

loading...

Discussion on: GraphQL or gRPC in Java

Collapse
anaktas profile image
Anastasios • Edited

From my experience while using both of them, in the company in which I currently work, we use GraphQL and gRPC exactly as you concluded in your article. We use gRPC for the communication between API gateways and microservices (or even between microservices in some cases) and GraphQL as the backend for the mobile platforms. We try to utilize gRPC on the mobile platforms for some functionalities, but unfortunately there is no related swift library for gRPC, but on android it is available both for java and kotlin. Moreover, HTTP/2 is not widely adopted yet, thus trying to use it for fronted communication will not always leverage the pros of the HTTP/2.

Just a small correction, GraphQL is not based on REST at all. Every request is a POST request in a single endpoint. This is a major drawback since web caching doesn't work (although, there are plenty other ways to cache, either on client side, or in server side).

Collapse
jufab profile image
Julien Fabre Author

Thanks for your comment and thanks to confirm my conclusion :-)

You right about REST... I wanted to talk about schema not REST! There is only one ressource with one verb (POST) as you say (and as i say operate on a single endpoint...)

I'm going to change that, it's so wrong :-)