Created
March 27, 2018 12:36
-
-
Save pie6k/a3ef4ee86a62a9686f4dc9ef2e7b269c to your computer and use it in GitHub Desktop.
Integration: typegql and typeorm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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