The quality of your videos is at another level. Appreciate it! Specifically your approach to tell the story: first briefly describe what we are going implement, then you show the result of each small step instead typing line by line, and your explaination has enough details to understand the code. I wonder if you could do another video, based on this existing code, to show how to add authentication using NextAuth, and how to login using JWT. That would be great!
Thank you so much, that is the single best compliment I have ever received :) I have done a video on username & password auth with GraphQL NestJS but I suppose I could build on this tutorial and do the UI for that. I'm not familiar with NextAuth so I will look into that.
@@stevenz1276 Good question, you can see an example of that here: github.com/tomanagle/NextJS-NestJS-GraphQL-Starter/blob/master/client/lib/withApollo.tsx#L24
@@TomDoesTech As you are going this is perfect, I have searched a lot for this kind of content in Spanish and even English and just a few days ago I came across this gem of a channel.
On 7:00 i'm getting this error: "React Hook "useRouter" is called in function "render" that is neither a React function component nor a custom React Hook function." How i can fix that?
@@TomDoesTech So you know how you do getStaticPaths and execute query inside that, so it generates pages for every slug! Is that possible with this setup? Ideally I would have used Apollo client and fired a query inside getStaticPaths, but that won't let me use the power of codegen w.r.t. generated hooks. I want to keep the pattern consistent in my project, so want to use hooks for fetching data everywhere. Hope my question is making sense. :)
@@sumitgovil2311 okay yeah, I get what you're asking now. You can't use hooks outside of a React component, so you can't use hooks in getStaticPaths. However, hooks aren't the only way to query a GQL API and hooks aren't the only thing that graphql-code-generator can output. I'm not sure exactly what the answer is but I think it will be something like `client.query(generated_query)`
The quality of your videos is at another level. Appreciate it! Specifically your approach to tell the story: first briefly describe what we are going implement, then you show the result of each small step instead typing line by line, and your explaination has enough details to understand the code.
I wonder if you could do another video, based on this existing code, to show how to add authentication using NextAuth, and how to login using JWT. That would be great!
Thank you so much, that is the single best compliment I have ever received :)
I have done a video on username & password auth with GraphQL NestJS but I suppose I could build on this tutorial and do the UI for that.
I'm not familiar with NextAuth so I will look into that.
I have a question regarding the `headers` in `nextWithApollo`, how can we pass the values(like a JWT token) to `headers` ?
@@stevenz1276 Good question, you can see an example of that here: github.com/tomanagle/NextJS-NestJS-GraphQL-Starter/blob/master/client/lib/withApollo.tsx#L24
Thanks for your videos, I learn a lot to improve my architecture
Thank you :) Please let me know what other tutorials you would like me to do.
@@TomDoesTech As you are going this is perfect, I have searched a lot for this kind of content in Spanish and even English and just a few days ago I came across this gem of a channel.
Thank you! I was missing 'getDataFromTree'
Excelent video, Thanks for your effort
This tut is soooo cool and helpful, thanks a lot!
Thanks man!
On 7:00 i'm getting this error: "React Hook "useRouter" is called in function "render" that is neither a React function component nor a custom React Hook function." How i can fix that?
I'm getting the same error :(
@@emmanuelpolancojimenez7807 did you solve this issue??
alhamdulillah, understand it greatly
Thank you for the tutorial. This is very helpful.
Excellent video. I wonder will I be able to generate paths using these generated hooks anyhow?
What do you mean by generate paths?
@@TomDoesTech So you know how you do getStaticPaths and execute query inside that, so it generates pages for every slug! Is that possible with this setup? Ideally I would have used Apollo client and fired a query inside getStaticPaths, but that won't let me use the power of codegen w.r.t. generated hooks. I want to keep the pattern consistent in my project, so want to use hooks for fetching data everywhere. Hope my question is making sense. :)
@@sumitgovil2311 okay yeah, I get what you're asking now. You can't use hooks outside of a React component, so you can't use hooks in getStaticPaths. However, hooks aren't the only way to query a GQL API and hooks aren't the only thing that graphql-code-generator can output. I'm not sure exactly what the answer is but I think it will be something like `client.query(generated_query)`
@@TomDoesTech
@@sumitgovil2311 ?
Hey, I have one question. What is the advantage of not using getserversideprops function for ssr and instead use it this way ?
You can't use hooks in getserversideprops
What if we want to access req and res from context wich exist in context of getServerSideProps?
You access it with ctx.req
How can i spy and test my query/mutations calls ??? Didnt work