Skip to content

Instantly share code, notes, and snippets.

View hellos3b's full-sized avatar

Sebastian hellos3b

  • Cisco
  • San Jose, CA
View GitHub Profile
@hellos3b
hellos3b / Photo.ts
Last active March 8, 2022 00:35
GraphQL + TypeORM example
/** models/photos/Photo.ts */
import {getRepository, Entity, In, Column, RelationCount, PrimaryGeneratedColumn, ManyToOne, CreateDateColumn, RelationId, OneToMany} from "typeorm";
import { User, Bird, Like } from '@/models'
@Entity()
export class Photo {
@PrimaryGeneratedColumn()
id: number;