Skip to content

Instantly share code, notes, and snippets.

@pie6k
Created March 27, 2018 12:36
Show Gist options
  • Save pie6k/a3ef4ee86a62a9686f4dc9ef2e7b269c to your computer and use it in GitHub Desktop.
Save pie6k/a3ef4ee86a62a9686f4dc9ef2e7b269c to your computer and use it in GitHub Desktop.
Integration: typegql and typeorm
import { Entity, BaseEntity, Column, PrimaryGeneratedColumn } from 'typeorm';
import { ObjectType, Field } from 'typegql';
@Entity()
@ObjectType()
export class User extends BaseEntity {
@PrimaryGeneratedColumn()
@Field()
id: number;
@Column()
@Field()
email: string;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment