GraphQL Crash Course - GraphQL NodeJS
Vložit
- čas přidán 7. 07. 2023
- In this beginner-friendly CZcams crash course, join us as we dive into the world of GraphQL, the revolutionary query language for APIs, alongside Node.js and React.
FullStack Twitter Clone (25% OFF)
► learn.piyushgarg.dev/learn/tw...
Code Files
► drive.google.com/file/d/1xFYT...
Key topics covered in this crash course:
► Introduction to GraphQL and its Benefits
► Understanding GraphQL schemas and resolvers
► Creating a GraphQL server with Node.js using popular frameworks like Apollo Server
► Integrating GraphQL with React to build dynamic and efficient user interfaces
Hashtags
#graphql #graphqlapollo #graphqlserver #nodejs #nodejstutorial #mernstack #reactjs #nextjstutorial #nextjs #graphqlapi
Loved it. Please group all the graphql videos in a playlist in order, this will be really helpful.
Finally, Highly recommended content, My all confusions cleared, Really Appreciated!
Thanks a million for this video, really got the in depth knowledge of what graphQL is and how it works. Would be amazing to see more videos on react and graphQL.
Awesome video Piyush. A great entry point to start exploring GraphQL. :)
btw, the error came because you mistakenly called wrong endpoint in the Todo -> user Resolver. You called ${todo.id} instead of ${todo.userId}. Because there are only total 10 users, so uptill 10 todos, it was able to show the user data but at 11th todo, user data is null.
Best and my Favourite teacher on CZcams 🔥. Love you piyush sir for this amazing course. If Possible please make NextJS + postgreSQL course.😊
I would like to point out a miss where you have fetched a user based on todo.id, that is why you are getting many records with null user.
Instead if we fetch user with todo.userId, the issue would get resolved. The data in the placeholder API is perfect.
Thanks though! I wanted to learn GraphQL, and you video was extremely helpful.
Thanks Man
Please keep on uploading more videos, it helps a lot, Thank you Sir!!!
Hey Piyush! Thanks for the tutorial. Please create a playlist of all GraphQL videos
It was not rate limiting but rather it was issue with your user code in that you fetched data of user.id and not user.userId. that's what the error was. bw tutorial is owesome.
What an amazing tutorial. Thank you, Piyush.
This crash course is best for graphql starting journey ❤️❤️
This was very helpful to understand the GQL , I was looking for node+GQL but also got it with react , So win-win for fullstack dev
One of the best Teacher on CZcams ❤
Amazing Content Piyush....Loving your videos
I wait for long time thanks 👏👏👏👏
Great video and good explaination. There is just one thing which is kind of confusing for me. Correct me if I am wrong, I think the user resolver which you wrote for todo and user relation should be userId not id of the todo. It was working fine because the todos and users were connected with the ids in ascending order.
Aare bhaiya mai kal ye hi sikhne ke liye CZcams prr video dekh raha tha, aaj aapne hi video bna thi, 👏👏🙏🙏🙏
Thanks!
Thanks bro for this ❤️
what I love about Piyush Garg, is that he explains the problem for which any specific concept came as a result to solve that problem. He lets us understand problems so easily, sequentially, and nicely. Thank You Piyush.
❤️❤️
@@piyushgargdev You are Pro.! Love your content.
Very nice 😊 really deserve my like. 😊😊😊
Keep going❤
amazing sir .......... waiting for that literally
great one .enjoying your content a lot .
I was just thinking about to learn graphql, and started watching a crash course by @hitesh bhaiya, and suddenly I saw you video. What a coincidence 😂, you are great ❤.
Wow sir thanks for the course your the best tutor
At 26:30 I think there should be ${todo.userId} inside the resolver for Todo -> user. Otherwise it will fetch the user details according to the id of the todo but not the actual user details who added the corresponding todo. Not an error but just a logical issue. Also we have to define userId: ID! inside the Todo schema.
This is also the reason why we are not getting no users for some the todos at 40:29
true bro
your solution worked .
can u explain this please
we are not specifying userId anywhere in our typedef then how graphql knows that this field exist
First of all followed your threads account and secondly
What an optimistic voice😌
But please bhaiya crash course nahi,long videos daalo
Different from others
Optimistic voice ?? Girly voice hai bhai
@@AK-ln2koHijde ho kya??
Kitna soft voice hai Piyusha bhaiya ka..
Best video i will found for graphl can.
What vsCode theme do you use?
Awesome, Explanation, please make a project with graphql and react redux with node js express, redis with deployment
Thanks for posting amazing content.
Awesome video bro
00:02 Introduction to GraphQL and its benefits
01:51 Handling data structure and practical examples
05:48 Optimizing application by reducing unnecessary API calls.
07:39 GraphQL can efficiently fetch and filter data in a single query
12:05 Implementing the GraphQL server and handling requests on /graphql
14:17 Creating GraphQL types and queries
18:00 Creating a function to make API calls with data access and type definition.
20:05 Creating a user type with fields like ID, name, email, phone, and website.
23:37 Fetching user ID and binding it to a new operation
25:30 Nested queries in GraphQL
29:04 Setting up Apollo client with URI and cache options
30:45 Using GraphQL to pass queries and import Apollo Provider
34:22 Error code 44 due to rate limiting hits
35:58 Creating a fake database for users in GraphQL NodeJS.
39:58 Understanding GraphQL and its data retrieval process.
41:50 The course covers creating a Twitter clone with GraphQL.
Crafted by Merlin AI.
whatever done by graphql can also be done by mongodb select and populate methods, so what is difference between all, i am confused by this. will it increase request time ?
Hey Piyush! Thanks for the tutorial.
Can you please help with a video on how to setup graphql in nextjs(latest).
Kya mast cheez hai graphql bhai !
How do you create your videos, they are cool like what tools you use for recording, editing
Awesome video...
which pen tab and software you use for your screen and voice recordings. plx share details
Hi, Is there any OpenSource repo of graphql where we can contribute?
excellent course
amazing bro
it is amazing
Excellent video
Whats the point of using graphql if you are already using mongoose + mongodb, the queries in it serve the same job. Is graphql for when theres no using mongodb or something with similar querying?
Bhaiya why you have use bodyparser as express already have express.json() now previously there was nothing like that that's why we have to use bodyparser but not we don't have to. I guess correct me if I am wrong
Best teacher
Why a seperate server for graphql isnt that a api query lang, wouldnt it run on my existing server?
Sir, how do we apply rate limit in graphql
Nice bro
Sir please make NextJS 13.4 + GraphQL course 😊.
Sir can we have a course on postgresSQL ??
Thanks.
Sir prisma kese use krte h nextjs me ??
Awesome
Sir please continue AWS series 😊
Hii sir in Twitter clone course, can we will be able to interact with you
Thank you for explaining nicely, but if i want users name for the all the users example 10,000 users , i does it hit the get user by id 10,000 times and give you the data?
bro it has a getalluser where you get all users and just there id
OP AAg laga di bhaiya
Are dipansh bhai aap yaha (I'm one of the students of supreme 2.0 batch)
Wait is over
sir please make a video on how to use AWS with Node js 🙏🙏🙏🙏🙏🙏🙏🙏
🔥
Thanks
@piyush please can you review your this video, because it showing wrong way to resolve dependency of type in resolver, therefore you are seeing only name for first 10 data at 40:23. Can you please correct content? you are basically consuming id of todo as userID which is wrong. Please correct video. Thank you.
Bro, the error occured because you was fetching Todo.user with todo.id insted of todo.userId . {only 10 users and 100 todo's are there. } . I hope this was helpfull.
Agreed
how to connect it with nextjs
👏👏
Sir make a tutorial on NextJS 13.4 and GraphQL.
Hello sir, If you could explain the thiings in which you are saying "Ab mai yaha pe kya kar sakta hun...." then it would have been far more better than this.
Bhai aap ka api se and file se read karne mai dono mai ek hi issue tha resolver mai
todo.userId hona chaiye tha
Na ki todo.id
Is liye usko 10 k baad k user milne bnd ho gye
thanku
I think there is mistake, you should take ''userId' instead of 'id' in user sub model at 25:25
yessssss!
Also make on mysql with sequlize
Bekar Ki Bata wa epic
But the mentioned problem can be easily solved like use "Select name from Table" Instead of "Select * from Table" . Isn't it?
These are SQL queries. What we are doing is NoSQL
Need NextJS + GraphQL course.
Need nextjs+graphql
Sir do complete the kinde 2nd part vidio
Please make a video what is git and GitHub
Interesting video .... From Ludhiana👍
sirr aap kuch din pehle nikal dete meko intern ka project dena tha graphql waala
This is cause n+1 query problem
website is not working
bhaiya dsa par video banaiye
Maybe you didn't explain the problem statement aptly.
GraphQL might have some advantages over REST calls, but according to what you explained, the problem GrapgQL solves, we can we do the same thing using mongoDB aggregations (or using joins in SQL DB).
Then why would be use GraphQL.
Again, there might be some more advantages to using GraphQL which you might have missed.
agree..
you are not getting the point
It got the data in a single API call you dont need multiple API likes in REST API
Sir todo. Userid likho error nahi ayega
Body parser ,express me inbuilt hai I guess?
yes no need to explictly include body parser
9:40 main content starts...
please to make a video English also
Please give English subtitles ot tell some words in English also
upto 26:00
Your teaching explanation is fine but u are very fast
main nahi btaunga ki aapne harkirat sir ka course buy kia hai
Because thats true, I never bought any 🤓
@@piyushgargdev I know sir, I was just kidding 😍 you have a great knowledge ❤️❤️ and explanation is too good🥳
Crash course? Where is mutation??? Man wasted my time here.
Also about u getting error is in ur code base. Use userId instead of id when u r writing nested query.
This video is of no use, there is mistake in your code😡😡😡😡
And whoever said that the video is good and in which code does not know
Or is it your friend or you who does everything to create your videos hype
Is resolver, after /users/${todo.id}, make sure it is ${todo.userId} instead of id. That's the trouble he was facing.
Great tutorial ♥♥♥♥I really like the way you explain complex concept in a very simple manner but Why we are using apollo for graphQL instead of express-graphql? Just a little doubt 🫤🫤
todo.userId hoga...
You are getting error as the mapping is not correct
Actual=> todo.userId=user.id
you => todo.id=user.id
their are 200 todos with different id and only 10 users
Right bro
I think you did a simple mistake here. but no worries i found it and corrected it for my self
In Resolvers:
Todo :{
user:async(todo)=> await axios.get(`url/${todo.userId}`).data
}