Skip to content

Instantly share code, notes, and snippets.

@andruu
Created July 10, 2019 03:15
Show Gist options
  • Save andruu/d71d051171e18588433c6f9257c52194 to your computer and use it in GitHub Desktop.
Save andruu/d71d051171e18588433c6f9257c52194 to your computer and use it in GitHub Desktop.
import { IsEmail, MinLength } from 'class-validator';
import { ArgsType, Field } from 'type-graphql';
@ArgsType()
export class CreateUserArgs {
@Field()
name: string;
@Field()
@IsEmail()
email: string;
@Field()
@MinLength(6)
password: string;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment