GraphQL Basics - Build an app with the SpaceX API

Поделиться
HTML-код
  • Опубликовано: 24 ноя 2024

Комментарии • 131

  • @theblackharted
    @theblackharted 5 лет назад +416

    I love how you just get down to business...so many tutorials are so unnecessarily longwinded and slow

  • @gatodetaco
    @gatodetaco 5 лет назад +371

    Me: Oh man, this job post requires 3 YOE with GraphQL.
    Fireship: I'm about to make this man's whole career.

    • @Fireship
      @Fireship  5 лет назад +53

      Haha, graphql has hardly been around for 3 years

    • @pixel7038
      @pixel7038 5 лет назад +3

      @@Fireship If it helps, I found an awesome udemy course for GraphQL. Love the video from fireship to get started too
      www.udemy.com/course/graphql-bootcamp/

    • @Tiddle_s
      @Tiddle_s 4 года назад +20

      @@Fireship That's never stopped any recruitment firm (and many companies) I've ever known.

  • @victordetoni9263
    @victordetoni9263 4 года назад +46

    I loved that you increased font-size on vscode for optimized readability on mobile devices. Watching your tutorials is a delightful, user-friendly experience.

  • @johnnymeza5454
    @johnnymeza5454 4 года назад +7

    I'm an experienced full stack developer (MERN) and making REST APIs. GraphQL makes me so happy because of how simple the requests are to get the data you want. It's so intuitive!!! Now setting it up with Apollo looks like the hard part. I'm going to learn that.

  • @MohammedIqlasUddin
    @MohammedIqlasUddin 5 лет назад +13

    Just found this channel a few weeks ago and it has become one of my obsessions!!

  • @FidelGuajardo
    @FidelGuajardo 5 лет назад +10

    Jeff always hits a sweet spot with every video he makes. I think he picks every winning tech out there.

  • @ProgrammingwithPeter
    @ProgrammingwithPeter 5 лет назад +7

    This is gold, flawless! P.S. GraphQL implies a little bit more work on the backend part, but it will handle any "request" for a specific object, after that it's all frontend asking for what it needs

    • @Fireship
      @Fireship  5 лет назад +3

      Thank you! For sure, the backend implementation is where things can get tricky.

  • @thekakan
    @thekakan 5 лет назад +9

    I think GraphQL might be worth it for small teamz as well. Even though it introduces a bit of complexity and planning ahead for the backend developer, it makes it easier for the front-end developer to develop things fast.
    Of course, it'll depend on the application in context.

  • @devangliya7131
    @devangliya7131 4 года назад +107

    No graphs in the video. 0/10. lies.

  • @Ulkesh007
    @Ulkesh007 3 года назад +1

    I Just Learn the Basics Of Graph-QL and Angular By Listening You🧡

  • @aspected
    @aspected 4 года назад

    30 seconds into this video you convinced me to convert my current big project to GraphQL.
    I'm using the National Rail API for data, which returns some really weird shit sometimes, making error-checking a huge chore. I swear I've spent more time correcting dumb errors than I have actually writing new features. GraphQL looks like it'll help clear my front end code right up!

  • @johnnymeza5454
    @johnnymeza5454 4 года назад

    Yoooo this graphql code generator is RAW!!!!! I didn't know it makes a whole service with methods! SOOO GOOOD!!!!!

  • @saadabbasi2063
    @saadabbasi2063 5 лет назад +13

    Its been more than a year now since i moved from Angular to React.
    I learned alot, find it exciting but no longer. :)
    One of the great experience of mine was to use React and GraphQL on 2 projects.
    Market demand is kind of moving us towards that direction but truth is i still miss Angular. 😔

    • @Fireship
      @Fireship  5 лет назад +3

      I hear you. I started with React, went to Angular, now find myself working with React again. They're both good for different reasons

    • @saadabbasi2063
      @saadabbasi2063 5 лет назад +6

      Fireship yeah, as long as your team has solid code ethics.
      Angular kind of forces you to stay in a bound and react doesn’t. So easy to mess it all up.

    • @GabrielMateusLima
      @GabrielMateusLima 4 года назад

      ​@@Fireship speaking about that, do you have any plans on making videos about React (or even Vue)?

    • @johnnymeza5454
      @johnnymeza5454 4 года назад

      I agree Saad! My company where I work uses React but I was an Angular fan boy :/ . I won't lie JSX is really the bees knees. I think Angular is better than React + Redux though.

  • @pedro_alonso
    @pedro_alonso 3 года назад +2

    Me: "Hmm, I need to do that homework about Graphql"
    RUclips: "Take this video from Fireship, with it's amazing explanation, content, and examples"

  • @jakye
    @jakye 4 года назад +74

    Can't we launch a rocket through this API?

    • @deepaknayak6715
      @deepaknayak6715 3 года назад

      😂

    • @Alt.N
      @Alt.N 6 месяцев назад

      Unfortunately, Elon is too selfish for that: you would need a paid subscription of millions if not billions of dollars for that 😞

  • @tobeqz7065
    @tobeqz7065 5 лет назад +87

    Can you read my mind? I just wanted to learn about GraphQL.

    • @Fireship
      @Fireship  5 лет назад +10

      Perfect timing :)

    • @daanbreur
      @daanbreur 4 года назад +1

      same xD

    • @snk-js
      @snk-js 4 года назад +1

      hey, in 7 months (since the your comment was added) how was your learning with GQL?

    • @justADeni
      @justADeni 4 года назад +1

      @@Fireship or is it? **suspicious**

    • @unoriginalusernameno999
      @unoriginalusernameno999 3 года назад

      It's the RUclips recommendation algorithm.

  • @ScottGrunwald
    @ScottGrunwald 5 лет назад +30

    Love the JRE Elon clip in the beginning lmao!!

  • @aykborstelmann8623
    @aykborstelmann8623 5 лет назад +1

    Wow that was much input ... I never really looked at Angular, Typescript and anything like this.

  • @abhisheknautiyal4200
    @abhisheknautiyal4200 4 года назад +1

    Please make video on how you learn so quickly. share your insights on how we can learn and develop like you share your tips and tricks for fast learning and how you able to do so many things altogether share your thought with us
    thank you .

  • @elinolundforsling6263
    @elinolundforsling6263 4 года назад +2

    This was super good, but I'd have appreciated it if the other frameworks used would have been listed somewhere in the description, or mentioned in the beginning of the video. I have no experience with typescript or angular, which made the whole thing a lot harder to follow, and had I known beforehand I could have found a video focusing more on either vanilla js or mern. Still, awesome content!

  • @TheEnde124
    @TheEnde124 5 лет назад +3

    Nice! The graphql code generator looks extremely useful!

  • @911madza
    @911madza 5 лет назад +7

    Technologies I believe hold future potential:
    Next.js, Svelte, GraphQL, WASM (and Rust itself)

  • @murwaneisa2287
    @murwaneisa2287 9 месяцев назад

    Thanks a lot that was so helpful ans easy to understad for me as graphQL biginner 🙏🏾

  • @audread_
    @audread_ 3 года назад

    Your tutorials are jus awesome.
    The information you provide is exactly what we need.
    You are a great mentor and teacher.
    Always waiting for your new videos.

  • @JakeJJKs
    @JakeJJKs 4 года назад

    Take a look at postgraphile. It'll set up your graphql end based off of your postgres db. No need to write any resolvers your self and it's blazing fast.

  • @SaifUlIslam-db1nu
    @SaifUlIslam-db1nu 5 лет назад +2

    Very simple and easy to follow. Thank you so much!

  • @BhargavaMan
    @BhargavaMan 5 лет назад +9

    This was pretty great, could you also maybe do one for the backend? Maybe Firestore + GraphQL? That would be pretty sickkkk

    • @Fireship
      @Fireship  5 лет назад +5

      Yep, that is up next!

  • @yapdog
    @yapdog 2 года назад

    Nnnnope. I don't want to code even a single line of this. And I've been coding for over 3 decades. Yeah, call me old, but we've made life so fvcking difficult with all of these APIs just to do what should be a very simple thing. We now have a development culture that takes great pride in this overcomplexity as if it's some kind of worthwhile accomplishment or badge of honor. However, it's all just some things that others have stacked on top of other things... a series of Band-Aids over a core wound. The end result? Programmers today are faster to experience burnout and stress, feeling like they need to know all of these APIs which will be "dead" in a few years. Hell, there are already so many videos touting the death of GraphQL!!! This is shear madness.

  • @khalilsleimi7832
    @khalilsleimi7832 2 года назад

    I really want to learn gRPC, please do that one next!

  • @EvanChesterman
    @EvanChesterman 5 лет назад

    I just recently did something similar with the space x api. Great video thanks for sharing.

  • @mpapin1
    @mpapin1 3 года назад

    Great vid, loved the sandwich analogy! Super helpful

  • @AlexSurf2008
    @AlexSurf2008 5 лет назад +1

    Clear and concise as usual! Thanks your this great content!👍🙏

  • @HoangTung1802
    @HoangTung1802 2 года назад +1

    Now make one with Blue Origin Api

  • @hojdog
    @hojdog 5 лет назад +1

    I would love an AWS amplify tutorial

  • @mohamedelmdary8106
    @mohamedelmdary8106 5 лет назад

    actually it works better than i expected ... thank you

  • @mohsenalbo5533
    @mohsenalbo5533 5 лет назад +2

    LOL , best chanel ever I've learned a lot of this channel

  • @atalocke
    @atalocke 3 года назад

    I wish you'd cover other languages or frameworks besides JavaScript. Regardless, still a great vid.

  • @DB-nl9xw
    @DB-nl9xw 4 года назад

    This is how teaching is supposed to be

  • @RodrigoJaraPiccardo
    @RodrigoJaraPiccardo 4 года назад

    wow a lot of steps. But the tutorial it's great!

  • @rebarius
    @rebarius 5 лет назад +2

    perfectly explained! Thank you so much!

  • @somebrid2147
    @somebrid2147 4 года назад +1

    Your transitions hurt my eyes in a good way

  • @Suro_One
    @Suro_One 5 лет назад +3

    Cool. Could you also make a video about the back end of this

  • @theforestapp
    @theforestapp 5 лет назад

    been waiting on you to make this one! thanks

  • @vasiovasio
    @vasiovasio 5 лет назад

    The Future is Now!

  • @sarowarhosen003
    @sarowarhosen003 Год назад

    Sir gone to mars after teaching us graphql 😬

  • @tranquillityEnthusiast
    @tranquillityEnthusiast 5 лет назад

    Please make a vedio on Plotly and Firestore

  • @dtentes-Bivouac-974
    @dtentes-Bivouac-974 4 года назад

    excellent

  • @francesko1763
    @francesko1763 5 лет назад +1

    Hi Jeff, i discovered you today, you are amazing man! your video editing is also amazing, which program do you use for those effects ? and where do you find the icons ?

  • @qvcitizen
    @qvcitizen Год назад

    Mate, as a straight male frontend dev, I think I’ve fallen in love with you. Hope that doesn’t gross you 😂

  • @ShivamVerma-we2sj
    @ShivamVerma-we2sj 3 года назад

    Zookeeper in 100 seconds! Please.

  • @LucTemetNosce
    @LucTemetNosce 3 года назад

    Was expecting rocket science but got hungry

  • @eshaan7_
    @eshaan7_ 4 года назад

    this guy knows his shit.

  • @MG-wx8yx
    @MG-wx8yx 7 месяцев назад

    Fireship scares the hell out of me sometimes.

  • @SadullaAlisherov-t7o
    @SadullaAlisherov-t7o 5 месяцев назад +1

    R.I.P got me🤣

  • @Geomaverick124
    @Geomaverick124 5 лет назад

    Cool Stuff

  • @YinonOved
    @YinonOved 5 лет назад

    great vid. you mentioned Apollo being a state management - on fetching a specific launch detail will it check for its existence in the list before sending a new request to the server?

  • @foreverlostinthematrix2150
    @foreverlostinthematrix2150 2 года назад +1

    Great video! I'm having an issue and the HTML file for launch list and details wont compile correctly. it gives an error because if the ngcontainer. I had to put the ng container myself and it was already in the file. Where did I go wrong?

  • @peterveliki7918
    @peterveliki7918 4 года назад +8

    Why this example for REST? ... It is not equal to the GraphQL example. I mean - in REST you can request `/sandwich` and you can get JSON in response where you'll have properties bread, ham and cheese.
    Furthermore - the GraphQL can be as shitty as the REST example you provided - you can make three different requests for `bread { ... }`, `ham { ... }` and `/cheese { ... }`.
    ...
    Good video, but the examples were not identical and you've shown yourself as very bias here :) ... and this could mislead someone who's new to APIs.

    • @steffenstabler5124
      @steffenstabler5124 4 года назад

      I just thought I was the only one with this opinion

    • @DBZM1k3
      @DBZM1k3 2 года назад

      I think the example is perfectly fine for trying to demonstrate it. If you want to separate properties to make the requests more dynamic, you have to provide multiple different requests in a REST API. With GraphQL you only need to provide one request containing what properties you want to get back. Saying you can do it the same way as a REST API is silly. Of course you could do it the same way, but the point is that you can get the flexibility of specifying what information you want for a sandwich without separating the information into multiple requests like you have to in the REST API example.

    • @DBZM1k3
      @DBZM1k3 2 года назад

      I see the problem now. You've assumed that the ham, cheese, and bread that makes up the sandwich is information that is always being requested. The point of separating the bread, ham, and cheese into separate request calls is because on the front end it may be the case that the person only wants to know what type of bread the sandwich has. In which case if you were to have all the information inside a single request '/sandwich' you are sending unnecessary information to the user and that is inefficient. The way GraphQL works is that the single request 'sandwich { bread }' would give the person only the bread. For a REST API the only way to do this is to make a '/bread' request. Essentially, if you want a single pieces of information you will have to create a request for each of them individually. That's why he showed this example. With GraphQL you can specify single or multiple properties in a single request.
      If I want to know what type of bread and what type of cheese is in a sandwich then that's a single request in GraphQL sandwich { bread, cheese }. It is two in REST which would be '/bread' and '/cheese'. '/sandwich' is only useful if you want all the information about the sandwich.

    • @peterveliki7918
      @peterveliki7918 2 года назад

      @@DBZM1k3 I'm starting to see the idea :)
      But at the same time - I guess you can do the same with REST, no? Have an endpoint where you can pass the props you want to get and you will get only the info for those props ... ?

    • @DBZM1k3
      @DBZM1k3 2 года назад +1

      @@peterveliki7918 it would be possible, yes. But out of the box this isn't possible with REST as it wasn't designed with that sort of flexibility in mind. You would have to develop a flexible framework around the already existing api. The simplest way I can see to implement it would be to include a string in the body of elements you want to pass back. Maybe as comma separated values? And then parse it that way.
      That wouldnt look as clean as the GraphQL implementation however. And it certainly wouldn't be as flexible as GraphQL though as you can include additional things like sorting, filtering, and limiting data. GraphQL can have nested data, from a 3rd party source(Like it was done in this video) or other collections in your database, as well. Which would be even harder to implement in REST unless you modify it a bunch.
      You can see in this video it was very easy to have his own GraphQL query SpaceX's graphql api. They can be stacked pretty easily.

  • @LarsHesselberg
    @LarsHesselberg 5 лет назад +20

    Wow.. so early.. 1 view, 0 likes..

  • @sonsangsom
    @sonsangsom Год назад +1

    Sad that the space x Heroku app is no longer working

  • @MahipalSingh-nv1bq
    @MahipalSingh-nv1bq 5 лет назад

    samjh me nahi aaya pr sunne me acha laga... did not get it but sounds good.. 🤣

  • @jmanfoo
    @jmanfoo 3 года назад

    Ok so we're talking about how useful this query language is for linking front end to back end. But in my own narrow practical experience, it seems no different from mysql. When you're developing back end code in a certain language, all of the graphql queries just end up being strings. So how can I link this "language" to my own back end code in a more practical manner that doesn't just involve string interpretation? (I'm working with python for those curious)

  • @wheytomuchforher
    @wheytomuchforher 5 лет назад

    What do you think about using jest, and angular these days? I've been using it at work, and it's wayyy better than the stock karma/jasmine combo it comes with

  • @The_Duck_Man
    @The_Duck_Man 5 лет назад +1

    Instant click on all Fireship vids

  • @charliesumorok6765
    @charliesumorok6765 Год назад

    2:30 REST Resource Expansion allows 1 request to be made. For the sandwich example, a request could be made to /sandwich?expand=.bread,.ham,.cheese. Here is a talk about the part of ReST that is usually not followed youtu[.]be/g8E1B7rTZBI

  • @redrox8283
    @redrox8283 2 года назад

    Nice video! But i don't get why in a rest environment i should send multiple requests to different endpoints... if the object/record/whatever is made up of the same properties and i know the object/record/whatever i am asking for, why shouldn't my rest app return all in one as with the graphql counterpart?
    Thanks for who will answer :)

  • @nishantsatish8205
    @nishantsatish8205 5 лет назад

    Why does initialising an observable in the ngOnInit() method throw an error?

  • @georgezouros-elenidis5176
    @georgezouros-elenidis5176 5 лет назад +1

    Angular & GraphQL = future of robust apps 🤔

  • @iyxan23
    @iyxan23 4 года назад

    I was thinking what if we can use SpaceX API to launch rockets to space.

  • @codelucky
    @codelucky 5 лет назад

    Sorry, I've chosen gRPC instead.

  • @hri7566
    @hri7566 3 года назад

    petition to pronounce GraphQL like the word "graphical"

  • @radvilardian4055
    @radvilardian4055 5 лет назад +1

    I think I get insterested with this GraphQL, however still confused how to integrate it to the backend with Mongodb, is it possible ?

    • @raglandasir6885
      @raglandasir6885 5 лет назад

      ruclips.net/video/ed8SzALpx1Q/видео.html

  • @yolo-mb4cy
    @yolo-mb4cy 5 лет назад

    What icon theme u use?

  • @MCMadk
    @MCMadk 4 года назад

    Hi , bit late to the party but I have a question ,
    in the apllo.config.js file , we add a service right , in this service does the name has to be "angular-spacex-graphql-codegen" ? Or is it just a sample name (could be anything) ?

  • @CodingCatDev
    @CodingCatDev 5 лет назад

    I am trying to convince peeps at my new job to start using GraphQL. They are big on Entity Framework. Do you still need Apollo (or any GraphQL) on top of EF?

    • @Fireship
      @Fireship  5 лет назад +2

      You can still use your ORM, but instead of REST endpoints you would create graphql resolvers. Apollo is not required, but it provides consistent framework especially when used on both the client and server.

  • @definty
    @definty 3 года назад

    I don't get how this is different from sending a json rest api request

  • @MrPlaiedes
    @MrPlaiedes 4 года назад +2

    You had me up until angular.

  • @SloanMosley
    @SloanMosley Год назад

    Great, now I’m hungry and confused

  • @Jake4
    @Jake4 Год назад +1

    RIP Spacex API is now down

  • @makisetakashi
    @makisetakashi 5 лет назад

    how to call graphql server to graphql server ?

  • @SirusStarTV
    @SirusStarTV 5 лет назад +1

    Нихую не понял, но очень интересно)

  • @justinwitherspoon4600
    @justinwitherspoon4600 4 года назад

    01:38
    10:30
    0:28

  • @AbdoTech0
    @AbdoTech0 5 лет назад

    i am HERE :D

  • @sasan6099
    @sasan6099 5 лет назад +3

    first

  • @aspirinemaga
    @aspirinemaga 4 года назад +1

    Still GraphQL is overhelming AF

  • @JosueRodriguez08
    @JosueRodriguez08 4 года назад

    "If you are a front end then everything is easy and f*** backend developers with the black magic they have to do now"

  • @juustgowithit
    @juustgowithit Год назад

    Am I the only one that can barely keep watching because of the constantly moving background?

  • @username-dh4tq
    @username-dh4tq 2 года назад

    :

  • @justinstoddard4782
    @justinstoddard4782 3 года назад

    You lost me at "Angular"

  • @2711Suvro
    @2711Suvro Год назад

    Please avoid food-related analogies... makes me hungry

  • @bencemanyoki1239
    @bencemanyoki1239 3 года назад

    DUDE! This is not technically correct! Nobody fetches "a sandwich" in 3 requests. That's why there are DTO types. Which in case of TS back and frontend can also be shared, to give exact typed communication between the two. Please don't mislead beginners with uncorrect information.

    • @DBZM1k3
      @DBZM1k3 2 года назад

      No. He is correct! The reason it is done this way is to allow flexibility of the information provided to the frontend. If you only want to know what type of bread a sandwich uses you can't get that information from '/sandwich' without also getting ham and cheese. That is costly as you are sending more information than necessary.
      In the example of GraphQL you can specify 'sandwich { bread }' to only get the bread type of a sandwich. Do you see why it would be useful in REST to make several requests now?

  • @stevenjchang
    @stevenjchang 3 года назад

    This is the first video of yours where I strongly disagree with the simplified explanation.
    "a consistent way for your frontend to request data from your backend despite any difference in the programming language"
    HTTP Restful protocol does the same thing, as does any other protocol. Frontend and backend don't have to be using the same programming language in any scenario.