What Is GraphQL? REST vs. GraphQL

  Рет қаралды 368,616

ByteByteGo

ByteByteGo

Жыл бұрын

To get better at system design, subscribe to our weekly newsletter: bit.ly/3tfAlYD
Checkout our bestselling System Design Interview books:
Volume 1: amzn.to/3Ou7gkd
Volume 2: amzn.to/3HqGozy
ABOUT US:
Covering topics and trends in large-scale system design, from the authors of the best-selling System Design Interview series.

Пікірлер: 198
@dmitrylubyanov7277
@dmitrylubyanov7277 Жыл бұрын
Probably the most easy to understand video I've seen about differences between REST and GraphQL. Thank you!
@youngKOkid1
@youngKOkid1 Жыл бұрын
GraphQL seems like an ambitious & interesting idea, as well as a horrendous footgun. Thanks for the wonderful explanation as always!
@Necessaryy
@Necessaryy Жыл бұрын
The graphics and animations are simply next level.
@golden_smiles
@golden_smiles 10 ай бұрын
It is most quick , constructive and comprehensive essence of knowledge without any extra BS payload like memes and distracting videos. Thank you, sir.
@icycounter-strikeandleague8431
@icycounter-strikeandleague8431 Ай бұрын
Did you just roast fireship?
@MrPilz28
@MrPilz28 Жыл бұрын
Great work as always ! I'm really impressed by the quality of your slides
@casual_sky2
@casual_sky2 Жыл бұрын
This is a fantastic video! Thanks for the comparisons, it really helped me understand what was going on. I was having trouble understanding the concepts seeing as not many people explain it this simply and I didn't have time to dig into the documentation... Thanks a lot. I'll be sharing this video for anybody else who needs a quick, no fuss intro to graphql.
@molomekeys3938
@molomekeys3938 Жыл бұрын
the work on animation is incredible very inspiring
@ramkanagu
@ramkanagu 11 ай бұрын
Nicely explained! In ten years down the line, GraphQL will be identified as an anti-pattern in the industry. Though it may seem very easy and attractive initially, it would become more complex once the schemas become big. REST is simple and easy to implement. The only caveat with REST is multiple api calls to backend. The better and a traditional approach should be by introducing orchestration services for any frontend that requires more complex data models from the back end.
@GameboyZoneRocks
@GameboyZoneRocks 5 ай бұрын
Can you give an example of orchestration services for frontend which will circumvent GraphQL? Your comment was interesting for me.
@SOMEONE-eq5bu
@SOMEONE-eq5bu Жыл бұрын
That was most well and detailed explanation I've seen Liked and subscribed
@TwoWholeWorms
@TwoWholeWorms Жыл бұрын
Added this to our standard training tools. Brilliant job, looking forward to your future videos! ^^
@chamaraanu
@chamaraanu Жыл бұрын
One of the best videos to grasp the idea of GraphQl.
@goldfishbrainjohn2462
@goldfishbrainjohn2462 Жыл бұрын
I like this channel. Valuable technical system design series.
@khalilshaik6161
@khalilshaik6161 Жыл бұрын
very clear explanation! instantly subscribed!
@RaymondPeckIII
@RaymondPeckIII Жыл бұрын
Interesting. I implemented some similar features in the H2O-3 REST API framework back in 2015. You can white- or black-list fields, and specify which if any child objects to return in the payload, so you didn't have to make many REST requests and assemble an object graph yourself inside the client. The query language was just REST with a couple optional parameters on top of it. It doesn't require a schema (it's schema-on read, with automatically-generated rich metadata for the schemas), or a special query language. You just specify the field paths for any child or grandchild classes you want returned. The API is defined in a very lightweight way, simply by creating a parameterized class for each class in the API. No boilerplate, no IDL.
@zoomzoom1889
@zoomzoom1889 Жыл бұрын
thank you for this! extremally valuable resources, please keeping making this content
@jamesT008
@jamesT008 Жыл бұрын
To the point and precise explanation. Nothing bla bla !! Very nice!
@drift_ah1518
@drift_ah1518 Жыл бұрын
exactly what i thought - nice to spend exactly the minutes required to appraise oneself of a technology. plus i especially liked his no nonsense take on the pros and cons. a really good job/video
@nyplace1
@nyplace1 Жыл бұрын
amazing animations, a very clear explanation, thank you!
@SinnuC
@SinnuC 5 ай бұрын
Complete brief video, thank you!
@taunado
@taunado Жыл бұрын
Beautiful animations and explanation. Thanks.
@juliahuanlingtong6757
@juliahuanlingtong6757 Жыл бұрын
Great piece! Would love to have a piece elaborate on the caching behaviors of HTTP GET leveraged by browser, CDN and servers mentioned in the video.
@matthiasdebernardini3388
@matthiasdebernardini3388 Жыл бұрын
such a great video - love the channel!
@belhamyou2766
@belhamyou2766 8 ай бұрын
Fantastic video, clear and short
@dushyantchaudhry4654
@dushyantchaudhry4654 4 ай бұрын
2:11 to 2:21 a superb concise explanation of the difference.
@jacquesmatike9289
@jacquesmatike9289 Жыл бұрын
Good explanations ... good animations !!
@charuwaka1
@charuwaka1 Жыл бұрын
The way you explained is TOP NOTCH
@JuliLukiKon
@JuliLukiKon Жыл бұрын
Thanks for the explanation! That was very helpful!
@usamesavas9848
@usamesavas9848 Жыл бұрын
Wow, very concise. Thanks for the video.
@PlectrumShorts
@PlectrumShorts 7 ай бұрын
Terrific overview and I *really* appreciate the caveats!
@deepanshukacher1536
@deepanshukacher1536 Жыл бұрын
Really clarify my understanding of their usage
@vskovzgird
@vskovzgird Жыл бұрын
Dude, you are the best. Thanks! Keep it up!
@dhirajnavale3861
@dhirajnavale3861 Жыл бұрын
Finally this video has come 🥳🥳🥳, was waiting for so long. Thank you ❤️❤️❤️
@eminberkay
@eminberkay Жыл бұрын
Excellent explanation, thanks! subscribed 👍
@jashgopani32
@jashgopani32 Жыл бұрын
Amazing video, animatin and presentation!
@aminaomar9173
@aminaomar9173 Жыл бұрын
Thank you for this great explanation.
@angelsancheese
@angelsancheese Жыл бұрын
Thank you for the video! I learned something new
@cold_2477
@cold_2477 Жыл бұрын
What a beautiful and informative video.
@whereispie
@whereispie Жыл бұрын
Nice and stylish tutorial, thanks
@mineralisk
@mineralisk Жыл бұрын
Thanks for the quality content.
@sscapture
@sscapture 2 ай бұрын
Love your videos! Thank you so much!! ❤
@HaroonCodes-fj8mp
@HaroonCodes-fj8mp 14 күн бұрын
Very Well explained.
@julivanespi
@julivanespi Жыл бұрын
great video. easy to understand
@ernestoginotome2453
@ernestoginotome2453 4 ай бұрын
Thank you very much for the explanation.
@pandyaakash5647
@pandyaakash5647 Ай бұрын
Great Job buddy. Impressed
@andriikozakevych5669
@andriikozakevych5669 Жыл бұрын
Great explanation! Clear and easy. Thanks a lot!
@dadno_sound4533
@dadno_sound4533 Жыл бұрын
Learned a lot here!
@tiagosutter8821
@tiagosutter8821 Жыл бұрын
thanks for content! suggestion: Odata, or maybe a video about "Rest vs. Odata vs. GraphQL"
@mohamedk.badenjki8781
@mohamedk.badenjki8781 Жыл бұрын
Thank you for the great video. What tool / software are you using for the video animation?
@salamander1782
@salamander1782 Жыл бұрын
Your videos are a god send
@userss9096
@userss9096 Жыл бұрын
Great explanation!
@Ricardo-fg1bc
@Ricardo-fg1bc Жыл бұрын
your videos are pretty good!! thx
@RafaelCorreaGomes
@RafaelCorreaGomes Жыл бұрын
Amazing, thank you for sharing it!
@alexandervashchuk7795
@alexandervashchuk7795 3 ай бұрын
great breakdown, thanks
@user-rv1bx8hx4v
@user-rv1bx8hx4v 6 ай бұрын
Thank you! Great video.
@user-qy7mb5ho9e
@user-qy7mb5ho9e Жыл бұрын
Fantastic Motion animation btw
@eXit-mm3zg
@eXit-mm3zg Жыл бұрын
Love your videos!
@manu144x
@manu144x Жыл бұрын
It always seemed to me that graphQL is only worth it beyond a certain level of complexity and when you're dealing with an extremely varied array of clients each needing different fields, different data, different implementations. This gives the clients maximum flexibility and you move a lot of the complexity to the client side. If you don't want to implement hundreds of endpoints and API's you just create the graphql middleware, schemas and you're good to go. But security is a big risk, you need to make sure sensible data is not being returned in any way, not to mention you introduce a lot more possibilities for bugs.
@tomu5642514
@tomu5642514 11 ай бұрын
Exactly, for me it's pretty clear that the main use case of graphql it's one where you have as you said a varied array of clients who evolve independently from your api implementation and you have a complex data model that otherwise requires multiple endpoint implementations. Only in this case the tradeoff between this extra layer of complexity and cost it's worth for a business.
@TheRedbeardster
@TheRedbeardster Жыл бұрын
Nice one, thanks!
@user-qy7mb5ho9e
@user-qy7mb5ho9e Жыл бұрын
Thx! So helpful!!
@victormanuelfrancodev
@victormanuelfrancodev Жыл бұрын
Nice explain! thanks
@doronsvable
@doronsvable Жыл бұрын
Thanks Great Explentation
@mitotv6376
@mitotv6376 Жыл бұрын
Nice explanation
@eltreum1
@eltreum1 11 ай бұрын
GraphQL was designed by Facebook to solve over fetching problems aggregating data lakes containing overlapping/duplicate data sometimes from uncontrolled 3rd parties for a global service that processes millions of write and read queries per hour 24/7. It can be useful for taming bloated data lakes or getting more out of old systems. If you are building a new system ground up you probably won't need it unless your data models are very complex with giant records, but probably a just bad design. I have seen startups fail because they wasted time and money on GQL when they didn't really need it or the complexity it adds made getting the service to work well difficult or fragile. Don't engineer like FB and Google until you are that big and make a system that gets the objective work done well and code it so it can grow and modularize later if needed.
@swdRanaP
@swdRanaP Жыл бұрын
which software you use to crate this kind of animation video? please tell me. and thank you so much for shareing this wonderful explanation.
@yp5387
@yp5387 Жыл бұрын
In my company we use GraphQL as primary API and it is not good. We are planning to move everything to REST api. Knowledge gap is the biggest trade off for us. New talent is having hard time wrapping their head around GraphQL queries. REST is pretty simple and easy to understand thus less development time for all the developers.
@alexkey9372
@alexkey9372 Жыл бұрын
same here. biggest mistake we've ever done. REST API is way more mature. when graphql reaches that point then we might re-consider.
@TheVasx
@TheVasx Жыл бұрын
Might be a bit of devs fault. New hire or not, graphql for FE is something you learn in a couple of days if you have some experience
@alexkey9372
@alexkey9372 Жыл бұрын
@@TheVasx in our case, it wasn't the knowledge gap but the performance. all graphql requests are POST, therefore is really hard to cache them. We thought for bigger project would be better, but that was proven to be a naive thought.
@TheVasx
@TheVasx Жыл бұрын
@@alexkey9372 oh yea, if you depend on caching its all a big clusterfuck 🔥🔥
@yp5387
@yp5387 Жыл бұрын
@@TheVasx Agree. And sooner or later, caching will come into the picture for sure.
@mokyyds
@mokyyds Жыл бұрын
Like, your video content is very professional, what software did you use to make the video? thanks
@allezvenga7617
@allezvenga7617 Жыл бұрын
Thanks for your sharing
@michaelcharlesthearchangel
@michaelcharlesthearchangel Жыл бұрын
Nice comparison!
@dungnguyenanh1085
@dungnguyenanh1085 Жыл бұрын
Great video!
@code-tips
@code-tips Жыл бұрын
Nice video 👏👏. Which tool are you using for making such great videos?
@romulosendoromulo
@romulosendoromulo Жыл бұрын
Very nice, thanks!
Жыл бұрын
Great video! But sincerely I would continue to use JSONAPI instead of GraphQL. JSONAPI is super nice, supported by a lot of frameworks and it's build around the specific fields to be fetched just when they are needed... not to mention the pre-build filters that you can specific on your resources and simplify the way you filter for particular records and collections
@sadashivshinde9150
@sadashivshinde9150 Жыл бұрын
Thats the biased devloper inside u
Жыл бұрын
@@sadashivshinde9150 Maybe 😂
@orion.5611
@orion.5611 Жыл бұрын
which good resources are available for learning JSONAPI. i have found a small number and i dont understand it fully
@sourabhjana1278
@sourabhjana1278 9 ай бұрын
cool explaination
@YusanTRusli
@YusanTRusli Жыл бұрын
great video!
@vlog.444
@vlog.444 Жыл бұрын
Super explanation
@thanhsonha7009
@thanhsonha7009 Жыл бұрын
Great Video.
@starkest
@starkest Жыл бұрын
great explanation, as usual
@rahatsshowcase8614
@rahatsshowcase8614 Жыл бұрын
this was best ! because everyone was speaking regarding graphql directly and i was thinking its a sql languange XD
@edwardokech4347
@edwardokech4347 Жыл бұрын
Awesome video...receiving all resources from one request seems great for GraphQL. However, not sure about its security capabilities and the fact caching is a headache. As a lead Engineer, I'll recommend GraphQL for our internal tools still not convinced about using it in our production apps.
@M3t4lstorm
@M3t4lstorm Жыл бұрын
How would GQL differ from a security perspecific than any other HTTP based API...
@semosancus5506
@semosancus5506 Жыл бұрын
@@M3t4lstorm Makes you wonder about the Lead Engineer....
@vitorguidorizzzi7538
@vitorguidorizzzi7538 Жыл бұрын
@@M3t4lstorm Not really a security issue per se, but graphql makes it easier to write very expensive queries, rest can rely on basic rate limiting but graphql also needs to block clients spaming tremendously expensive requests
@thanhauco
@thanhauco Жыл бұрын
Thank you for great video, tRPC is now gaining growth and replace graphql
@virtuoso_hub
@virtuoso_hub 9 ай бұрын
great! how do you prepare your presentations? so beautiful!
@whonayem01
@whonayem01 Жыл бұрын
Thanks
@shutanovac
@shutanovac Жыл бұрын
Frankly I didn't understand the part with the table scan that could bring the DB down. Someone care to elaborate please?
@YBuda101
@YBuda101 Жыл бұрын
I'm not sure what the details are of his example, but as presented, that risk is possible with REST calls too. Unsure why he singled it out as a GraphQL problem
@DF-ss5ep
@DF-ss5ep Жыл бұрын
For example "find a user whose name matches a regex", and the name column in the DB has no index. In practice, I don't think such a query is likely to bring down the entire service, although it's possible. It would depend on how many of these queries are executed. In a bad scenario, all other queries become slow because the DB is overloaded, which causes more and more requests to accumulate, until everything fails. I don't know how GraphQL works, but with simple REST + SQL, you would use the circuit breaker pattern and use a "bouncer" (a proxy) in front of the db
@DF-ss5ep
@DF-ss5ep Жыл бұрын
To be fair, you can also accidentally do a full scan of a table in SQL too. Maybe it's just a bit less likely because developers who build the queries are more aware of what's in it than frontend developers
@yannistheodorakopoulos5916
@yannistheodorakopoulos5916 Жыл бұрын
Totally agree on that. But the main misconception with GraphQL is the following: Maybe this is the biggest mistake in GraphQL implementations. While it is meant to be a form of contract between the client and the server, in which the backend side plays the role of the aggregator that fetches data from different sources, people use it to communicate with the database layer instead.
@kimovitch7
@kimovitch7 5 ай бұрын
@@yannistheodorakopoulos5916 I thought it was obvious that graphql should be used as a backend for frontend more than for data access layer, guess people relying on it to do stuff it's not that good for... Graphql should just stay away from your domain/business layer
@ReflectionOcean
@ReflectionOcean Жыл бұрын
Rest: simple to implement and use, with inefficiency in specific occasions because of multiple API calls required GraphQL: flexible and efficient to use, but complex to implement and use and often relies on extra tools
@Vedarta
@Vedarta Жыл бұрын
Great video, but I don’t see the advantage of GraphQL over JSONAPI. Also, there are several open source implementationsfor JSONAPI. I would only maybe use GraphQL to describe relations not predicted by a JSONAPI REST API, if that much.
@zaxx7884
@zaxx7884 Жыл бұрын
GraphQL is great, but I'm a little worried about the delay when I put NodeJS as BFF in between. How do you all solution?
@nickolaskraus
@nickolaskraus Жыл бұрын
I liked the nod to the SpaceX Dragon capsule in the GraphQL schema 😏
@Lost1nTranslation
@Lost1nTranslation Жыл бұрын
Nice video
@chackokabraham738
@chackokabraham738 Жыл бұрын
Hey alex, good Video, how ever i have two questions 1. Is Odata and graphql sort of the same I mean you can fetch by the query or am I right in saying that the schema of odata is different and way different than Odata ?? 2. Do we need a specific type of database like a nosql or graph db for querying such information ??
@MythicEcho
@MythicEcho Жыл бұрын
I immediately went to your channel to watch more videos, but the count is very low. But thats the catch, quantity > quality.
@wild_shaman
@wild_shaman Жыл бұрын
GraphQL is a marketing tool. It requires way more server work to be done for really rare usecase. Usually it's better to use json rpc with predefined request differs.
@caro.girlwithflowers
@caro.girlwithflowers Жыл бұрын
good job bro :D
@HANNAHSdigitaldiaries
@HANNAHSdigitaldiaries Жыл бұрын
Is it same persistent tables for GraphQL and REST? If so, can GraphQL guarantee atomic operations across tables?
@vitorguidorizzzi7538
@vitorguidorizzzi7538 Жыл бұрын
graphql is just a specification for http requests, it does not interfere with your tables.
@user-ib1pl5wg5w
@user-ib1pl5wg5w Жыл бұрын
Where are they better to use in terms of safety and cost?
@MarcoLenzo
@MarcoLenzo Жыл бұрын
Which program do you use for animations?
@satish1012
@satish1012 3 ай бұрын
any one understood at 4:21 . What he meant? How does the entire table span occurs?
@marvhan888
@marvhan888 Жыл бұрын
5 star video
@roman3249
@roman3249 Жыл бұрын
In previous video I just watched they told that n+1 problem is a problem of GraphQL approach, in this video they told that n+1 problem is a problem of REST approach 🤯
@ahmedeox
@ahmedeox 5 ай бұрын
how is this in principle different from soap and exchangign wsdl schemas?
@neildutoit5177
@neildutoit5177 Жыл бұрын
What is the GraphQL analogue for HATEOAS? I.e. how do you discover resources?
@oliveryt7168
@oliveryt7168 Жыл бұрын
Important question!
Learn GraphQL In 40 Minutes
39:43
Web Dev Simplified
Рет қаралды 729 М.
GraphQL Crash Course - GraphQL NodeJS
42:31
Piyush Garg
Рет қаралды 73 М.
Countries Treat the Heart of Palestine #countryballs
00:13
CountryZ
Рет қаралды 23 МЛН
FOOTBALL WITH PLAY BUTTONS ▶️❤️ #roadto100million
00:20
Celine Dept
Рет қаралды 20 МЛН
GraphQL vs REST: Which is Better for APIs?
7:31
IBM Technology
Рет қаралды 183 М.
Caching Pitfalls Every Developer Should Know
6:41
ByteByteGo
Рет қаралды 107 М.
How Discord Stores TRILLIONS of Messages
7:11
ByteByteGo
Рет қаралды 153 М.
tRPC, gRPC, GraphQL or REST: when to use what?
10:46
Software Developer Diaries
Рет қаралды 68 М.
SSL, TLS, HTTPS Explained
5:54
ByteByteGo
Рет қаралды 679 М.
System Design: Why is Kafka fast?
5:02
ByteByteGo
Рет қаралды 1 МЛН
The Truth About GraphQL
12:06
Theo - t3․gg
Рет қаралды 93 М.
What is RPC? gRPC Introduction.
6:09
ByteByteGo
Рет қаралды 455 М.
What is GraphQL?
12:03
Hitesh Choudhary
Рет қаралды 194 М.
Countries Treat the Heart of Palestine #countryballs
00:13
CountryZ
Рет қаралды 23 МЛН