How to use the type-graphql.ArgsType 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 / test / generated / classes.ts View on Github external
emailField?: string;

  @TypeGraphQLField({ nullable: true })
  integerField?: number;

  @TypeGraphQLField({ nullable: true })
  booleanField?: boolean;

  @TypeGraphQLField({ nullable: true })
  floatField?: number;

  @TypeGraphQLField(() => GraphQLJSONObject, { nullable: true })
  jsonField?: JSON;
}

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

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

@ArgsType()
export class KitchenSinkCreateManyArgs {
  @TypeGraphQLField(() => [KitchenSinkCreateInput])
  data!: KitchenSinkCreateInput[];
}

@ArgsType()
export class KitchenSinkUpdateArgs {
github SolidZORO / leaa / packages / _leaa-common / src / dtos / user / user.args.ts View on Github external
import { ArgsType } from 'type-graphql';

import { ItemArgs } from '@leaa/common/src/dtos/_common';

@ArgsType()
export class UserArgs extends ItemArgs {}
github MichalLytek / type-graphql / experiments / prisma / generated / type-graphql / index.ts View on Github external
@ArgsType()
export class DeleteOneUserArgs {
  @Field(_type => UserWhereUniqueInput, { nullable: false })
  where!: UserWhereUniqueInput;
}

@ArgsType()
export class UpdateOneUserArgs {
  @Field(_type => UserUpdateInput, { nullable: false })
  data!: UserUpdateInput;

  @Field(_type => UserWhereUniqueInput, { nullable: false })
  where!: UserWhereUniqueInput;
}

@ArgsType()
export class UpdateManyUserArgs {
  @Field(_type => UserUpdateManyMutationInput, { nullable: false })
  data!: UserUpdateManyMutationInput;

  @Field(_type => UserWhereInput, { nullable: true })
  where?: UserWhereInput | null;
}

@ArgsType()
export class UpsertOneUserArgs {
  @Field(_type => UserWhereUniqueInput, { nullable: false })
  where!: UserWhereUniqueInput;

  @Field(_type => UserCreateInput, { nullable: false })
  create!: UserCreateInput;
github goldcaddy77 / warthog / examples / 1-simple-model / generated / classes.ts View on Github external
lastName?: string;

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

  @TypeGraphQLField({ nullable: true })
  age?: number;

  @TypeGraphQLField({ nullable: true })
  isRequired?: boolean;

  @TypeGraphQLField({ nullable: true })
  rating?: number;
}

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

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

@ArgsType()
export class UserCreateManyArgs {
  @TypeGraphQLField(() => [UserCreateInput])
  data!: UserCreateInput[];
}

@ArgsType()
export class UserUpdateArgs {
github goldcaddy77 / warthog-starter / generated / classes.ts View on Github external
environmentId?: string;

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

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

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

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

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

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

@ArgsType()
export class UserSegmentCreateManyArgs {
  @TypeGraphQLField(() => [UserSegmentCreateInput])
  data!: UserSegmentCreateInput[];
}

@ArgsType()
export class UserSegmentUpdateArgs {
github goldcaddy77 / warthog / examples / 03-one-to-many-relationship / generated / classes.ts View on Github external
@ArgsType()
export class PostWhereArgs extends PaginationArgs {
  @TypeGraphQLField(() => PostWhereInput, { nullable: true })
  where?: PostWhereInput;

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

@ArgsType()
export class PostCreateManyArgs {
  @TypeGraphQLField(() => [PostCreateInput])
  data!: PostCreateInput[];
}

@ArgsType()
export class PostUpdateArgs {
  @TypeGraphQLField() data!: PostUpdateInput;
  @TypeGraphQLField() where!: PostWhereUniqueInput;
}
github goldcaddy77 / warthog / examples / 04-many-to-many-relationship / generated / classes.ts View on Github external
id?: string;
}

@TypeGraphQLInputType()
export class RoleCreateInput {
  @TypeGraphQLField()
  name!: string;
}

@TypeGraphQLInputType()
export class RoleUpdateInput {
  @TypeGraphQLField({ nullable: true })
  name?: string;
}

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

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

@ArgsType()
export class RoleCreateManyArgs {
  @TypeGraphQLField(() => [RoleCreateInput])
  data!: RoleCreateInput[];
}

@ArgsType()
export class RoleUpdateArgs {
github goldcaddy77 / warthog / examples / 7-feature-flags / generated / classes.ts View on Github external
@ArgsType()
export class UserSegmentWhereArgs extends PaginationArgs {
  @TypeGraphQLField(() => UserSegmentWhereInput, { nullable: true })
  where?: UserSegmentWhereInput;

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

@ArgsType()
export class UserSegmentCreateManyArgs {
  @TypeGraphQLField(() => [UserSegmentCreateInput])
  data!: UserSegmentCreateInput[];
}

@ArgsType()
export class UserSegmentUpdateArgs {
  @TypeGraphQLField() data!: UserSegmentUpdateInput;
  @TypeGraphQLField() where!: UserSegmentWhereUniqueInput;
}

export enum UserOrderByEnum {
  createdAt_ASC = "createdAt_ASC",
  createdAt_DESC = "createdAt_DESC",

  updatedAt_ASC = "updatedAt_ASC",
  updatedAt_DESC = "updatedAt_DESC",

  deletedAt_ASC = "deletedAt_ASC",
  deletedAt_DESC = "deletedAt_DESC",

  key_ASC = "key_ASC",
github goldcaddy77 / warthog / examples / 07-feature-flags / generated / classes.ts View on Github external
envKey?: string;

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

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

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

@ArgsType()
export class SegmentCreateManyArgs {
  @TypeGraphQLField(() => [SegmentCreateInput])
  data!: SegmentCreateInput[];
}

@ArgsType()
export class SegmentUpdateArgs {
  @TypeGraphQLField() data!: SegmentUpdateInput;
  @TypeGraphQLField() where!: SegmentWhereUniqueInput;
}

export enum UserSegmentOrderByEnum {
  createdAt_ASC = "createdAt_ASC",
  createdAt_DESC = "createdAt_DESC",

  updatedAt_ASC = "updatedAt_ASC",