#Is it possible to use gRPC as the GraphQL transport between a gateway and microservice

2 messages · Page 1 of 1 (latest)

stray wraith
#

I'm creating a GraphQL federated setup with a gateway and several microservices and have it all working over regular http. I'm wondering if there is any way to use gRPC as the transport between the gateway and services. And would there actually be any benefit to doing it that way or if it is just plain dumb.

heavy echo
#

gRPC and GraphQL are basically the same kind of thing since GraphQL is also a form of RPC.

That being said, you can use resolvers to call your microservices via gRPC. I believe gRPC is also faster than GraphQL. Don't quote me on that though.

And no, it's not dumb at all to use gRPC behind the gateway. The only thing is, you'll be using two different API types. If that isn't an issue, then go for it. 🙂