tRPC, gRPC, GraphQL or REST: when to use what?
70,164
Published 2023-03-19
======⚡⚡⚡======
👉 Host your website for under $2 a month: namecheap.pxf.io/c/3137064/624621/5618
======⚡⚡⚡======
🙌 Become my Patreon and get exclusive perks: patreon.com/softdevdiaries
💼 Follow me on LinkedIn and drop me a message if you'd like: linkedin.com/in/gusgadirov
💻 Also, let's connect on GitHub: github.com/gusgad
📚 Resources:
gRPC explained: • What is RPC? gRPC Introduction.
GraphQL error handling: • GraphQL Error Handling is Painful
And don't forget to subscribe for more videos like t
All Comments (21)
-
finally i understood about how TRPC, GRPC and GRAPHQL works & the concept. great video !
-
Wow thanks, very well explained! Keep it up you do a great job.
-
Thanks for the informative video - when describing REST folks often forget about using ODATA REST endpoint which gives you additional features such as selecting the fileds, the number of records (limit) using query string arguments giving you one additional query layer rather than having to create a bunch of rest endoints in a standard way. The ODATA query params syntax is somewhat ugly but there is editor tooling and plugins available. I mention this because although not as granular as using QL it accomplishes alot of the same requirements
-
this is awesome please never stop posting
-
i already knew everything but could never have explained it so well. huth ab ;)
-
Amazing informative important video !!! You're amazing.
-
A great overview! Thank you!
-
awesome content, thanks!
-
Thanks, well explained.
-
great explanation, thanks
-
A very clear and succinct video on the pros and cons of using tRPC, gRPC, GraphQL, and REST for client/server communication. Thank you, Guseyn {2023-06-28}
-
Great video. Regarding GraphQL: You still have to write the code to get all the data. I think it should be made clear in the video.
-
Not against GraphQL but, in REST you can reques specific fields if you implement filtering (extra parameter for listing the fields you want) and you can get data from other nested resources if you implement extension (extra parameter for listing the objects you want to be extended instead of returning only their Ids). And both patterns can be combined. That also gives you the control on which of those you allow.
-
Seems like gRPC carries the least amount of risk. Less complexity than GraphQL, faster and simpler to reason about, and the highest compatibility across all client types. I can’t get myself psyched about GraphQL, after taking a full course on it and completing a couple corporate projects with it. It just doesn’t do much for you. Another set of schemas in your stack, and you still have to do all the heavy lifting on the backend, on requests. It’s not like it eases the burden of querying your data. It’s decent for integrating disparate services, but it comes with weight and complexity.
-
Great video... I love it
-
Very well explained ❤
-
I think he made at least two mistakes in REST and gRPC talks: 1. In REST you do not need to under/over fetch. You can use query params. 2. In gRPC you do not need to use HTTP2. It's also mostly not supposed by reverse proxies, app gateways and so on. Correct me if I'm wrong please.
-
> as long as you use it perfectly it will work (paraphrased, about GraphQL) Strictly speaking this can be said or anything.
-
Very good points. tRPC is awesome but it’s kinda risky to stick with just typescript. Mobile apps (android and iOS) doesn’t support it. I have built a project with REST api backend and I’m thinking of replacing it with GraphQL. My main concern is the complexity, I guess I can’t have them all XD.
-
Can you create videos on microsecice communications with grpc. Best practices and all.