Тёмный

GraphQL Crash Course 

Hussein Nasser
Подписаться 431 тыс.
Просмотров 31 тыс.
50% 1

💻 More software engineering videos • Software Engineering b...
GraphQL Pros and Cons, examples and when to use over REST
GraphQL is an open source query language developed by facebook that allows clients to formulate queries to get different results. Its main goal is to combine multiple services into one endpoint. In this video we will discuss what is GraphQL, why facebook developed it, go through some examples using github GraphQL API, finally we will discuss the pros and cons and when you should use this technology.
- What is GraphQL?
- Examples
- Pros and Cons
- when to use REST vs GRAPHQL
What is GraphQL
- Schema
- Query language
- Nesting
- Mutation and subscription
Examples
Schema intro
Github API
Rest api
Pros
- Flexibility
- efficient response : payload back only get what you want of fields since you know the schema
- No round trips- Avoiding multiple round trips (HATEOS REST)
- Uniform single interface API endpoint
- Self documenting
Cons
- Complexity
- Typed system - ( use it to know if a type is available or not and fork logic) slows down adoption.. same as soap
- No Caching etag since always POST
- Error management non-standard for HTTP.
- Over engineering can lead to Inefficiency of the joins can lead to performance and DOS
developer.gith...
WHEN TO USE GRAPHQL
Public ad-hoc API that you can’t predict how it will be used
Specific and well-design use cases API
Simple API that serves one client (webpage)
Enterprise API (new york times)
Well defined schema
Without the need of performing multiple round trips. It as a reaction to certain limitations of the REST API.
Schema
all post
except schema call get
via fetch api
Source Code for RESTAPI vs GraphQL
github.com/hna...
Jump Codes
2:30 What is GraphQL?
13:50 Properties of GraphQL
18:00 Examples
34:00 Pros and Cons
47:10 When to use GraphQL over REST
Cards
4:00 REST API
31:20 GIT HUB REST API
33:00 Caddy Web Server
43:55 GET VS POST
Support me on PayPal bit.ly/33ENps4
Become A Patron / hnasr
Stay Awesome!
Hussein

Опубликовано:

 

28 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 55   
@hnasr
@hnasr 5 лет назад
Time Codes 2:30 What is GraphQL? 13:50 Properties of GraphQL 18:00 Examples 34:00 Pros and Cons 47:10 When to use GraphQL over REST
@mrcrazyenough007
@mrcrazyenough007 4 года назад
The guy really enjoys teaching! Such a cool one.
@mtvspec
@mtvspec Год назад
Expensive queries con can be solved by persisted queries - client sends query id and server associates it with corresponding query. This way client sends only persisted query id and query variables (if any). Awesome explanation of GraphQL, thank you very much ❤
@animatedzombie64
@animatedzombie64 3 года назад
hussein: don't get attached to anything, Me, already attached to this channel, watching backend things
@suhasc9418
@suhasc9418 4 года назад
The way you explain, makes all the difference. Thanks for all the wonderful tutorials and for many more to come. God Bless you! :)
@hnasr
@hnasr 4 года назад
Suhas C thanks Suhas! Glad you found the videos useful, stay awesome!
@kamarajkannan4072
@kamarajkannan4072 4 года назад
Hi Hussien Nasser sir, your channel is something special to me. Mostly I do blind code but now I watch your videos to understand basics. Now I able to connect with what I doing . I am interested in-sourcing with graphQL.
@hnasr
@hnasr 4 года назад
Thank you Kamaraj!! Happy you find content useful
@the_maroon_knight
@the_maroon_knight 2 года назад
A great starting point to learn GraphQL to learn it in depth.
@BHFJohnny
@BHFJohnny 4 года назад
Ok, after endless procrastination, I finally got to this :D Thank you!!!
@ibrahim47
@ibrahim47 5 лет назад
With great power comes great responsibility, this is the first thing that comes into my mind when graphql is mentioned. The problem with graphql is that it needs a learning curve itself and the problems it comes with are different, for example the N+1 problem, and to solve it you most probably will use solutions (like dataloaders) that may bring even new problems, also the graphql specification didn't cover alot of implications like security.
@hnasr
@hnasr 5 лет назад
Ibrahim Mohammed well said! I think Your talking more from the backend implementation of GraphQL and yes that has its own set of challenges And thanks for mentioning the N+1 problem as well.
@ibrahim47
@ibrahim47 5 лет назад
@@hnasr urw Hussein and thanks for this great video, looking forward for more videos
@khatritariq
@khatritariq 4 года назад
You explain things very well. Thank you for your efforts.
@hnasr
@hnasr 4 года назад
Thanks Tariq appreciate it! Have a great weekend and enjoy the content
@mishrasidhant
@mishrasidhant 3 года назад
Loving your style of explaining! 🙏🏾
@falanges5301
@falanges5301 Год назад
I love you so much Hussein thank you for being alive!
@smoothbeak
@smoothbeak 4 года назад
Really good eplanation at the start about what makes GraphQL different from REST and a good option
@shivaganga9148
@shivaganga9148 2 года назад
Hussein Sir could do please make a content on Restful API
@shivaganga9148
@shivaganga9148 2 года назад
got it you already did it
@yadusolparterre
@yadusolparterre 3 года назад
Thank you so much, Hussein. I am learning so much thanks to you.
@grillbaer
@grillbaer 3 года назад
Very coolisher video, thank you!
@gradientO
@gradientO 4 года назад
Thank you!!!
@gracielarosascalvo6762
@gracielarosascalvo6762 5 лет назад
I love your courses
@marwanatef3652
@marwanatef3652 Год назад
Getting to the point with a very clear yet short explanation is one of the things one admire about this channel, thank you! One thing that would have made this video greater if you used a GraphQl Client like Altair (A Chrome extension) that loads the schema and offers a complete playground for working with graphql apis, kindly check it out.
@abdelraoofrabie3024
@abdelraoofrabie3024 3 года назад
Great content, But the low tune makes a lot of misses for me.
@arnabmukherjee5840
@arnabmukherjee5840 4 года назад
Bro i am checking your videos for last few months, just a suggestion : Don't focus on content length , Make it as crisp as possible. Keep spreading knowledge. Awesome tutorials.
@SigmaSid98
@SigmaSid98 2 года назад
উনি যথেষ্ঠ engaging video create করেন। আপনাকে বেশি জ্ঞান দিতে হবে না ।
@mohammedsamir5142
@mohammedsamir5142 4 года назад
Awesome man! Allah bless you! 💙💜👍
@hnasr
@hnasr 4 года назад
Mohammed Samir Mohammed ❤️❤️❤️ شكرا عزيزي
@takshpatel8109
@takshpatel8109 2 года назад
👌👌👌👌
@Ty1er
@Ty1er 2 года назад
🙏🙏🙏❤️❤️❤️❤️❤️
@khalilsandal8070
@khalilsandal8070 Год назад
the video is too long, you talk a lot with no infos, I even make the speed of the video 2x and still felt bored out of my mind, I will lookup other videos to learn GraphQL
@fuckcorporati0ns
@fuckcorporati0ns Год назад
Thank you so much Hussein, I love your videos and your explanation. Wish you stay healthy and enthusiastic to share more knowledges with us
@alekseiborsenkodev
@alekseiborsenkodev 3 года назад
Very cool video. But I would like to add that GQL not only brings everything to 1 endpoint (well, not actually but close). It also acts as abstraction layer that IMHO is easier to understand then REST
@Ty1er
@Ty1er 2 года назад
🙏🙏🙏❤️❤️❤️❤️❤️❤️
@mateoguevara923
@mateoguevara923 4 года назад
Hey man, amazing video, I'm actually developing an app for shopify, and since their apis use graphql, I had to learn it, best tutorial by far, simple and clear, keep doing ya thing!
@hnasr
@hnasr 4 года назад
Thank you Mateo! All the best. On your app 🙏
@محمد-م5ث1ش
@محمد-م5ث1ش 2 месяца назад
After 5 years, do you still believe that strong typing is a bad idea? I mean, it's pretty much the main difference between javascript and typescript.
@hassanOnYoutube
@hassanOnYoutube 2 месяца назад
brother. you r such a positive energy
@chijiokesamuel5077
@chijiokesamuel5077 Год назад
Thank you so much.
@amu281
@amu281 2 года назад
Please explain the term "Rest is Schema-Less". When I use the Rest we do have the Model(Bean), may join couple of tables but finally one model, which we represent to consumers. So I am consufed that even rest has schema associated with it. Any reference is also fine.
@elijahlair
@elijahlair Год назад
Well understood. Both REST and GraphQL are great technologies, depending on what your client request types are. Thank you
@manmohanmundhraa3087
@manmohanmundhraa3087 2 года назад
in a single REST call we can do everything what graphQL can do. if requirement is there ...
@stevoschannel
@stevoschannel Год назад
Honestly, I love your videos, Thanks Hussein! No other videos actually make me smile while I listen
@tambolaking5383
@tambolaking5383 5 лет назад
One can limit number of requests per minute and number of requests per month for each client to stop any attacks.
@thirislifelogs
@thirislifelogs Год назад
awesome tutorial. thank you!
@qsami5865
@qsami5865 2 года назад
استاذ حسين كل الحب زادك الله علما ونفعا به
@nabhagmotivaras2884
@nabhagmotivaras2884 2 года назад
MasterPiece!!
@willymcnamara1429
@willymcnamara1429 Год назад
im pretty new to webdev, and would appreciate clarity on this point- Hussein refers to REST as "schema-less" in comparison to GraphQL. why is that? when I've made RESTful API's, they've had server-side 'controller' functions which either format very specific db queries, or reformat the db response to fit what the client is requesting before sending back a response. isn't this a schema of sorts? is this not a best practice?
@0xc0ffee_
@0xc0ffee_ Год назад
The difference is that you can change the backend to whatever you want and the client won't know about it. You have to shake hands and communicate between frontend and backend and decide on a schema. With GraphQL there's no handshake or meetings needed to define schemas. You can simply query for whatever you want. And backend won't be able to break the frontend because you cannot change already existing schemas.
@alakdam3970
@alakdam3970 4 года назад
Hi Hussein Can you please make one tutorial, Where client(front end : React, server: express-graphql, apollo-server and database: postgresql) can upload photo to database. I know I am asking too much but it will help lots of young developers like me. Thanks for such a nice tutorials.
@gaunterodimm3569
@gaunterodimm3569 4 года назад
you may need to find a magic lamp mate!
Далее
The Hidden Cost Of GraphQL And NodeJS
28:35
Просмотров 193 тыс.
Redis In-Memory Database Crash Course
50:01
Просмотров 55 тыс.
GraphQL vs REST: Which is Better for APIs?
7:31
Просмотров 202 тыс.
How Netflix Scales Its API with GraphQL Federation
38:50
When should you shard your database?
21:20
Просмотров 78 тыс.
The Truth About GraphQL
12:06
Просмотров 100 тыс.
GraphQL Crash course | easy way
45:57
Просмотров 115 тыс.
tRPC, gRPC, GraphQL or REST: when to use what?
10:46
Просмотров 83 тыс.
Redis Crash Course
27:31
Просмотров 628 тыс.
Microservices Explained and their Pros & Cons
16:40
Просмотров 56 тыс.
GraphQL, tRPC, REST and more - Pick Your Poison
17:12
Просмотров 108 тыс.