GitShow/benawad/type-graphql-series
benawad

type-graphql-series

Typescript GraphQL Server built with TypeGraphQL

by benawad
graphqlpostgresqlredistypegraphqltypescript
Star on GitHubForknpm

TypeScript

322 stars125 forks3 contributorsQuiet · 4y agoSince 2019

Meet the team

See all 3 on GitHub →
benawad
benawad23 contributions
surtich
surtich1 contribution
remusa
remusa1 contribution

Languages

View on GitHub →
TypeScript99.7%
JavaScript0.3%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

1 of 6 standards met

Community profile →
28
✓README○License○Contributing○Code of Conduct○Issue Template○PR Template

Recent PRs & issues

Quiet · 6 in progress · Last activity 4y ago
See all on GitHub →
ElhalwaguiAhmedMohamed
graphql/tsutils/maybeOpenIssue

the module is removed from new versions of graphql. It should be changed

ElhalwaguiAhmedMohamed · 4y ago
Esser50K
fixes small typos in README.mdOpenPR

I really enjoyed using this project, nice work! Found a couple typos in the README though 😛

Esser50K · 4y ago
hexdecimal16
start server before applying middlewareOpenPR
hexdecimal16 · 4y ago

Recent fixes

View closed PRs →
paean99
Dynamic resolvers with Decorators in EntityMergedPR

I had time to brood about the previously mentioned idea in the PR #6 and i ended trying a possible solution. Although i think that it would be preferable to be implemented by type-graphql itself. Like in the others PR i sent, i just had time to put the query working and didn't worried with mutation and its parameters. And like before i will feign to not have seen the innumerable ts-ignore spread all over the place... The way it work is similar to the prototype code given in #6 Import the general functions for the resolvers and add them as a parameter to @autoQueries in entity. See the example in src\entity\Tomato.ts Seem to works as it is, but mutations need more work. And also, it may break if used with more than one entity :( Just a proof of concept or something in those lines. p.s. Sorry. just saw that i should have cleaned the git history Ok Done the squash

paean99 · 3y ago
whakaoo
The 'parent' element is declared, but its value is never read.ClosedIssue

Dear Ben Awad, I'm also trying the code in your second lesson (register resolver TypeGraphql) and I went in two different issues. One I solved, the other not yet. Solved: createConnection() in typeorm is deprecated so I removed the ormconfig.json file and inserted in index.ts the following code: import { DataSource } from "typeorm" export const AppDataSource = new DataSource({ type: "postgres", host: "localhost", port: 5432, username: "postgres", password: "test", database: "nodedemo", synchronize: true, logging: true, entities: ["src/entity/."], subscribers: [], migrations: [], }) and therefore the following to initialize the connection const main = async () => { await AppDataSource.initialize() .then(() => { // here you can start to work with your database }) .catch((error) => console.log(error)) (....etc) Everything is good. Query and mutation are working fine with the db but if I have still a problem with the variable 'name' as I get the following error "The 'parent' element is declared, but its value is never read. I used your code so that I have in Register.ts @Resolver(User) export class RegisterResolver { @Query(() => String) async helloWorld() { return "Hello World!"; } @FieldResolver() async name(@Root() parent: User) { return '${parent.firstName} ${parent.lastName}'; } (...etc...) and in User.ts @ObjectType() @Entity() export class User extends BaseEntity { @Field(() => ID) @PrimaryGeneratedColumn() id: number @Field() @Column() firstName: string @Field() @Column() lastName: string @Field() @Column("text", {unique: true}) email: string @Field() name: string; @Column() password: string }

whakaoo · 4y ago
sathish-spidie
Can't import formatArgumentValidationError from type-graphqlClosedIssue

Hi, I just wanted to tell you about this problem, I can't import formatArgumentValidationError from type-graphql, My tslint : Module '"../../TypeGraphql/node_modules/type-graphql/dist"' has no exported member 'formatArgumentValidationError'. And i'm using tsconfig as in this repo. Cheers

sathish-spidie · 4y ago
Structured data for AI agents

Repository: benawad/type-graphql-series. Description: Typescript GraphQL Server built with TypeGraphQL Stars: 322, Forks: 125. Primary language: TypeScript. Languages: TypeScript (99.7%), JavaScript (0.3%). Topics: graphql, postgresql, redis, typegraphql, typescript. Open PRs: 6, open issues: 6. Last activity: 4y ago. Community health: 28%. Top contributors: benawad, surtich, remusa.

·@ofershap

Replace github.com with gitshow.dev