How to use the type-graphql.InputType function in type-graphql

To help you get started, weโ€™ve selected a few type-graphql examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github goldcaddy77 / warthog / examples / 7-feature-flags / generated / classes.ts View on Github external
environmentId?: string;

  @TypeGraphQLField()
  userKey!: string;

  @TypeGraphQLField({ nullable: true })
  userId?: string;

  @TypeGraphQLField()
  segmentKey!: string;

  @TypeGraphQLField({ nullable: true })
  segmentId?: string;
}

@TypeGraphQLInputType()
export class UserSegmentUpdateInput {
  @TypeGraphQLField({ nullable: true })
  projKey?: string;

  @TypeGraphQLField({ nullable: true })
  projectId?: string;

  @TypeGraphQLField({ nullable: true })
  envKey?: string;

  @TypeGraphQLField({ nullable: true })
  environmentId?: string;

  @TypeGraphQLField({ nullable: true })
  userKey?: string;
github MichalLytek / type-graphql / experiments / prisma / generated / type-graphql / resolvers / inputs / UserWhereUniqueInput.ts View on Github external
import { Arg, Args, ArgsType, Ctx, Field, FieldResolver, Float, ID, InputType, Int, Mutation, ObjectType, Query, Resolver, Root, registerEnumType } from "type-graphql";

@InputType({
  isAbstract: true,
  description: undefined,
})
export class UserWhereUniqueInput {
  @Field(_type => Int, {
    nullable: true,
    description: undefined
  })
  id?: number | null;

  @Field(_type => String, {
    nullable: true,
    description: undefined
  })
  email?: string | null;
}
github goldcaddy77 / warthog / examples / 7-feature-flags / generated / classes.ts View on Github external
segmentKey_in?: string[];

  @TypeGraphQLField(() => ID, { nullable: true })
  segmentId_eq?: string;

  @TypeGraphQLField(() => [ID], { nullable: true })
  segmentId_in?: string[];
}

@TypeGraphQLInputType()
export class UserSegmentWhereUniqueInput {
  @TypeGraphQLField(() => String)
  id?: string;
}

@TypeGraphQLInputType()
export class UserSegmentCreateInput {
  @TypeGraphQLField()
  projKey!: string;

  @TypeGraphQLField({ nullable: true })
  projectId?: string;

  @TypeGraphQLField()
  envKey!: string;

  @TypeGraphQLField({ nullable: true })
  environmentId?: string;

  @TypeGraphQLField()
  userKey!: string;
github goldcaddy77 / warthog / examples / 04-many-to-many-relationship / generated / classes.ts View on Github external
firstName_startsWith?: string;

  @TypeGraphQLField({ nullable: true })
  firstName_endsWith?: string;

  @TypeGraphQLField(() => [String], { nullable: true })
  firstName_in?: string[];
}

@TypeGraphQLInputType()
export class UserWhereUniqueInput {
  @TypeGraphQLField(() => String)
  id?: string;
}

@TypeGraphQLInputType()
export class UserCreateInput {
  @TypeGraphQLField()
  firstName!: string;
}

@TypeGraphQLInputType()
export class UserUpdateInput {
  @TypeGraphQLField({ nullable: true })
  firstName?: string;
}

@ArgsType()
export class UserWhereArgs extends PaginationArgs {
  @TypeGraphQLField(() => UserWhereInput, { nullable: true })
  where?: UserWhereInput;
github goldcaddy77 / warthog / examples / 09-production / generated / classes.ts View on Github external
@TypeGraphQLInputType()
export class PostWhereUniqueInput {
  @TypeGraphQLField(() => String)
  id?: string;
}

@TypeGraphQLInputType()
export class PostCreateInput {
  @TypeGraphQLField()
  title!: string;

  @TypeGraphQLField(() => String)
  userId!: string;
}

@TypeGraphQLInputType()
export class PostUpdateInput {
  @TypeGraphQLField({ nullable: true })
  title?: string;

  @TypeGraphQLField(() => String, { nullable: true })
  userId?: string;
}

@ArgsType()
export class PostWhereArgs extends PaginationArgs {
  @TypeGraphQLField(() => PostWhereInput, { nullable: true })
  where?: PostWhereInput;

  @TypeGraphQLField(() => PostOrderByEnum, { nullable: true })
  orderBy?: PostOrderByEnum;
}
github goldcaddy77 / warthog / examples / 8-performance / generated / classes.ts View on Github external
firstName_startsWith?: string;

  @TypeGraphQLField({ nullable: true })
  firstName_endsWith?: string;

  @TypeGraphQLField(() => [String], { nullable: true })
  firstName_in?: string[];
}

@TypeGraphQLInputType()
export class UserWhereUniqueInput {
  @TypeGraphQLField(() => String)
  id?: string;
}

@TypeGraphQLInputType()
export class UserCreateInput {
  @TypeGraphQLField({ nullable: true })
  id?: string;

  @TypeGraphQLField()
  firstName!: string;
}

@TypeGraphQLInputType()
export class UserUpdateInput {
  @TypeGraphQLField({ nullable: true })
  firstName?: string;
}

@ArgsType()
export class UserWhereArgs extends PaginationArgs {
github goldcaddy77 / warthog / examples / 7-feature-flags / generated / classes.ts View on Github external
segmentKey_startsWith?: string;

  @TypeGraphQLField({ nullable: true })
  segmentKey_endsWith?: string;

  @TypeGraphQLField(() => [String], { nullable: true })
  segmentKey_in?: string[];

  @TypeGraphQLField(() => ID, { nullable: true })
  segmentId_eq?: string;

  @TypeGraphQLField(() => [ID], { nullable: true })
  segmentId_in?: string[];
}

@TypeGraphQLInputType()
export class FeatureFlagSegmentWhereUniqueInput {
  @TypeGraphQLField(() => String)
  id?: string;
}

@TypeGraphQLInputType()
export class FeatureFlagSegmentCreateInput {
  @TypeGraphQLField()
  projKey!: string;

  @TypeGraphQLField({ nullable: true })
  projectId?: string;

  @TypeGraphQLField()
  envKey!: string;
github penta-jelly / re-radio / server / src / radio / song / song.input.ts View on Github external
thumbnail?: string;

  @Field(type => Int, { nullable: true })
  duration?: number;

  @Field(type => SongStatusEnum, { nullable: true })
  status?: SongStatusEnum;
}

@InputType()
export class SongFindOneWhereInput {
  @Field(type => Int)
  id: number;
}

@InputType()
export class SongCreateInput {
  @Field()
  title: string;

  @Field()
  @IsUrl()
  url: string;

  @Field()
  @IsUrl()
  thumbnail: string;

  @Field(type => Int)
  duration: number;

  @Field(type => SongStatusEnum, { nullable: true })
github goldcaddy77 / warthog / examples / 4-many-to-many-relationship / generated / classes.ts View on Github external
firstName_in?: string[];
}

@TypeGraphQLInputType()
export class AuthorWhereUniqueInput {
  @TypeGraphQLField(() => String)
  id?: string;
}

@TypeGraphQLInputType()
export class AuthorCreateInput {
  @TypeGraphQLField()
  firstName!: string;
}

@TypeGraphQLInputType()
export class AuthorUpdateInput {
  @TypeGraphQLField({ nullable: true })
  firstName?: string;
}

@ArgsType()
export class AuthorWhereArgs extends PaginationArgs {
  @TypeGraphQLField(() => AuthorWhereInput, { nullable: true })
  where?: AuthorWhereInput;

  @TypeGraphQLField(() => AuthorOrderByEnum, { nullable: true })
  orderBy?: AuthorOrderByEnum;
}

@ArgsType()
export class AuthorCreateManyArgs {
github goldcaddy77 / warthog / examples / 08-performance / generated / classes.ts View on Github external
deletedAt_ASC = "deletedAt_ASC",
  deletedAt_DESC = "deletedAt_DESC",

  title_ASC = "title_ASC",
  title_DESC = "title_DESC",

  userId_ASC = "userId_ASC",
  userId_DESC = "userId_DESC"
}

registerEnumType(PostOrderByEnum, {
  name: "PostOrderByInput"
});

@TypeGraphQLInputType()
export class PostWhereInput {
  @TypeGraphQLField(() => String, { nullable: true })
  id_eq?: string;

  @TypeGraphQLField(() => [String], { nullable: true })
  id_in?: string[];

  @TypeGraphQLField({ nullable: true })
  createdAt_eq?: String;

  @TypeGraphQLField({ nullable: true })
  createdAt_lt?: String;

  @TypeGraphQLField({ nullable: true })
  createdAt_lte?: String;