GraphQL Crash Course

Sdílet
Vložit
  • čas přidán 19. 09. 2019
  • 💻 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.github.com/v4/guide...
    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/hnasr/javascript_p...
    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
  • Věda a technologie

Komentáře • 54

  • @hnasr
    @hnasr  Před 4 lety +17

    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 Před 4 lety +39

    The guy really enjoys teaching! Such a cool one.

  • @suhasc9418
    @suhasc9418 Před 4 lety +29

    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  Před 4 lety +5

      Suhas C thanks Suhas! Glad you found the videos useful, stay awesome!

  • @stevoschannel
    @stevoschannel Před rokem

    Honestly, I love your videos, Thanks Hussein! No other videos actually make me smile while I listen

  • @mateoguevara923
    @mateoguevara923 Před 4 lety +3

    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  Před 4 lety +1

      Thank you Mateo! All the best. On your app 🙏

  • @BHFJohnny
    @BHFJohnny Před 4 lety +2

    Ok, after endless procrastination, I finally got to this :D Thank you!!!

  • @mishrasidhant
    @mishrasidhant Před 3 lety +2

    Loving your style of explaining! 🙏🏾

  • @the_maroon_knight
    @the_maroon_knight Před 2 lety

    A great starting point to learn GraphQL to learn it in depth.

  • @animatedzombie64
    @animatedzombie64 Před 3 lety +1

    hussein: don't get attached to anything,
    Me, already attached to this channel, watching backend things

  • @smoothbeak
    @smoothbeak Před 4 lety

    Really good eplanation at the start about what makes GraphQL different from REST and a good option

  • @kamarajkannan4072
    @kamarajkannan4072 Před 4 lety +2

    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  Před 4 lety

      Thank you Kamaraj!! Happy you find content useful

  • @qsami5865
    @qsami5865 Před 2 lety

    استاذ حسين كل الحب زادك الله علما ونفعا به

  • @mtvspec
    @mtvspec Před 10 měsíci

    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 ❤

  • @elijahlair
    @elijahlair Před rokem

    Well understood. Both REST and GraphQL are great technologies, depending on what your client request types are. Thank you

  • @alekseiborsenkodev
    @alekseiborsenkodev Před 3 lety +2

    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

  • @fuckcorporati0ns
    @fuckcorporati0ns Před rokem

    Thank you so much Hussein, I love your videos and your explanation. Wish you stay healthy and enthusiastic to share more knowledges with us

  • @falanges5301
    @falanges5301 Před 10 měsíci

    I love you so much Hussein thank you for being alive!

  • @yadusolparterre
    @yadusolparterre Před 3 lety +1

    Thank you so much, Hussein. I am learning so much thanks to you.

  • @khatritariq
    @khatritariq Před 4 lety +6

    You explain things very well. Thank you for your efforts.

    • @hnasr
      @hnasr  Před 4 lety

      Thanks Tariq appreciate it! Have a great weekend and enjoy the content

  • @ibrahim47
    @ibrahim47 Před 4 lety +3

    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  Před 4 lety +1

      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 Před 4 lety +1

      @@hnasr urw Hussein and thanks for this great video, looking forward for more videos

  • @gracielarosascalvo6762
    @gracielarosascalvo6762 Před 4 lety +1

    I love your courses

  • @grillbaer
    @grillbaer Před 3 lety +2

    Very coolisher video, thank you!

  • @tambolaking5383
    @tambolaking5383 Před 4 lety

    One can limit number of requests per minute and number of requests per month for each client to stop any attacks.

  • @gradientO
    @gradientO Před 4 lety +4

    Thank you!!!

  • @thirislifelogs
    @thirislifelogs Před 9 měsíci

    awesome tutorial. thank you!

  • @amu281
    @amu281 Před rokem

    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.

  • @nabhagmotivaras2884
    @nabhagmotivaras2884 Před rokem

    MasterPiece!!

  • @chijiokesamuel5077
    @chijiokesamuel5077 Před 10 měsíci

    Thank you so much.

  • @marwanatef3652
    @marwanatef3652 Před rokem

    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.

  • @willymcnamara1429
    @willymcnamara1429 Před rokem

    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_ Před rokem

      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.

  • @abdelraoofrabie3024
    @abdelraoofrabie3024 Před 2 lety

    Great content, But the low tune makes a lot of misses for me.

  • @shivaganga9148
    @shivaganga9148 Před 2 lety +1

    Hussein Sir could do please make a content on Restful API

  • @mohammedsamir5142
    @mohammedsamir5142 Před 4 lety

    Awesome man!
    Allah bless you!
    💙💜👍

    • @hnasr
      @hnasr  Před 4 lety +1

      Mohammed Samir Mohammed ❤️❤️❤️ شكرا عزيزي

  • @takshpatel8109
    @takshpatel8109 Před 2 lety

    👌👌👌👌

  • @manmohanmundhraa3087
    @manmohanmundhraa3087 Před rokem

    in a single REST call we can do everything what graphQL can do. if requirement is there ...

  • @alakdam3970
    @alakdam3970 Před 4 lety +3

    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.

  • @arnabmukherjee5840
    @arnabmukherjee5840 Před 4 lety +1

    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 Před 2 lety

      উনি যথেষ্ঠ engaging video create করেন। আপনাকে বেশি জ্ঞান দিতে হবে না ।

  • @Ty1er
    @Ty1er Před 2 lety

    🙏🙏🙏❤️❤️❤️❤️❤️

  • @alwahsh
    @alwahsh Před rokem

    هل برأيك متحدثو الإنجليزية بحاجة إلى من يشرح لهم تقنية شُرحت لديهم عشرات المرات؟
    أم أنك غافل عن حال المصادر التعليمية العربية المتدهور؟
    أم أنك آثرت التصدق على عدوك الغني على حساب أخيك الفقير؟

  • @khalilsandal8070
    @khalilsandal8070 Před rokem +1

    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

  • @Ty1er
    @Ty1er Před 2 lety

    🙏🙏🙏❤️❤️❤️❤️❤️❤️