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.
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
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?
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!
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? :)
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();
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
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.
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
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({"
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'
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
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.
That's cool
This is going to be AWESOME!
I love the path your videos walk. Beginner friendly explanations, practical examples of requirements for REAL projects.
This is awesome Ben!, better than most premium tutorials.
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 :(
Wish I could put more than 1 like. Thanks a lot, Ben!
Just 1?
Like I said previously, I need this series so bad! and I love your work
I just complete the whole playlist and PLEASE ACCEPT MY DEEPEST THANKS BRO
I love ts and graphql Great serie ven👌👌
Thank you so much for creating this series
Nice plan benawad
Your videos are awesome! Congrats!
nice~ AWESOME typegraphql thank u
Awesome series!
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
I tried that out today and you're right it was must quicker. I'm switching to that
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?
yes
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!
I've noticed nodemon being a little slow, I'll give that a try, thanks!
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?😁
I haven't had the need to use di yet
need this. thanks ben!
Thank u for this awesome video and series
great explain thanks man 👍
AWESOME. Thank you for your works. Further, do you have sample code for extending to using JWT.
I don't, I've been preferring sessions lately: ruclips.net/video/GdJ0wFi1Jyo/видео.html
Thank you!
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? :)
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();
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
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
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.
I'm ready
Nice Ben
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
apollo-server-express has a bug in the latest version, try downgrading to 2.0.4
@@bawad please pin this comment for solution, thanks :D
can you make a video where I can use TypeGraphQL, Prisma and serverless framework together?
I'll love this
The playlist in the description links to the AWS AppSync Series. Have this changed.
fixed, thanks for pointing that out
performance comparison between express and type graphql please
They are 2 different tools you can't really compare them
@@bawad I didn't mean that, which is better express + apollo server 2 or TypeGraphGL, is TypeGraphGL framework or just a wrapper?
typegraphql is just how you create the graphql schema, I still use express + apollo server 2 + typegraphql together
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?
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({"
Hi Ben, any ideas what your next big react native project will be?
react native web
In your 'What graphql server should I use' video you seem to prefer Apollo Server 2?
This is Apollo server v2 (has all the same features) but works with express
OK, Thanks!
Have you ever tried bulk insert mutation using graphql, typeorm and type-graphql?
yes
@@bawad Could you please do video explain it or do you have references that i can look at and test it out myself
typeorm.io/#/insert-query-builder
What does reflect-metadata do?
I believe it lets TypeGraphQL/TypeORM get data on the decorators used
It's a polyfill for TC39 metadata proposal:
rbuckton.github.io/reflect-metadata/
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'
Yes, 'apollo-server' is different
We specifically want to use the express one so we can use express middleware
@@bawad Thanks for the clarification
anything about complimentary frontend series?
ruclips.net/p/PLN3n1USn4xlkDk8vPVtgyGG3_1eXYPrW-
What makes you use this library? I thought you wouldn't use it until it reached the ver 1.0
ruclips.net/video/1FMTmUBerHU/видео.html
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🎉
we are going to write our own and use the type-graphql decorators
Hi Ben Can you tell me how to transpile code into javascript
babel
@benawad how would you handle errors, e.g. duplicate email
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
Can I use join-monster with type-graphql?
yes
After this series, is it good to see the lives graphql series?
what's the lives graphql series?
@@bawad This: "24 Hour Code Ponder Stream"
(I found your channel today and it was the best thing today)
Will this include Postgres + TypeORM?
Yes
Why does it sound like no-de-mon and not node-mon?
laik inta btiji 3al manta2a?
YEEESSSSS!!!
ohh and first one :D