Hey guys! I'm going to need your help with this one, could you help me get this video to 1,000 likes?! 😄 Let's get more eyes on TeamSeas! Make sure to check the description for timestamps and more details. Donate at: teamseas.org/
Dude you are a godsend!! Most of the dependencies got depreciated by now but that can be fixed by reading docs a bit! I am at the first 30 min of the video and I am already loving it!!!
Just finished watching it. I watched it in chunks in my free time and I really enjoyed it. Maybe do sth like this in the future more like a series ,because these 2+ hour videos are hard to watch in 1 go
Thanks for the input, but a series of separate videos requires that you click on the correct videos in the right order… if folks find the later videos they’d also have to try and find part 1… etc.. it’s just overall simpler for viewers to have one video to bookmark and come back to in my opinion. I did add a crazy amount of timestamps on this one because I figured nobody will watch in one sitting I think your idea would be good however if each part of the series can effectively act as a standalone video on its own, without prior context. I will think about this in the future. Thanks!
10+ hour video with good timestamps is better that 20 * 30 min videos. Unless you are in a playlist there is no guarantee TH-cam will recommend the next video in the series meaning you have to go find the next video if you wanna skip a part. No wasted time with intros and outros. One video to add to a list. This format makes perfect sense for full integration examples like this, short videos are much better for tutorials explaining one concept in more detail.
Just wow... I haven't watched this all yet but the preview at the start excited me! I learned NestJS from your crash course and have been using and loving it ever since. Can't wait to jump into this. Keep up the amazing work!!
Can you do a video or series of "Good API design practices for GraphQL & REST using NestJS - expecially query filter, search, pagination, file uploads, etc"? Preferably using eCommerce or airbnb as a usecase for the API design
You're awesome! Thanks for sharing such valuable content. I'm just starting a new school management system in Brazil and this content is really useful.
Hi Marius. Do you have a video to sum up all the awesome tips and tricks you have? A good example is the way you're generating the constructor. I didn't spot that in the first NestJS video. And maybe a summary would be much appreciated by the community (shorthands, plugins, theme, and more tips and tricks). If the contructor are actually a shorthand, it would be mush appreciated to have to shorthand shown on the screen. Another good example is where you're destructuring the "orderBy" at 48:36. You're VERY GOOD at creating the proper focus on the screen already :-D
I’ll think of putting one together! The constructors I’m not sure I did anything to generate those though, it might just look like it because of the video editing 😄 thanks for your tips!
Hey Marius, 00:53:32 - Enable Validation with class-validator This is for graphql validation. is there any package for REST-API? I am comfusing which one should I use between TypeORM with DTO and Prisma.
Hi I really enjoyed your other videos. At 15:36 you're running the gen-typings, but it's somehow failing here, and throwing a `UnhandledPromiseRejectionWarning: TypeError: graphql.getDescription` error. Should I downgrade a module, or would a comment be useful, so we can have it working as expected? I'm on a Windows system right now.
Oh, snap... getDescription was deprecated four years ago, and it was also stated as removed in v15. I'm unsure why it's working with "graphql": "^15.7.2", but not the latest version. So it's broken from v16.0.0, but somewhat managed to stay in the package up till the end of v15.
The left most number in semantic versioning means breaking changes when it’s bumped. It would make sense that in v16 it’s broken and doesn’t behave the same, if they took that functionality out of v15 early then they would be forced bump to the number to 16, which they likely didn’t want to do right away. Anyways glad you found the problem, I’d recommend either downgrade or check the docs for the proper setup with v16
Great video Marius! But i'm having a problem setting up ws in Nextjs on the frontend, it's saying i should 'webSocketImpl: WebSocket' in createWSClient but it's also throwing an error. I couldn't find any helpful solution. What should i do to get it running with Next.js?
I’m wondering will there be any tutorial about React + Nestjs + Prisma in the future? It’ll be really really helpful. You did a very good job in this one as always. Thank you man I learnt a lot!
possibly! this one took a lot of time to put together because there is so much to talk about to each of those frameworks. It almost makes it very advanced. But I'll see if I can come up with some project ideas!
Great video! I'm currently looking in to how Prisma and their schemas work since I didn't get too fond of SQL when learning it for a week in my education.
Thanks! I do have a general video on nestjs auth with passport which allows for different kinds of auth “strategies”, you’d just have to use an oauth based strategy
Hey Marius I love your videos! I have a question, in this tutorial, I think the validations is pretty bad because it uses /// and no autocompletion and it's quite hard to do custom validations. So, because of that would you think that we better go with the code first approach? or what do you think the pros and cons about code first and schema first? (with a case of me being a complete newbie in backend and just starting to learn nest, graphql, prisma, postgres)
Good question, I think which ever way you go with code/schema first is largely preference. In this video I thought schema first would make more sense because it would be similar to the prisma schema… although looking back I probably prefer code-first myself. I have an older video on graphql code-first in the channel if you’re interested, I also used code-first it my most recent graphql auth video. Regarding the comment-based validation, yeah it’s a little hacky to be honest and probably doesn’t work great for more complex things. If you do go the code-first route then you’d be defining TS classes anyways and you can just do your validation on there with the usual decorators. Maybe I’ll make a new video comparing the pros/cons of either approach, but I would say preferences aside: code-first I think is simpler but more boilerplate. In nest specifically code-first works great because you can take full advantage of all decorators . Not sure there’s really any cons other than added boilerplate. Schema-first somewhat aligns better with prisma, which itself is also schema-first (auto-generate type definitions), cons being it limits your options for customization of those generated types/classes (exactly why we have to do these workarounds with comments in the schema)
This course is not working with nestjs 11.I am new in nestjs and i can't handle with migration unfortunettly.I added driver do config but in 17 min i can't see donation like you in sandbox.I am sad.
No such thing as nestjs 11, current version is 9. Regardless this is an old video, the fundamentals should be the same ideas but obviously open source APIs change over time, please check docs and release notes
Great video! Do you know why when adding to the db with fakerjs foreign key constraint fail on the column `postId`? I wrote to stackoverflow under the tag prisma, but there was no answer. Why did the foreign key constraint fail on the column `postId`?
Well FK constraints would usually fail if the related data isn’t already there. For example if you tried to insert a new item with postId 123 but you haven’t yet inserted to the Post table an item with id 123
Hey! Just wondering about validation with Prisma, Nestjs and Generated. I realized when i wanted to update an item the fields did not have validation but when i was creating the item yes. did i miss something in the configuration? Cause if that the case, almost creating a new DTO seems better than requiring this unfitting auto-generated schemas.
I don’t think I covered the update flow in this tutorial since updates don’t make sense in this app, it would be odd to allow users to modify their donations. Anyways actually I might have mentioned it in the other comments but looking back I actually am not a fan of the auto generation for validation, I’d probably explicitly define a DTO class and just use class-validator. The only downside to that is now if the schema changes you need to make sure to sync up your DTOs and also you essentially would be re-defining parts of the same exact schema but maybe that’s not terrible
@@mariusespejo auto generators are great, but i realize it was a lot of files just for a donation schema, wouldnt imagine for more schemas in the scene. However, thanks for replying :D
I know my comment is very late but just for the sake of anyone wondering about this issue, in the 'generator nestgraphql' part in the prisma schema you can add this line: noAtomicOperations = true it will add validation decorators to the generated update types
I gotta ask. I haven’t cracked the lid on this video yet, but the question is, are you liking prisma more than TypeORM? I really need to build something and get out of tutorial hell so I need to pick a data layer sandwich.. NestJS, GraphQL and ??? TypeORM? Prisma? Thanks.
I’d probably pick prisma personally if I was making a new project. Typeorm works great with Nest though, because defining entities using decorated classes very much “fits” in the Nest style of things. Take the time to read the docs of both a little bit… you don’t need to do a full tutorial. Just visit how do you define models/entities and how to do basic queries on either one. Pick whichever is intuitive to you.
what are the common debug steps if we can't enable sandbox? I keep on getting "Unable to reach server" on the sandbox page and the npx command nor enabling cors fixes it :/
Hmm sandbox is fairly new, this is the first time I tried it actually. if you run into problems you could always revert back to the regular graphql playground, I’m not really sure how to debug it worked fairly seamlessly for me
Hi Marius , your tech content always better. I m following you from long back recently started prisma and graphql just have one question how will generate graphql schema from prisma schema it will great help if u will suggest something better
Thank you! Regarding your question, I’m not sure that I would suggest that, even if it were possible. Your database schema and your api (graphql) schema will not always map one-to-one. More likely than not, your graphql schema would be (really should be) an interface designed for clients, and your clients shouldn’t necessarily know about the underlying database or it’s schema
Maybe you can open a from beginner to advance topic on nestjs? Like talking deep dive of How decorator works because this is the important concept of nestjs . How dependency injection or life cycle. The behind concept of forRoot , forFeature…etc It definitely helps people to get more confident of what they are using. Not just copy and paste the code . BTW , Because of your tutorial, I will use nestjs to my next project also give you a like .Thanks
yup you could say this one is more in the intermediate range with all the topics involved, ideally folks who have seen Nest before. If you haven’t and need some beginner stuff though I do have several focused Nest tutorials in the channel. There is one for the absolute beginner fundamentals. But I see what you’re saying, maybe more deep dives, will consider it. Thanks for input!
10/10 for tutorial. Wonderful and I learnt a lot from this. Thankyou for that. I was really waiting for this tutorial since you announced in community post. But Being a Laravel dev, I think can be this can be implemented in Laravel in 10-20 minutes. Please correct me what i am lacking here .
don’t forget that the time it takes to effectively teach does not equate the time it takes to actually develop. I can implement the same API in REST in 10 minutes… but it doesn’t mean one can teach it (or for another to understand) in that same amount of time
for example try teaching laravel to someone who has not seen it before, or worse has not made an API before. Would that take 20 minutes? I’ve never used laravel for example, I bet it would take me a while. Hope that makes sense. It is quite a bit of setup I’ll admit but once you get past that adding to the API mostly requires updating schemas and resolvers
yeah I can see that, it’s all preference honestly. If you go code first you just end up representing the same schema just at a different spot. Although yes, since the resolvers are already using decorators to mark which methods are queries/mutations it’s a little bit less repetitive
45:32 I am getting error when using @Args and Prisma generated types , It is Undefined type error. Make sure you are providing an explicit type for the "create" sth like that. With the following code @Args('createDonationInput') createDonationInput: Prisma.DonationCreateInput, How am I able to solve it, I can't solution online
Hey guys! I'm going to need your help with this one, could you help me get this video to 1,000 likes?! 😄 Let's get more eyes on TeamSeas!
Make sure to check the description for timestamps and more details. Donate at: teamseas.org/
This is the best FullStack video exactly what I want.
Dude you are a godsend!! Most of the dependencies got depreciated by now but that can be fixed by reading docs a bit! I am at the first 30 min of the video and I am already loving it!!!
Thanks! I’m glad the deprecations didn’t hold you back, it’s hard to keep tutorials like this updated as things change quickly
Great video Marius! Keep it up!
Thanks Milena!
Just finished watching it.
I watched it in chunks in my free time and I really enjoyed it.
Maybe do sth like this in the future more like a series ,because these 2+ hour videos are hard to watch in 1 go
Thanks for the input, but a series of separate videos requires that you click on the correct videos in the right order… if folks find the later videos they’d also have to try and find part 1… etc.. it’s just overall simpler for viewers to have one video to bookmark and come back to in my opinion. I did add a crazy amount of timestamps on this one because I figured nobody will watch in one sitting
I think your idea would be good however if each part of the series can effectively act as a standalone video on its own, without prior context. I will think about this in the future. Thanks!
10+ hour video with good timestamps is better that 20 * 30 min videos. Unless you are in a playlist there is no guarantee TH-cam will recommend the next video in the series meaning you have to go find the next video if you wanna skip a part. No wasted time with intros and outros. One video to add to a list.
This format makes perfect sense for full integration examples like this, short videos are much better for tutorials explaining one concept in more detail.
Just wow... I haven't watched this all yet but the preview at the start excited me! I learned NestJS from your crash course and have been using and loving it ever since. Can't wait to jump into this. Keep up the amazing work!!
Can you do a video or series of "Good API design practices for GraphQL & REST using NestJS - expecially query filter, search, pagination, file uploads, etc"? Preferably using eCommerce or airbnb as a usecase for the API design
will consider it! thanks for the ideas 💡
@@mariusespejo I would also be into this! 🙂
Thank you Marius, I really appreciate this! Your wonderful videos gives me a chance to learn something new in the way I like 👏
And I appreciate your feedback! Glad you’re enjoying the content!
MY MANNNNNNN 🔥 amazing brother keep it up
😄🙌
WOW ... I was waiting for THIS ONE ... THANK YOU!!!!!
Hope it’s useful for you!
@@mariusespejo Thanks Marius
Wow really good tutorial. Please do more clone project videos with this stack. Thanks!
You're awesome! Thanks for sharing such valuable content. I'm just starting a new school management system in Brazil and this content is really useful.
Thank you! Sounds like a great project, good luck on that!
really appreciate this tutorial. Thanks
Great work for a great cause!
Hi Marius. Do you have a video to sum up all the awesome tips and tricks you have? A good example is the way you're generating the constructor. I didn't spot that in the first NestJS video. And maybe a summary would be much appreciated by the community (shorthands, plugins, theme, and more tips and tricks). If the contructor are actually a shorthand, it would be mush appreciated to have to shorthand shown on the screen. Another good example is where you're destructuring the "orderBy" at 48:36. You're VERY GOOD at creating the proper focus on the screen already :-D
I’ll think of putting one together! The constructors I’m not sure I did anything to generate those though, it might just look like it because of the video editing 😄 thanks for your tips!
congrats for the 10k subsscribe.
Thank you Daniel!!
love this video,hoping more tutorial on nest graphql react and typescript😘
Great tutorial, would love to see a deployment follow-up with some way of CI/CD.
Thanks! I’ll have to think about that, there are so many different ways you can deploy an app like this, depending on your needs, budget, etc.
Amazing work! Thank you a lot.
Thank you!
You've earned a sub. Awesome!!!
Thanks man!!
Great video, thank you Marius! It would be nice to implement training donations with a bank card. But that will probably be homework 🙂
Hey Marius,
00:53:32 - Enable Validation with class-validator
This is for graphql validation.
is there any package for REST-API?
I am comfusing which one should I use between TypeORM with DTO and Prisma.
for REST I have not found a generator like that, you’d have to just manually define your DTO class and add class validator decorators on it
WoW my dream stack … thanks for posting
no problem!
Hi
I really enjoyed your other videos. At 15:36 you're running the gen-typings, but it's somehow failing here, and throwing a `UnhandledPromiseRejectionWarning: TypeError: graphql.getDescription` error. Should I downgrade a module, or would a comment be useful, so we can have it working as expected? I'm on a Windows system right now.
Oh, snap... getDescription was deprecated four years ago, and it was also stated as removed in v15. I'm unsure why it's working with "graphql": "^15.7.2", but not the latest version. So it's broken from v16.0.0, but somewhat managed to stay in the package up till the end of v15.
The left most number in semantic versioning means breaking changes when it’s bumped. It would make sense that in v16 it’s broken and doesn’t behave the same, if they took that functionality out of v15 early then they would be forced bump to the number to 16, which they likely didn’t want to do right away. Anyways glad you found the problem, I’d recommend either downgrade or check the docs for the proper setup with v16
Great video Marius!
But i'm having a problem setting up ws in Nextjs on the frontend, it's saying i should 'webSocketImpl: WebSocket' in createWSClient but it's also throwing an error. I couldn't find any helpful solution. What should i do to get it running with Next.js?
Sorry I don’t have an answer for that, might want to ask in stackoverflow
The tech stack in this video is my bucket list.. Thank you very much with your sharing.. Do you have any plan to make denojs tutorial?
I haven’t had a chance to look at deno yet although I’d like to at some point
I’m wondering will there be any tutorial about React + Nestjs + Prisma in the future? It’ll be really really helpful. You did a very good job in this one as always. Thank you man I learnt a lot!
possibly! this one took a lot of time to put together because there is so much to talk about to each of those frameworks. It almost makes it very advanced. But I'll see if I can come up with some project ideas!
Great video! I'm currently looking in to how Prisma and their schemas work since I didn't get too fond of SQL when learning it for a week in my education.
Prisma is great but I personally still suggest learning database fundamentals with SQL, it’s heavily used in the industry
Hey Marius, great video! Could you also make a video on NestJS OAuth? Or integration with Auth0? Thanks, keep up the great work :)
Thanks! I do have a general video on nestjs auth with passport which allows for different kinds of auth “strategies”, you’d just have to use an oauth based strategy
great content bro.
Thanks man 🙏
Hey Marius I love your videos! I have a question, in this tutorial, I think the validations is pretty bad because it uses /// and no autocompletion and it's quite hard to do custom validations. So, because of that would you think that we better go with the code first approach? or what do you think the pros and cons about code first and schema first? (with a case of me being a complete newbie in backend and just starting to learn nest, graphql, prisma, postgres)
Good question, I think which ever way you go with code/schema first is largely preference. In this video I thought schema first would make more sense because it would be similar to the prisma schema… although looking back I probably prefer code-first myself. I have an older video on graphql code-first in the channel if you’re interested, I also used code-first it my most recent graphql auth video.
Regarding the comment-based validation, yeah it’s a little hacky to be honest and probably doesn’t work great for more complex things. If you do go the code-first route then you’d be defining TS classes anyways and you can just do your validation on there with the usual decorators.
Maybe I’ll make a new video comparing the pros/cons of either approach, but I would say preferences aside: code-first I think is simpler but more boilerplate. In nest specifically code-first works great because you can take full advantage of all decorators . Not sure there’s really any cons other than added boilerplate.
Schema-first somewhat aligns better with prisma, which itself is also schema-first (auto-generate type definitions), cons being it limits your options for customization of those generated types/classes (exactly why we have to do these workarounds with comments in the schema)
This course is not working with nestjs 11.I am new in nestjs and i can't handle with migration unfortunettly.I added driver do config but in 17 min i can't see donation like you in sandbox.I am sad.
No such thing as nestjs 11, current version is 9. Regardless this is an old video, the fundamentals should be the same ideas but obviously open source APIs change over time, please check docs and release notes
Thank you Marius. Did you try using enum in both prisma model and GraphQL schema? Is it possible?
Yes they both support enums, make sure to check docs for usage
Great content, thanks. Share theme settings for vscode
I just use random dark themes, i think github dark on this one
Hi
Which color theme you are using in VS code
I switch around between monokai, night owl, or github dark. You'll see those most often in my videos
Great video! Do you know why when adding to the db with fakerjs foreign key constraint fail on the column `postId`? I wrote to stackoverflow under the tag prisma, but there was no answer. Why did the foreign key constraint fail on the column `postId`?
Well FK constraints would usually fail if the related data isn’t already there. For example if you tried to insert a new item with postId 123 but you haven’t yet inserted to the Post table an item with id 123
@@mariusespejo Thank you
Hey! Just wondering about validation with Prisma, Nestjs and Generated.
I realized when i wanted to update an item the fields did not have validation but when i was creating the item yes. did i miss something in the configuration? Cause if that the case, almost creating a new DTO seems better than requiring this unfitting auto-generated schemas.
I don’t think I covered the update flow in this tutorial since updates don’t make sense in this app, it would be odd to allow users to modify their donations. Anyways actually I might have mentioned it in the other comments but looking back I actually am not a fan of the auto generation for validation, I’d probably explicitly define a DTO class and just use class-validator. The only downside to that is now if the schema changes you need to make sure to sync up your DTOs and also you essentially would be re-defining parts of the same exact schema but maybe that’s not terrible
@@mariusespejo auto generators are great, but i realize it was a lot of files just for a donation schema, wouldnt imagine for more schemas in the scene. However, thanks for replying :D
I know my comment is very late but just for the sake of anyone wondering about this issue, in the 'generator nestgraphql' part in the prisma schema you can add this line: noAtomicOperations = true
it will add validation decorators to the generated update types
I gotta ask. I haven’t cracked the lid on this video yet, but the question is, are you liking prisma more than TypeORM?
I really need to build something and get out of tutorial hell so I need to pick a data layer sandwich.. NestJS, GraphQL and ??? TypeORM? Prisma? Thanks.
I’d probably pick prisma personally if I was making a new project. Typeorm works great with Nest though, because defining entities using decorated classes very much “fits” in the Nest style of things. Take the time to read the docs of both a little bit… you don’t need to do a full tutorial. Just visit how do you define models/entities and how to do basic queries on either one. Pick whichever is intuitive to you.
ahh if only the back-end was express but thanks this is great tutorial
Nest is ultimately just a layer on top of express! I have some videos on just Nest specifically in the channel if you want to check it out
@@mariusespejo it's ok i am following but only using express with typescript so far everthing going well...
what are the common debug steps if we can't enable sandbox? I keep on getting "Unable to reach server" on the sandbox page and the npx command nor enabling cors fixes it :/
Hmm sandbox is fairly new, this is the first time I tried it actually. if you run into problems you could always revert back to the regular graphql playground, I’m not really sure how to debug it worked fairly seamlessly for me
I think I did post the github repo for this one, maybe double check your config matches mine?
@@mariusespejo I figured it out! It was just my ad blocker being too zealous :) i disabled it on the page and it functioned (UBlock Origin)
Ahh good catch!
On nestjs i guess it s better to use code first instead of schema first
It’s all preference but code first fits very well with everything else in nestjs which always revolves around classes with decorators
@@mariusespejo yes sure using decorators object type and input type, it s fast for development
Hi Marius , your tech content always better. I m following you from long back recently started prisma and graphql just have one question how will generate graphql schema from prisma schema it will great help if u will suggest something better
Thank you! Regarding your question, I’m not sure that I would suggest that, even if it were possible. Your database schema and your api (graphql) schema will not always map one-to-one. More likely than not, your graphql schema would be (really should be) an interface designed for clients, and your clients shouldn’t necessarily know about the underlying database or it’s schema
💥💥💥
Thank you bro
Maybe you can open a from beginner to advance topic on nestjs? Like talking deep dive of How decorator works because this is the important concept of nestjs . How dependency injection or life cycle. The behind concept of forRoot , forFeature…etc
It definitely helps people to get more confident of what they are using. Not just copy and paste the code . BTW , Because of your tutorial, I will use nestjs to my next project also give you a like .Thanks
yup you could say this one is more in the intermediate range with all the topics involved, ideally folks who have seen Nest before. If you haven’t and need some beginner stuff though I do have several focused Nest tutorials in the channel. There is one for the absolute beginner fundamentals.
But I see what you’re saying, maybe more deep dives, will consider it. Thanks for input!
Thaaaaaankkkkkssssss!!!!!!!!!!!!!!!!!
😁
10/10 for tutorial.
Wonderful and I learnt a lot from this. Thankyou for that.
I was really waiting for this tutorial since you announced in community post.
But
Being a Laravel dev, I think can be this can be implemented in Laravel in 10-20 minutes.
Please correct me what i am lacking here .
But unfortunately, laravel official still don’t have GraphQL support yet. You need to rely on third party package. I also like laravel.
@@patrickngnet makes sense.
don’t forget that the time it takes to effectively teach does not equate the time it takes to actually develop. I can implement the same API in REST in 10 minutes… but it doesn’t mean one can teach it (or for another to understand) in that same amount of time
@@mariusespejo understood. Thanks for this tutorial btw. Loved this. 😀 ❤️
for example try teaching laravel to someone who has not seen it before, or worse has not made an API before. Would that take 20 minutes? I’ve never used laravel for example, I bet it would take me a while. Hope that makes sense.
It is quite a bit of setup I’ll admit but once you get past that adding to the API mostly requires updating schemas and resolvers
What is your color theme?
using github dark here I think
With Prisma, code first approach makes a lot more sense . Taking the schema first approach just seems needlessly repetitive.
yeah I can see that, it’s all preference honestly. If you go code first you just end up representing the same schema just at a different spot. Although yes, since the resolvers are already using decorators to mark which methods are queries/mutations it’s a little bit less repetitive
so it is better to use code first approach?
Like I said it’s preference
any requirement to take this course?
some base understanding of nest, graphql, and react would be good. You can think of this as more of a tutorial on how to integrate those together
So big project!
🏋️♂️
Hmmmmm nice
tailwind is better than chakra
Yeah I’d agree actually lol, I haven’t tried it prior to this video but I’ve been learning a bit more about it
someone anonymous dropped a million... I did my 20 :)
nice!! thanks for contributing!
45:32 I am getting error when using @Args and Prisma generated types , It is Undefined type error. Make sure you are providing an explicit type for the "create" sth like that. With the following code
@Args('createDonationInput')
createDonationInput: Prisma.DonationCreateInput,
How am I able to solve it, I can't solution online
Did you actually generate the types/client?