TypeGraphQL Setup

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

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

  • @wojtekobsysa
    @wojtekobsysa 5 лет назад +26

    That's awesome Ben! Surprisingly I have been working on a project in my company with the creator of TypeGraphQL for the past 9 months. He's from Poland. Really nice guy and fantastic developer.

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

      That's cool

  • @curist
    @curist 5 лет назад +11

    This is going to be AWESOME!

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

    I love the path your videos walk. Beginner friendly explanations, practical examples of requirements for REAL projects.

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

    This is awesome Ben!, better than most premium tutorials.

  • @sammmywammmy
    @sammmywammmy 2 года назад +3

    wish there was an updated one, by the 4th video I've spent more time trying to fix dependencies and types than learning the stuff itself :(

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

    Wish I could put more than 1 like. Thanks a lot, Ben!

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

    Like I said previously, I need this series so bad! and I love your work

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

    I just complete the whole playlist and PLEASE ACCEPT MY DEEPEST THANKS BRO

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

    I love ts and graphql Great serie ven👌👌

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

    Thank you so much for creating this series

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

    Nice plan benawad

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

    Your videos are awesome! Congrats!

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

    nice~ AWESOME typegraphql thank u

  • @임창수-c7c
    @임창수-c7c 5 лет назад +2

    Awesome series!

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

    2:52 I would highly recommend to use `ts-node-dev` because it has much quicker reload times than the nodemon + ts-node
    github.com/whitecolor/ts-node-dev

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

      I tried that out today and you're right it was must quicker. I'm switching to that

  • @codingfun1285
    @codingfun1285 5 лет назад +3

    Thanks Ben!
    After your previous TypeGQL video I went and messed around with a bunch of their examples, and paired with TypeORM this feels fantastic.
    Will you be using bcrypt in this series?

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

    I found a library that for me at least is better than nodemon, it’s called ts-node-dev and idk why but I always feel like it’s faster than nodemon when I use it, give it a try!

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

      I've noticed nodemon being a little slow, I'll give that a try, thanks!

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

      Ben Awad also typedi and typeorm-typedi-extensions are amazing to work with when also added to typegraphql so yeah give these a try too maybe?😁

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

      I haven't had the need to use di yet

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

    need this. thanks ben!

  • @AbhishekKumar-mq1tt
    @AbhishekKumar-mq1tt 5 лет назад +1

    Thank u for this awesome video and series

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

    great explain thanks man 👍

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

    AWESOME. Thank you for your works. Further, do you have sample code for extending to using JWT.

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

      I don't, I've been preferring sessions lately: ruclips.net/video/GdJ0wFi1Jyo/видео.html

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

    Thank you!

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

    Have you ever considered switching ORM to Prisma with "TypeGraphQL Prisma" integration which generates all CRUD operations (and more)? Or do you still prefer TypeORM and why? :)

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

    I am getting ERROR in your code
    Type 'GraphQLSchema' is missing the following properties from type 'GraphQLSchema': description, getImplementations, isSubTypets(2739)
    types.d.ts(52, 5): The expected type comes from property 'schema' which is declared here on type 'ApolloServerExpressConfig'
    (property) Config.schema?: GraphQLSchema | undefined
    code
    import "reflect-metadata";
    import { ApolloServer } from 'apollo-server-express';
    import * as Express from 'express';
    import { Query, Resolver, buildSchema } from 'type-graphql';
    import { GraphQLSchema} from 'type-graphql/node_modules/graphql';
    @Resolver()
    class HelloResolver {
    @Query(() => String)
    async hello() {
    return "Hello World";
    }
    }
    const main = async () => {
    const schema: GraphQLSchema = await buildSchema({
    resolvers: [HelloResolver]
    })
    // description, getImplementations, isSubType
    const apolloServer = new ApolloServer({ schema });
    const app = Express();
    apolloServer.applyMiddleware({ app });
    app.listen(4000, () => {
    console.log("running");
    })
    }
    main();

  • @AJ-vl3zq
    @AJ-vl3zq 5 лет назад

    I am a new subscriber and I have to say I very like the channel content.
    Q1: why did you use: import * as Express from "express";
    Q2: it is actually kind of a suggestion to use IIFE instead of declaring the function and calling it

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

      1. some modules don't have a default export so you have to import them like that in typescript
      2. I didn't know that, thanks

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

    Hi Ben, I developed a TypeGraphQL API based on an express-server and I need to implement a login system (CAS or OpenID) that should be able to query the database using e.g., Postman, Jupiter Notebook or R-Studio, and, therefore, the login credential should be transmitted automatically through the application and not in the browser. Thank's in advance for your suggestions.

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

    I'm ready

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

    Nice Ben

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

    if anyone is having this error "Cannot find module 'core-js/proposals/array-flat-and-flat-map'" while trying to start the server, just add "core-js": "3.0.0-beta.11"
    in package.json

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

      apollo-server-express has a bug in the latest version, try downgrading to 2.0.4

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

      @@bawad please pin this comment for solution, thanks :D

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

    can you make a video where I can use TypeGraphQL, Prisma and serverless framework together?

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

    I'll love this

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

    The playlist in the description links to the AWS AppSync Series. Have this changed.

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

      fixed, thanks for pointing that out

  • @creative-commons-videos
    @creative-commons-videos 5 лет назад +1

    performance comparison between express and type graphql please

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

      They are 2 different tools you can't really compare them

    • @creative-commons-videos
      @creative-commons-videos 5 лет назад

      ​@@bawad I didn't mean that, which is better express + apollo server 2 or TypeGraphGL, is TypeGraphGL framework or just a wrapper?

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

      typegraphql is just how you create the graphql schema, I still use express + apollo server 2 + typegraphql together

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

    any improvements or important changes on typegraphql api? since it was 1 year ago and now we have v1.0 i dont know that there will be some issues?

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

    to solve the ' GraphQLSchema' is not assignable to type 'import' error assign schema to type of any so that it will be -----> const schema:any = await buildSchema({"

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

    Hi Ben, any ideas what your next big react native project will be?

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

      react native web

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

    In your 'What graphql server should I use' video you seem to prefer Apollo Server 2?

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

      This is Apollo server v2 (has all the same features) but works with express

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

      OK, Thanks!

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

    Have you ever tried bulk insert mutation using graphql, typeorm and type-graphql?

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

      yes

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

      @@bawad Could you please do video explain it or do you have references that i can look at and test it out myself

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

      typeorm.io/#/insert-query-builder

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

    What does reflect-metadata do?

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

      I believe it lets TypeGraphQL/TypeORM get data on the decorators used

    • @19majkel94
      @19majkel94 5 лет назад

      It's a polyfill for TC39 metadata proposal:
      rbuckton.github.io/reflect-metadata/

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

    Im following this at the moment and wondering if we still need to import both Apollo server and express? The Apollo docs only state to import ApolloServer and gql from 'apollo-server'

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

      Yes, 'apollo-server' is different
      We specifically want to use the express one so we can use express middleware

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

      @@bawad Thanks for the clarification

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

    anything about complimentary frontend series?

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

      ruclips.net/p/PLN3n1USn4xlkDk8vPVtgyGG3_1eXYPrW-

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

    What makes you use this library? I thought you wouldn't use it until it reached the ver 1.0

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

      ruclips.net/video/1FMTmUBerHU/видео.html

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

    I don't know if you have the authorization part finalized yet. But i would love it if you could use passport for that. I would love that🎉

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

      we are going to write our own and use the type-graphql decorators

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

    Hi Ben Can you tell me how to transpile code into javascript

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

      babel

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

    @benawad how would you handle errors, e.g. duplicate email

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

      1. Set the email as a unique field in your database then when you trying inserting a user wrap it in a try/catch and the db will throw an error on duplicate emails
      2. Search the database before inserting a user and see if that email is already there

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

    Can I use join-monster with type-graphql?

  • @123itachiuchiha2
    @123itachiuchiha2 5 лет назад

    After this series, is it good to see the lives graphql series?

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

      what's the lives graphql series?

    • @123itachiuchiha2
      @123itachiuchiha2 5 лет назад

      @@bawad This: "24 Hour Code Ponder Stream"

    • @123itachiuchiha2
      @123itachiuchiha2 5 лет назад

      (I found your channel today and it was the best thing today)

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

    Will this include Postgres + TypeORM?

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

    Why does it sound like no-de-mon and not node-mon?

  • @psyferinc.3573
    @psyferinc.3573 2 года назад

    laik inta btiji 3al manta2a?

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

    YEEESSSSS!!!

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

    ohh and first one :D