GraphQL Tutorial Beginner - Learn GraphQL in NodeJS / ExpressJS

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ธ.ค. 2020
  • In this video, I will teach you guys the Basics of GraphQL using express-graphql and nodejs and express. I will go over a conceptual overview of what is GraphQL, and then show you guys how to implement a GraphQL API!
    Code For the 2 Parts: github.com/machadop1407/Graph...
    -
    🚀 Learn ReactJS By Building 6 Projects: codedamn.com/learn/reactjs-pr...
    Please leave a comment on what topic you guys want me to cover next!
    -
    📞 Tutoring Session: www.fiverr.com/share/pw8RPY
    💻 PedroTech Discord: / discord
    -
    Social
    ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    Website: machadopedro.com
    Twitter: / pedrotech_
    Linkedin: / machadop1407
    Instagram: / _pedro.machado_
    Github: github.com/machadop1407
    Email: machadop1407@gmail.com
    Tags:
    - GraphQL
    - GraphQL Tutorial
    - ReactJS Tutorial
    - ReactJS and MySQL
    - NodeJS Tutorial
    - API Tutorial
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 147

  • @fahadus
    @fahadus 2 ปีที่แล้ว +4

    You're a natural teacher. Great tutorial!
    Thank you for taking the time doing this.

  • @user-tt6nc6mo7k
    @user-tt6nc6mo7k 3 ปีที่แล้ว +19

    I've watched at least 20 videos on graphql. It has been your video that finally made it "click" for me. Thanks.

    • @PedroTechnologies
      @PedroTechnologies  3 ปีที่แล้ว +4

      Awesome! You have no idea how happy I am that I helped you! I remember the struggle of learning GraphQL In the beginning, so I am happy I was able to ease the process! If you have any questions just lmk!

    • @kobenade
      @kobenade 3 ปีที่แล้ว

      Same here. Great job👍

    • @aichaouiabdessalam3102
      @aichaouiabdessalam3102 2 ปีที่แล้ว

      @@PedroTechnologies honestly same here thanks man

  • @aidanwalker3058
    @aidanwalker3058 3 ปีที่แล้ว +5

    you explain everything so easily some of the best content ive found on youtube for react,node,graphql - thanks!

  • @tunde6159
    @tunde6159 2 ปีที่แล้ว +2

    Best tutorial channel on TH-cam. I have learned so much from you in such a short time. Thank you.

    • @PedroTechnologies
      @PedroTechnologies  2 ปีที่แล้ว

      Wow thanks hahaha I feel very motivated when I read comments like this :)

  • @DanFlakes
    @DanFlakes 3 ปีที่แล้ว +4

    Like everyone before me, I just want to say your video is the only one that gave me a clear idea on how GraphQL works. Thanks man!

    • @PedroTechnologies
      @PedroTechnologies  3 ปีที่แล้ว +1

      Thank you so much! I am very happy that this video helped so many people, I used to be scared of posting graphql videos because I know how easy it is to make it confusing.

  • @ayushdedhia25
    @ayushdedhia25 3 ปีที่แล้ว +9

    Hello Sir, it was great watching this video!! I was banging my head here there to find a good tutorial to learn Graphql, but didn't get the tutorial as yours... You just taught it like its just a piece of cake. You were really a life saver for me ❤️ Thank You!! Love from India 🇮🇳

    • @PedroTechnologies
      @PedroTechnologies  2 ปีที่แล้ว +3

      Thank you so much! I know graphql is hard, so I am happy to see I could help :)

  • @BinhNguyen-os1dc
    @BinhNguyen-os1dc 2 ปีที่แล้ว

    love the way you explain GraphQL and how it work with simple tutorial

  • @programming7292
    @programming7292 ปีที่แล้ว

    Why can't everyone teach like this. Why?
    Hats off man hats off. You explained it in a way that I finally understand.

  • @davidmomoh7019
    @davidmomoh7019 2 ปีที่แล้ว

    Thank you bro. You just cleared all the confusions I had about graphQL

  • @ArKy326
    @ArKy326 3 ปีที่แล้ว +2

    You always have a video what I need to learn keep it up fam! 🔥

  • @mandihaase2744
    @mandihaase2744 3 ปีที่แล้ว +3

    Awesome introduction to GraphQL. This was perfect!

  • @muhammadnaveeed9382
    @muhammadnaveeed9382 2 ปีที่แล้ว +1

    one of the best tutorials on graph ql in an easy way. really love it. you save my 2-3 days which i was wasting to learn it earlier. thank you soo much 👍👍👍👍👍😍😘😍

  • @mohsenrazavi6959
    @mohsenrazavi6959 ปีที่แล้ว

    I have been watching many tutorials, but the point was confused me! you taught graphQL with express like drinking a cup of tea, thank you body 😘

  • @SSn0wx
    @SSn0wx ปีที่แล้ว +2

    Amazing tutorial my friend! Brazillian teachers are always the best ones lol

  • @DarkRider213
    @DarkRider213 3 ปีที่แล้ว +1

    thank you so much! this was so helpful. finally feel like i understand graphql

  • @richardmelkonian5681
    @richardmelkonian5681 2 ปีที่แล้ว +1

    thanks for this great content. Note for anyone following along mockaroo now formats generated data as first_name and last_name. Either replace them with firstName and lastName or change your query.

  • @ede7051
    @ede7051 3 ปีที่แล้ว +1

    Really appreciate the use of mock data to bring the example to life 🏆

  • @meghnapradhan3526
    @meghnapradhan3526 3 ปีที่แล้ว

    this video was a lot of help ! Thankyou !

  • @ScottsCowansCStories
    @ScottsCowansCStories 2 หลายเดือนก่อน

    Great tutorial. Thank you so much!

  • @mohamedwaqqas
    @mohamedwaqqas 3 ปีที่แล้ว +1

    Liked and subbed. This video finally made it all click in place. Thanks mate.

    • @PedroTechnologies
      @PedroTechnologies  3 ปีที่แล้ว +1

      Glad it helped! I am happy to see you liked it!

  • @dawid_dahl
    @dawid_dahl 3 ปีที่แล้ว +1

    Really good introductory video. Thank you! (Subbed!)

  • @ADIYR
    @ADIYR 3 ปีที่แล้ว +1

    Thank you very much, this is very helpful in learning graphql from the client and server side

  • @mathiashandle5510
    @mathiashandle5510 3 ปีที่แล้ว +1

    Excellent tutorial as always!

  • @dagmawikindu4773
    @dagmawikindu4773 9 หลายเดือนก่อน

    Great video! Thank you bro

  • @cedrickvstheworld1810
    @cedrickvstheworld1810 ปีที่แล้ว +1

    Cant freaking believe i learn graphql in less that 30 mins. Thanks man

  • @user-hi1zw6rw5m
    @user-hi1zw6rw5m หลายเดือนก่อน

    It helps me a lot .Thanks

  • @shakshirastogi273
    @shakshirastogi273 2 ปีที่แล้ว

    really nice video. i got the concept

  • @parasmanikc7341
    @parasmanikc7341 3 ปีที่แล้ว

    Great Video, thanks Pedro

  • @joseantoniovela9599
    @joseantoniovela9599 2 ปีที่แล้ว

    very good, videos, thanks for help some programmers

  • @jackdo6594
    @jackdo6594 ปีที่แล้ว

    Really useful, thank you

  • @dzmitryaksionau4742
    @dzmitryaksionau4742 3 ปีที่แล้ว

    Pedro nice work. Thanck you!

  • @geonpyunglee939
    @geonpyunglee939 2 ปีที่แล้ว

    Great tutorial!! Thank you Pedro

  • @romimaximus
    @romimaximus 3 ปีที่แล้ว +2

    This is the best and better explained GraphQl video that i ever watched... you are a great awesome teacher Pedro..!!! 100 stars for you !! 😁🤘🤘

    • @PedroTechnologies
      @PedroTechnologies  3 ปีที่แล้ว +1

      Hahaha Thank you so much! I love GraphQL and I am glad that I was able to help you!

    • @romimaximus
      @romimaximus 3 ปีที่แล้ว +1

      @@PedroTechnologies estou com dúvida tenho um frontend em ReactJs, e no Graphql só tenho 1 endpoint certo ? , e no caso no front eu uso "localhost/adduser"..para adicionar um usuário...qual seria o endereço para enviar esses dados ? ..rsss...obrigado..👍

    • @PedroTechnologies
      @PedroTechnologies  3 ปีที่แล้ว +1

      @@romimaximus Boa, é um pouco differente quando trabalha com graphql. Inves de usar uma funcao como o fetch ou o Axios, precisa usar uma library de graphql pra o react. Eu uso o apollo client 3.0. Vou fazer um video explicando tudo!

    • @romimaximus
      @romimaximus 3 ปีที่แล้ว +1

      @@PedroTechnologies uai ...parceiro ...vc é BR...!! rssss....e eu tbm nem notei que escrevi em português...agora que fui ver...mas valeu..estarei aguardando...rsss...👍

    • @PedroTechnologies
      @PedroTechnologies  3 ปีที่แล้ว +1

      @@romimaximus kkkkkkk achei q c escreveu pq sabia q eu era br

  • @mohamad0192
    @mohamad0192 2 ปีที่แล้ว

    awesome teaching! ✌✌✌

  • @ThColinPereira
    @ThColinPereira 3 ปีที่แล้ว +1

    This video helped me so much! Thanks

    • @PedroTechnologies
      @PedroTechnologies  3 ปีที่แล้ว

      You're welcome! Really appreciate is colinskey

  • @vizunaldth
    @vizunaldth 2 ปีที่แล้ว

    Solid primer, thx!

  • @GuilhermeHenrique-vo1sk
    @GuilhermeHenrique-vo1sk 2 ปีที่แล้ว

    Just Awesome !

  • @DToxVanilla
    @DToxVanilla ปีที่แล้ว

    has been useful to me.

  • @emyboybeats4330
    @emyboybeats4330 3 ปีที่แล้ว +5

    This is the only video that makes sense on TH-cam 😂😂

  • @kinoshan591
    @kinoshan591 3 ปีที่แล้ว +1

    This video helped so much thanks bro 👍

  • @mwnkt
    @mwnkt 2 ปีที่แล้ว

    Thank you sir, for some reason i prefer this aproach to the apollo server way of creating graphql servers.

  • @rongzhaohua
    @rongzhaohua 2 ปีที่แล้ว

    thank you for this teaching❤

  • @maxmaksum4673
    @maxmaksum4673 3 ปีที่แล้ว +1

    bro..you are the best in explanation

  • @assimez-zaky8363
    @assimez-zaky8363 2 ปีที่แล้ว

    Great Tutorial!

  • @ricardotech
    @ricardotech 3 ปีที่แล้ว +1

    Daora Pedrão!!!! Valeu pelo videeo

  • @BobbyBundlez
    @BobbyBundlez 3 ปีที่แล้ว +1

    once again killin it with the explanations my bro. think i watched ur mysql vid a month back... now on to graphql UGH lol... bit overwhelming but ur tutorils are helping. u have a vid on apollo, graphql, and mysql by any chance? all being used together?

    • @PedroTechnologies
      @PedroTechnologies  3 ปีที่แล้ว

      Hahaha thank you! The learning proccess is overwhelming but its worth it! I have a series on graphql mysql and react. But I use typescript in that one. th-cam.com/play/PLpPqplz6dKxXRJLbOLozaQCB5Py4CEpzS.html

  • @saurabhs4743
    @saurabhs4743 2 ปีที่แล้ว

    Really good.. you remind me of thenewboston

  • @ITZindgi
    @ITZindgi 9 หลายเดือนก่อน

    At what context i should use native graphql library as you have explained very well
    over other library like Apollo client ?

  • @michaelodonovan6989
    @michaelodonovan6989 2 ปีที่แล้ว

    Good stuff. Any tips on other ways to store the user data?

  • @skverskk
    @skverskk 3 ปีที่แล้ว +1

    Excellent tutorial

  • @shabnamnaaz4676
    @shabnamnaaz4676 2 ปีที่แล้ว

    I have a question , when resolving each field , we will need to write Rest api call for fetching data , and that would be fetching complete dataset , from which fields would be returned which user requested for . how are we optimizing performance here given that our resolver will be getting complete data ?

  • @haolicoder-5898
    @haolicoder-5898 2 ปีที่แล้ว

    You are amazing.

  • @RaghavendraGowda7
    @RaghavendraGowda7 2 ปีที่แล้ว

    mutation createUser yields nulls than actual values in newer version of the graphql?

  • @taranewstime6909
    @taranewstime6909 3 ปีที่แล้ว +2

    Bro I am waiting for this

    • @PedroTechnologies
      @PedroTechnologies  3 ปีที่แล้ว +1

      Hahaha u have been asking for this tutorial for a long time! The Graphql and react tutorial is coming up soon!

  • @sugamkarki697
    @sugamkarki697 2 ปีที่แล้ว

    Smooth than a fresh jar of skippy

  • @awara6984
    @awara6984 2 ปีที่แล้ว

    Thank you

  • @mikeycatz2990
    @mikeycatz2990 2 ปีที่แล้ว

    How or what would you need to do in regards to setting the port on a live api once it is hosted on a live server?

  • @inakujoel3300
    @inakujoel3300 3 ปีที่แล้ว +1

    Really enjoyed it, but mine wasn't returning data from my database (mongodb) to the graphiQl 😭
    When I console logged it, the data was there but it wasn't accepted by graphql with no errors thrown

  • @aian-dev
    @aian-dev 3 ปีที่แล้ว +3

    I like the way that your talking already in 1.5x speed. Don't need to manually adjust it anymore lol

  • @slawekmarciniak3294
    @slawekmarciniak3294 2 ปีที่แล้ว

    After adding person object and refresh server new person dissapears.
    In mutation "create user" I add fs.writeFileSync with arguments to update mock-data.json.
    Now everything works fine.
    It is good way to make db for future upgrade? Or its better to add some db like mongo?

  • @thunderstack5365
    @thunderstack5365 3 ปีที่แล้ว +1

    Ahh I am late 😅 btw nice explaination

  • @shubhamathawale7296
    @shubhamathawale7296 2 ปีที่แล้ว

    your lectures are so damn simple and easy to learn. but which FONT and THEME you using in this tutorial?

  • @slawekmarciniak3294
    @slawekmarciniak3294 2 ปีที่แล้ว

    hi, thank you for tutorial. I've had problem. I wrote graphql: true, instead graphiql: true! Now is everything ok.

  • @nikhilverma4976
    @nikhilverma4976 2 ปีที่แล้ว

    What if I want 2 graphql endpoints. One of which is authenticated and the other is not

  • @Github_tech_with_ty
    @Github_tech_with_ty 3 ปีที่แล้ว

    What extension imorted Graphq list automatically

  • @mahesh4274
    @mahesh4274 3 ปีที่แล้ว +1

    Awesome

  • @silvesterwali6565
    @silvesterwali6565 3 ปีที่แล้ว +2

    hi pedro i have follow along your video ..and it amazing . and i found that you seperate the grapql User type . and when i add another type just say cityType then i add city to user type and use the cityType and call with user query example user {_id,name,city{_id,cityName} } ...and it work as i expected.but now when i add user type in city type and what i want is get all user who live in city but i get error for this ....

    • @PedroTechnologies
      @PedroTechnologies  3 ปีที่แล้ว +1

      Thank you! So let me understand it better. You defined a model for user, and each user has a field which is a city type correct? And now u want to query all users from a certain city? In this case is more about the database you are using rather than graphql. Which db are u using?

    • @silvesterwali6565
      @silvesterwali6565 3 ปีที่แล้ว +1

      @@PedroTechnologies hi bro ...i using mongodb but the problem is not about the type between usertype and city type but how the module should be use ..and i found the similar problem and found the solution too in stackoverflow.com/questions/61259799/graphql-one-of-the-provided-types-for-building-the-schema-is-missing-a-name
      ..

  • @wasimakram5826
    @wasimakram5826 3 ปีที่แล้ว +1

    Excellent , I enrolled to graphql course in Udemy, but it is confusing , Thanks alot , Eagerly waiting for next videos creating api with graphql and react

    • @PedroTechnologies
      @PedroTechnologies  3 ปีที่แล้ว

      Glad you liked it! I plan on making a lot more graphql series! I posted another video on graphql with react!

  • @MohitKumar-kt5ss
    @MohitKumar-kt5ss 3 ปีที่แล้ว +1

    Bro, can you tell redux is necessary for mern stack or not? I am fresher in this field. I learned crud operation in mern from your channel but I have this confusion.

    • @PedroTechnologies
      @PedroTechnologies  3 ปีที่แล้ว +1

      It is not necessary! State management is important, but redux is not the only state management library. React has a built in api for state management called the Context API, and I like using it!

    • @MohitKumar-kt5ss
      @MohitKumar-kt5ss 3 ปีที่แล้ว

      @@PedroTechnologies thanks bro, you are doing great

  • @katyat6127
    @katyat6127 8 หลายเดือนก่อน

    Great tutorial.All working except of reading json file. Getting "getAllUsers": null. I tried just to read json : const data = JSON.parse(userData) and log it to console and gettiing: undefined:1
    [object Object],[object Object],[object Object],[

  • @BeepyDev
    @BeepyDev 3 ปีที่แล้ว +1

    Good tutorial, but in post production you have to fix those errors ahead of time, or have some kind of time stamp pop up to correct it. I spent a good 20 minutes wondering why my server wouldn't run, until I realized myself that I had to destructure GraphQLObjectType & friends from graphql AFTER the es5 import (like you did at 25:55).

    • @PedroTechnologies
      @PedroTechnologies  3 ปีที่แล้ว +1

      Sorry about that! Its kinda difficult sometimes you know. I also want to keep authenticity, like I hated when I was learning and I watched a video of someone doing everything perfectly and pretending not to be looking to the code already premade in another screen. When I do my videos I like to code while I talk cause if I make a mistake I can show how to solve to you guys. This time it was kinda bad hahaha but I will try to stop this errors!

    • @BeepyDev
      @BeepyDev 3 ปีที่แล้ว

      @@PedroTechnologies Thats okay it's completley understandable -- just wanted to offer some constructive criticism is all. This tutorial was otherwise very very fruitful! Thank you for making it : )

  • @kerimkeskin927
    @kerimkeskin927 3 ปีที่แล้ว +1

    👍🏻

  • @anshumanxda
    @anshumanxda 3 ปีที่แล้ว +1

    NIce PORT

  • @amartyachoudhary6793
    @amartyachoudhary6793 2 ปีที่แล้ว +3

    The best part of the video was that he ran the server on PORT 6969

  • @boffinschist1098
    @boffinschist1098 3 ปีที่แล้ว

    I'm getting null data returned in GraphiQL at 28minutes into the video. I followed it to an absolute tee, even changing parts of the code that you changed about 3 times with saying anything about it. I barely knew where the on switch was on a computer so I did well to get up to there. It says "getAllUsers": null in the response. I have tried the code from github but it includes stuff in video 2 and doesn't work. I guess there would be things I need to include to make that work. Hope someone can tell me what's going on with the "getAllUsers": null response.

  • @KitKat-dl6ec
    @KitKat-dl6ec 3 ปีที่แล้ว +1

    What's this VS code extension for autocomplete GraphQL syntax?

  • @amine1644
    @amine1644 ปีที่แล้ว +1

    Only a man of culture would choose port 6969.

  • @JosephAli93
    @JosephAli93 2 ปีที่แล้ว

    actually, npm install express-graphql didn;t work for me, so i did npm install express only

  • @artax5005
    @artax5005 9 หลายเดือนก่อน +1

    Unfortunately "graphql-express" package is deprecated.

    • @mr_bade_shubhzzz90
      @mr_bade_shubhzzz90 5 หลายเดือนก่อน

      Hi I am following this video. Could you please help me if you have any other reference or solution. Any help will be appreciated 🙂

    • @artax5005
      @artax5005 5 หลายเดือนก่อน

      @@mr_bade_shubhzzz90 Sorry, but I decided not to use Graphql.

  • @fannoth1
    @fannoth1 2 ปีที่แล้ว

    Have somebody code from the start of video? Not the end of course.

  • @Yolosopher27
    @Yolosopher27 3 ปีที่แล้ว

    man you are so cute and clever... Excellent at explaining, I subscribed (P.S. no homo xD)

  • @IkraamDev
    @IkraamDev 3 ปีที่แล้ว +1

    Search “JavaScript Mastery Best Terminal Configuration”

  • @lakshaykhurana455
    @lakshaykhurana455 3 ปีที่แล้ว +1

    Please add the code link in the description.

    • @PedroTechnologies
      @PedroTechnologies  3 ปีที่แล้ว +1

      Here it is: github.com/machadop1407/GraphQL-ApolloClient-Template

    • @lakshaykhurana455
      @lakshaykhurana455 3 ปีที่แล้ว

      @@PedroTechnologies Thanks!🤗

  • @albertomedinarobredo
    @albertomedinarobredo 7 หลายเดือนก่อน

    Are your parents from Spain?

  • @Shellflower1234
    @Shellflower1234 3 ปีที่แล้ว +1

    You’re so cuteeeee

  • @rolikaseventysix
    @rolikaseventysix 3 ปีที่แล้ว

    .. Go back twice?Just no! However, thanks for the video, cool one!

  • @muhammadshahbaz-op4ei
    @muhammadshahbaz-op4ei 3 ปีที่แล้ว +1

    SIR kindly upload all the code on github, so sometime it's easy to understand from code, after watching the whole video,

    • @PedroTechnologies
      @PedroTechnologies  3 ปีที่แล้ว

      Sorry about that, here is the link: github.com/machadop1407/GraphQL-ApolloClient-Template

  • @The_Pavanputra
    @The_Pavanputra 2 ปีที่แล้ว

    I understood nothing

    • @PedroTechnologies
      @PedroTechnologies  2 ปีที่แล้ว

      I'm sorry to hear that. What exactly did you have trouble with?

    • @The_Pavanputra
      @The_Pavanputra 2 ปีที่แล้ว

      Looks like you just gave a walkthrough over the code and didnt really feel the need to explain.

    • @PedroTechnologies
      @PedroTechnologies  2 ปีที่แล้ว +1

      I understand! I try to use criticism to improve my next few videos. This video is pretty old so I agree I might not be the best one out there. Anyways, if you need any help I do have a full graphql series where I go over this and I for sure go over and explain everything :)

  • @CodeWithPrajwol
    @CodeWithPrajwol ปีที่แล้ว

    localhost:6969 (sus) 😳⚫ the way you teach is really amazing. Keep it up

  • @garrysandhu4197
    @garrysandhu4197 3 ปีที่แล้ว +1

    Awesome