Build a GraphQL Server with Node.js and MongoDB

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

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

  • @EverAfterBreak2
    @EverAfterBreak2 3 года назад +11

    omg, 4 hours of an udemy course in 18 mins, you're the man!

  • @nobodysaysmynameright
    @nobodysaysmynameright 5 лет назад +12

    It's been a while since I've seen a no-bs video with just pure content. Keep it going man, I can't believe the amount of info I got from just watching this video for 18 minutes

  • @derekacosta1584
    @derekacosta1584 5 лет назад +140

    nodemon = node mon (monitor) not no demon

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

      @Derek This. Please, for the love of god...

    • @calmsh0t
      @calmsh0t 5 лет назад +49

      pokemon = poke mon (monitor)

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

      dude i think the creator of nodemon said you could pronounce it any way you like lmao

    • @ethanchiasson9956
      @ethanchiasson9956 5 лет назад +14

      Honestly, no-demon sounds cooler

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

      Epic!

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

    Dude, you just summarized pretty much every single tutorial and paid class out there in the nicest, simplest way possible. Thanks!

  • @Frexeptabel
    @Frexeptabel 5 лет назад +14

    Been struggling with doing that for weeks and you do it in 16 minutes! Awesome! Thank you for the video :)

  • @awekeningbro1207
    @awekeningbro1207 5 лет назад +59

    i lost it all when he said 'no demon'

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

    i think most people agree that your content is really great! I really like the clean approach of how you explain things based on level of priority during the build process. It really helps to keep things clear cut and to the point. MAKE MORE!!

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

    couldn't be more thankful to RUclips algorithm for getting me on your channel, You are awesome Ben 👍

  • @Kevin-yw5qr
    @Kevin-yw5qr 4 года назад +45

    I'm calling it "no demon" from here on out

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

    Thanks so much, your video is easy to understand than most of the premium videos out there. This helps me know exactly how real data can respond from MongoDB with out static resolvers shit out there. Thanks again and keep your great work.

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

    learned more in 5 mins of this video than months of a web dev class

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

    This answers a very simple question I couldn't seem to get a simple answer to, until now. Thanks

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

    Thanks man!
    You saved my day and from a lot of wastage of time.
    You deserves a medal

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

    Great walkthrough of Apollo with Node. Thanks Ben!!

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

    Thanks Ben, been looking for a good explanation of that for a while. You nailed it pretty good! How to deploy to different platforms would be great as well! No one seems to be spending any time talking about that and it is so important and at times so confusing.

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

      any particular platform your wanting to deploy to?

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

    Very clear and simple, straight to the point. Thumbs up! (It's not No-Demon, it's short for Node-monitor ;) )

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

    Thank you so much man. I work with GQL client side but you put the puzzle pieces together for me to use it server side

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

    Awesome video! concise, I understood what was happening and could extrapolate from this video to do more. Really, really good!

  • @100nickpoo
    @100nickpoo 3 года назад

    Absolutely awesome video, but was I the only one who found it really funny that ben calls it "no-demon" instead of "node-mon" XD XD

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

    Can't believe I subscribe to you on both RUclips and Tiktok

  • @jhimymichel3045
    @jhimymichel3045 5 лет назад +4

    which one do you prefer prisma or mongoose to implement graphql with mongodb?
    btw good video

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

      I know you didn't ask for my opinion, but I personally prefer mongoose for mongo db and my prisma for my sql. Couldn't wrap my head around sequelize :(

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

      I've only down very small things with mongoose, so I can't compare it well with prisma

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

    Good stuff! Thanks for the time-saver Ben!

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

    Thanks buddy. You made it very clear and simple

  • @maurizioteobaldelli4845
    @maurizioteobaldelli4845 11 месяцев назад

    I'm trying to query Mongo using TypeGraphQL but the problem is the presence of space in a database field ("Total issued"). Before remapping the inter DB by removing the space or adding an underscore I was wondering if it is possible to use a different route. Any suggestion is welcomed. Thanks ... This is an excerpt of the code.
    Model.ts
    ...
    @Field(() => Int)
    @Column({name: "Total issued"})
    Total_issued
    Resolver.ts
    ...
    @Arg("Total issued", (type) => Int, {nullable: true}) Total_issued: number,

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

    Nice!, been waiting for this one. would be great to see how to deploy it with serverless or even better Google's new Cloud Run. or show both ^^. thanks for your awesome educative videos!

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

      👌

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

    Thanks Ben you really made my day with this!

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

    Can u make video on jwt auth with graphql-yoga( subscription ) typescript

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

      I forgot about authentication for subscriptions, I will be making a video on that

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

      @@bawad thanx ben

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

    Thank you Ben! this is really helpful and concise.

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

    how do u get intellisense in ur terminal ?

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

    Thanks really i was lost until i found you

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

    Excellent tutorial, simple and straight forward

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

    how did u customize your graQL page in your browser, please tell me

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

    But with this method, we need to write the same Schema in both Mongoose and typeDef. And as the schema gets bigger, it becomes more complex to manage. I was looking for ORM technique like Prisma, but they aren't supporting for MongoDB. Can you suggest a way out Ben?

  • @iHack-ms5nr
    @iHack-ms5nr 5 лет назад

    Ey @Ben Awad, 1. What shell is that? 2. What keybinds are you using for VS Code? Vim, Emacs or nano? 'Cause you're going fast as hell with those keys, I dig it!

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

      1. fish shell
      2. vim

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

    I made an API without gql but really want to switch.. how hard can it be to turn rest API to gql?

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

    Hi ben! Could you tell us which extensions are you using please?
    Is your first video I'm watching. Thx for doing this content, is really good!

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

      www.benawad.com/plugins

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

    Very well structured. :D Thanks for the insights.

  • @sakthivel-kl1ws
    @sakthivel-kl1ws 3 года назад

    Hi , is there any restrictions in backend. I feel that JavaScript side hack the api end point and possible to pull data from backend. Is there any good practice

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

    All roads lead to Ben.

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

    Great video! Can you do one of graphql subscriptions hiking into mongo changeStreams! :)

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

    Wow. Really great video and perfectly explained. Thank you!

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

    do we need to have mongodb installed locally to connect to mongoose?

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

    hi ben any chance you do vue + hasura tutorial? btw - what your toughts about ionic 4 ? thanks :)

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

      Probably no Vue coming soon, but maybe some Hasura
      I don't really know anything about Ionic 4 so I can't comment on it

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

    how do you get vscode to format the data within the gql string?

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

    Thanks Ben! Would be better if Ben could add some key cast helper to show what you actually type behind the scene! :P

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

      I've thought about that, but I didn't want it to be too distracting to the video.
      You might like this video: ruclips.net/video/t9kSTiqhUfg/видео.html

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

    hi ben, I have a question that why we have to put the underscore "_" before { name } in function createCat? I've also tried to get rid of "_" and get error but I still don't know why. anw, tks.

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

      That's just the name of a variable
      The convention is to use _ if your not going to use the variable

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

    Very concise tutorial - thanks

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

    What does “easier to grok”(spelling?) mean?

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

    Why do you use Babel on backend? Isn`t it for old browser copatibility compiler?

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

      Yes and compatibility with nodejs

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

    Incredibly helpful, thanks!

  • @0HeMa7
    @0HeMa7 5 лет назад

    Hey is there anyway you could show me how to do a query find by id? I cant seem to figure it out

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

      stackoverflow.com/questions/8233014/how-do-i-search-for-an-object-by-its-objectid-in-the-mongo-console

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

    Hey Ben great tutorial. Could you extend this tutorial to include update, upsert and delete?

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

      Do you know how to do those commands in mongo?

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

    Cat.default is not a constructor what i should do?

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

      I have the same error. Did you find any solution?

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

      Found the anwser. I resolvers.js, changed import Cat from './models/Cat' to import { Cat } from './models/Cat'

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

    Another option instead MongoDB... I can't install this in my laptop =/

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

      postgres

  • @ivoneijr
    @ivoneijr 5 лет назад +4

    suggestion: add prettier and lint at project :D

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

    Gday mate it'd be great if you were able to show how to create a mongodb datasource using dataloader. It confused the hell outta me out the mongoose models are able to work with no visible connection to the underlying mongo connection, added with the connection being defined in the root index I can't help but feel there's room for a more efficient separation of concerns, especially if using other third party sources together with mongodb. Hence the datasource request. Cheers regardless mate. Still a good vid.

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

      I'll add this to my todolist

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

    Shit that’s some VIM skills going on

  • @cunningham.s_law
    @cunningham.s_law 5 лет назад +7

    no TS? :'(

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

      🔜

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

    Hello Ben can you do a series with nest.js + graphql .you will love it :)

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

      maybe

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

    Clear explanation 👍

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

    Anyone getting this error in Apollo Server Express v3: Error: You must `await server.start()` before calling `server.applyMiddleware()`
    Just wrap everything in an async function,
    and before calling server.applyMiddleware({app}), call:
    await server.start().
    (Don't forget to call the async function at the end> It happens to me all the time, because top-level await isn't available in the context I'm working so I have to wrap everything in an async function and I forget to call the function...)

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

    property _id is added automatically by Mongoose in new document created

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

      He's talking about "id" not "_id". "id" is a getter that also gets defined with the value of "_id". "_id" is more like a private field.
      What I'm now curious is, in mongoose, I had to define a virtual to create the getter for "id" and return doc._id, but if Apollo could read the id field without defining any getter, than I probably overlooked the id field in the object returned in a query and assumed it to be absent...

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

    I wa confused what the hell was that no demon thing I eve forgot that I have using on several projects just because of how he pronounced it hhh

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

    Very helpful, thanks.

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

    great demo

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

    Good good good stuff!!!

  • @周公来
    @周公来 5 лет назад

    Can you give a "how to manage multiple schema.graphql ?" I think with graphql alternative schema file. The more correct js file!

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

      ruclips.net/video/u-pdltyzfIU/видео.html

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

    helpful for the basics. Not clear when it comes to resolvers that take ANY arguments.

  • @zm412.u.6
    @zm412.u.6 4 года назад +1

    Отличное видео, спасибо

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

    awesome, thank you!

  • @MuhammadKashif-bq4ht
    @MuhammadKashif-bq4ht 4 года назад

    Very helpfull!

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

    thanks a lot for this

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

    No demon is the new meta

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

    For you noobs saying it isn't "no demon", get your facts straight. Ben is correct, the nodemon logo is a demon.

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

    Hey Ben, Would you please do graphql mongodb authentication with next js frontend. NO TYPESCRIPT PLZ!

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

    how do we deploy this , lets stay at production level

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

    maybe, postgres and jwt ^^

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

    Say it with me "day-mon"

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

    great!

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

    8:12

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

    cool & thanks

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

    thank you for this vdo

  • @周公来
    @周公来 5 лет назад

    babel is bad for the node package...

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

      why

    • @周公来
      @周公来 5 лет назад

      @@bawad A lot of practical usage is very different, even lead to errors, in the process of practical application

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

      Do you have any examples?

    • @周公来
      @周公来 5 лет назад

      @@bawad In this case. I tried the situation is 'class MoviesAPI extends RESTDataSource {'

    • @周公来
      @周公来 5 лет назад

      RESTDataSource said need 'new'.I don't know why I use the Babel will need like this

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

    for real ,you can deploy mongodb at mlab, it is free 500mb

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

      mlab was recently consumed by Mongodb Corp

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

    Like for Node-mon

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

    nodemon - node-monitor

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

    1 view, I am the first :)

  • @jvfr-
    @jvfr- 2 года назад

    No Demon.

  • @hariharan-parthiban
    @hariharan-parthiban 2 года назад

    Node - Mon Please!, Like poke - Mon

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

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

    No 👿!

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

    super helpful! Thanks!