Skip to content

Instantly share code, notes, and snippets.

View hylickipiotr's full-sized avatar
⚛️
Mid React Developer

Piotr Hylicki hylickipiotr

⚛️
Mid React Developer
View GitHub Profile
@hylickipiotr
hylickipiotr / author.entity.ts
Created November 8, 2020 23:41 — forked from umutyerebakmaz/author.entity.ts
TypeORM many to many lazy relation jointable custom table name TypeGraphQL Example (with bi-directional conect GraphQL Approach)
import { Entity, PrimaryGeneratedColumn, Column, BaseEntity, ManyToMany } from 'typeorm';
import { ObjectType, Field, ID, InputType, ArgsType, Int } from 'type-graphql';
import { Book } from '../book/book.entity';
@Entity()
@ObjectType()
export class Author extends BaseEntity {
@PrimaryGeneratedColumn("uuid")
@Field(type => ID)
@hylickipiotr
hylickipiotr / author.entity.ts
Created November 8, 2020 23:41 — forked from umutyerebakmaz/author.entity.ts
TypeORM many to many lazy relation jointable custom table name TypeGraphQL Example (with bi-directional conect GraphQL Approach)
import { Entity, PrimaryGeneratedColumn, Column, BaseEntity, ManyToMany } from 'typeorm';
import { ObjectType, Field, ID, InputType, ArgsType, Int } from 'type-graphql';
import { Book } from '../book/book.entity';
@Entity()
@ObjectType()
export class Author extends BaseEntity {
@PrimaryGeneratedColumn("uuid")
@Field(type => ID)