GraphQL vs REST: Which is Better for APIs?

preview_player
Показать описание

If you're a developer, you're probably familiar with REST APIs, but there's another query language for APIs that you should add to your programming toolkit: GraphQL. In this video, Martin explains the two different approaches these frameworks take for building APIs and compares their strengths and weaknesses. Spoiler alert: It's not an either/or choice, and it's worth knowing both approaches and applying them where it makes the most sense.

#restapi #graphql #query
Рекомендации по теме
Комментарии
Автор

I've got to say, that not only is this is the best breakdown of REST vs GraphQL that I've come across, but also, the best high-level overview /explanation of GraphQL in a concise context.

InfoSecGSO
Автор

GraphQL simplifies API building because you don't have to create custom endpoints for every single scenario. You just define the schema and thats it, you can query what ever you want. Imagine you're building a house, and you need to order materials from different suppliers. With REST, you'd have to order each material separately, and each supplier would give you a fixed set of materials, regardless of whether you need them all or not. With GraphQL, you can specify exactly which materials you need, and each supplier will only give you what you asked for, reducing waste and improving efficiency.

htk
Автор

I enjoy your Brewlosophy videos as well as these. Keep up the good work.

MrThurobrand
Автор

This man's handwriting backwards is better than mine forwards.

piero
Автор

That moment when you've known Martin as a beer bowler for several years and now realize he is a software engineer 😁. Thank you for the good explanation!

antonivashchyk
Автор

thank you for that helpful comparison.. to my understanding REST is also Protokoll agnostic.. despite probably beeing widely implemented on HTTP

amsimun
Автор

It would be really great to hear pros and cons of each as well. Would appreciate it if you can provide that info too.

donaldduck
Автор

Excellent video, I really like the side by side comparison, no idea how that works (writing on a board while facing a camera) 😂

nicklaspillay
Автор

I already knew it. But still the best explanation in simple words.

iam_kundan
Автор

Love your explanation, Martin! Thank you so much

Polina-rewp
Автор

This guy is my favourite IBM presenter....by far . This one was good.

tyronefrielinghaus
Автор

Thanks! Caught me up. When was paid to code in ancient times was arrival of XML was the big deal. I love XML. Now got info on the new stuff. Ok.

jstevh
Автор

The final project in my bootcamp involved working with GraphQL. I could definitely see the benefits and enjoyed working with it, but it was probably overkill for what I was doing at the time.

paultaylor
Автор

My gosh love your explanation, now I clearly get the idea of graphql is

thomaspotterdotexe
Автор

thank you for the best explanation so far :)

awakenwithoutcoffee
Автор

Nicely explained, thank you very much!

julienwickramatunga
Автор

My beginner brain can understand this. Thank you!

MasayaShida
Автор

Hey Mate thank you for this lesson. If we consider the performances of both REST and GRAPHQL, which is faster in terms of providing responses if we aren't worried about network call latency. If I understood correctly that graphQl is another layer that we are adding after fetching data from the sources. I mean we are adding probably a presentation layer inside the logic before passing the response data to the client. I know thats the requirement of the client, but can't we achieve the same in REST? Or we should only and only consider GRAPHQL in case where we have to collect data from various sources and bring it to be in a desired format that the client needed?

smrutikantnayak
Автор

With exact paylod or query string i can get precise output data from a rest endpoint. So why should i go for graph ql with 10x overhead of implementation and maintenance?

sreekanth
Автор

Does GraphQL add possible risks like possible high server load or a kind of SQL injection?
What about schema changes, is there a versi9ning?

olafschermann