Skip to content

Commit

Permalink
chore!: Update library to support to Prisma v4
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Update library to support to Prisma v4

close: unlight#123
  • Loading branch information
unlight authored Jun 30, 2022
2 parents 003e07e + cf5763d commit 1456303
Show file tree
Hide file tree
Showing 63 changed files with 590 additions and 469 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { ArticleUpdateManyWithWhereWithoutAuthorInput } from './article-update-m
import { ArticleScalarWhereInput } from './article-scalar-where.input';

@InputType()
export class ArticleUncheckedUpdateManyWithoutAuthorInput {
export class ArticleUncheckedUpdateManyWithoutAuthorNestedInput {
@Field(() => [ArticleCreateWithoutAuthorInput], { nullable: true })
@Type(() => ArticleCreateWithoutAuthorInput)
create?: Array<ArticleCreateWithoutAuthorInput>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { ArticleUpdateManyWithWhereWithoutFavoritedByInput } from './article-upd
import { ArticleScalarWhereInput } from './article-scalar-where.input';

@InputType()
export class ArticleUncheckedUpdateManyWithoutFavoritedByInput {
export class ArticleUncheckedUpdateManyWithoutFavoritedByNestedInput {
@Field(() => [ArticleCreateWithoutFavoritedByInput], { nullable: true })
@Type(() => ArticleCreateWithoutFavoritedByInput)
create?: Array<ArticleCreateWithoutFavoritedByInput>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { ArticleUpdateManyWithWhereWithoutTagsInput } from './article-update-man
import { ArticleScalarWhereInput } from './article-scalar-where.input';

@InputType()
export class ArticleUncheckedUpdateManyWithoutTagsInput {
export class ArticleUncheckedUpdateManyWithoutTagsNestedInput {
@Field(() => [ArticleCreateWithoutTagsInput], { nullable: true })
@Type(() => ArticleCreateWithoutTagsInput)
create?: Array<ArticleCreateWithoutTagsInput>;
Expand Down
22 changes: 12 additions & 10 deletions @generated/article/article-unchecked-update-without-author.input.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
import { TagUncheckedUpdateManyWithoutArticlesInput } from '../tag/tag-unchecked-update-many-without-articles.input';
import { TagUncheckedUpdateManyWithoutArticlesNestedInput } from '../tag/tag-unchecked-update-many-without-articles-nested.input';
import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-field-update-operations.input';
import { IntFieldUpdateOperationsInput } from '../prisma/int-field-update-operations.input';
import { UserUncheckedUpdateManyWithoutFavoriteArticlesInput } from '../user/user-unchecked-update-many-without-favorite-articles.input';
import { UserUncheckedUpdateManyWithoutFavoriteArticlesNestedInput } from '../user/user-unchecked-update-many-without-favorite-articles-nested.input';
import { Type } from 'class-transformer';
import { CommentUncheckedUpdateManyWithoutArticleInput } from '../comment/comment-unchecked-update-many-without-article.input';
import { CommentUncheckedUpdateManyWithoutArticleNestedInput } from '../comment/comment-unchecked-update-many-without-article-nested.input';
import { NullableBoolFieldUpdateOperationsInput } from '../prisma/nullable-bool-field-update-operations.input';

@InputType()
Expand All @@ -26,8 +26,8 @@ export class ArticleUncheckedUpdateWithoutAuthorInput {
@Field(() => StringFieldUpdateOperationsInput, { nullable: true })
body?: StringFieldUpdateOperationsInput;

@Field(() => TagUncheckedUpdateManyWithoutArticlesInput, { nullable: true })
tags?: TagUncheckedUpdateManyWithoutArticlesInput;
@Field(() => TagUncheckedUpdateManyWithoutArticlesNestedInput, { nullable: true })
tags?: TagUncheckedUpdateManyWithoutArticlesNestedInput;

@Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true })
createdAt?: DateTimeFieldUpdateOperationsInput;
Expand All @@ -38,12 +38,14 @@ export class ArticleUncheckedUpdateWithoutAuthorInput {
@Field(() => IntFieldUpdateOperationsInput, { nullable: true })
favoritesCount?: IntFieldUpdateOperationsInput;

@Field(() => UserUncheckedUpdateManyWithoutFavoriteArticlesInput, { nullable: true })
@Type(() => UserUncheckedUpdateManyWithoutFavoriteArticlesInput)
favoritedBy?: UserUncheckedUpdateManyWithoutFavoriteArticlesInput;
@Field(() => UserUncheckedUpdateManyWithoutFavoriteArticlesNestedInput, {
nullable: true,
})
@Type(() => UserUncheckedUpdateManyWithoutFavoriteArticlesNestedInput)
favoritedBy?: UserUncheckedUpdateManyWithoutFavoriteArticlesNestedInput;

@Field(() => CommentUncheckedUpdateManyWithoutArticleInput, { nullable: true })
comments?: CommentUncheckedUpdateManyWithoutArticleInput;
@Field(() => CommentUncheckedUpdateManyWithoutArticleNestedInput, { nullable: true })
comments?: CommentUncheckedUpdateManyWithoutArticleNestedInput;

@Field(() => NullableBoolFieldUpdateOperationsInput, { nullable: true })
active?: NullableBoolFieldUpdateOperationsInput;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
import { TagUncheckedUpdateManyWithoutArticlesInput } from '../tag/tag-unchecked-update-many-without-articles.input';
import { TagUncheckedUpdateManyWithoutArticlesNestedInput } from '../tag/tag-unchecked-update-many-without-articles-nested.input';
import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-field-update-operations.input';
import { IntFieldUpdateOperationsInput } from '../prisma/int-field-update-operations.input';
import { UserUncheckedUpdateManyWithoutFavoriteArticlesInput } from '../user/user-unchecked-update-many-without-favorite-articles.input';
import { UserUncheckedUpdateManyWithoutFavoriteArticlesNestedInput } from '../user/user-unchecked-update-many-without-favorite-articles-nested.input';
import { Type } from 'class-transformer';
import { NullableBoolFieldUpdateOperationsInput } from '../prisma/nullable-bool-field-update-operations.input';

Expand All @@ -25,8 +25,8 @@ export class ArticleUncheckedUpdateWithoutCommentsInput {
@Field(() => StringFieldUpdateOperationsInput, { nullable: true })
body?: StringFieldUpdateOperationsInput;

@Field(() => TagUncheckedUpdateManyWithoutArticlesInput, { nullable: true })
tags?: TagUncheckedUpdateManyWithoutArticlesInput;
@Field(() => TagUncheckedUpdateManyWithoutArticlesNestedInput, { nullable: true })
tags?: TagUncheckedUpdateManyWithoutArticlesNestedInput;

@Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true })
createdAt?: DateTimeFieldUpdateOperationsInput;
Expand All @@ -40,9 +40,11 @@ export class ArticleUncheckedUpdateWithoutCommentsInput {
@Field(() => StringFieldUpdateOperationsInput, { nullable: true })
authorId?: StringFieldUpdateOperationsInput;

@Field(() => UserUncheckedUpdateManyWithoutFavoriteArticlesInput, { nullable: true })
@Type(() => UserUncheckedUpdateManyWithoutFavoriteArticlesInput)
favoritedBy?: UserUncheckedUpdateManyWithoutFavoriteArticlesInput;
@Field(() => UserUncheckedUpdateManyWithoutFavoriteArticlesNestedInput, {
nullable: true,
})
@Type(() => UserUncheckedUpdateManyWithoutFavoriteArticlesNestedInput)
favoritedBy?: UserUncheckedUpdateManyWithoutFavoriteArticlesNestedInput;

@Field(() => NullableBoolFieldUpdateOperationsInput, { nullable: true })
active?: NullableBoolFieldUpdateOperationsInput;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
import { TagUncheckedUpdateManyWithoutArticlesInput } from '../tag/tag-unchecked-update-many-without-articles.input';
import { TagUncheckedUpdateManyWithoutArticlesNestedInput } from '../tag/tag-unchecked-update-many-without-articles-nested.input';
import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-field-update-operations.input';
import { IntFieldUpdateOperationsInput } from '../prisma/int-field-update-operations.input';
import { CommentUncheckedUpdateManyWithoutArticleInput } from '../comment/comment-unchecked-update-many-without-article.input';
import { CommentUncheckedUpdateManyWithoutArticleNestedInput } from '../comment/comment-unchecked-update-many-without-article-nested.input';
import { NullableBoolFieldUpdateOperationsInput } from '../prisma/nullable-bool-field-update-operations.input';

@InputType()
Expand All @@ -24,8 +24,8 @@ export class ArticleUncheckedUpdateWithoutFavoritedByInput {
@Field(() => StringFieldUpdateOperationsInput, { nullable: true })
body?: StringFieldUpdateOperationsInput;

@Field(() => TagUncheckedUpdateManyWithoutArticlesInput, { nullable: true })
tags?: TagUncheckedUpdateManyWithoutArticlesInput;
@Field(() => TagUncheckedUpdateManyWithoutArticlesNestedInput, { nullable: true })
tags?: TagUncheckedUpdateManyWithoutArticlesNestedInput;

@Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true })
createdAt?: DateTimeFieldUpdateOperationsInput;
Expand All @@ -39,8 +39,8 @@ export class ArticleUncheckedUpdateWithoutFavoritedByInput {
@Field(() => StringFieldUpdateOperationsInput, { nullable: true })
authorId?: StringFieldUpdateOperationsInput;

@Field(() => CommentUncheckedUpdateManyWithoutArticleInput, { nullable: true })
comments?: CommentUncheckedUpdateManyWithoutArticleInput;
@Field(() => CommentUncheckedUpdateManyWithoutArticleNestedInput, { nullable: true })
comments?: CommentUncheckedUpdateManyWithoutArticleNestedInput;

@Field(() => NullableBoolFieldUpdateOperationsInput, { nullable: true })
active?: NullableBoolFieldUpdateOperationsInput;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { InputType } from '@nestjs/graphql';
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-field-update-operations.input';
import { IntFieldUpdateOperationsInput } from '../prisma/int-field-update-operations.input';
import { UserUncheckedUpdateManyWithoutFavoriteArticlesInput } from '../user/user-unchecked-update-many-without-favorite-articles.input';
import { UserUncheckedUpdateManyWithoutFavoriteArticlesNestedInput } from '../user/user-unchecked-update-many-without-favorite-articles-nested.input';
import { Type } from 'class-transformer';
import { CommentUncheckedUpdateManyWithoutArticleInput } from '../comment/comment-unchecked-update-many-without-article.input';
import { CommentUncheckedUpdateManyWithoutArticleNestedInput } from '../comment/comment-unchecked-update-many-without-article-nested.input';
import { NullableBoolFieldUpdateOperationsInput } from '../prisma/nullable-bool-field-update-operations.input';

@InputType()
Expand Down Expand Up @@ -37,12 +37,14 @@ export class ArticleUncheckedUpdateWithoutTagsInput {
@Field(() => StringFieldUpdateOperationsInput, { nullable: true })
authorId?: StringFieldUpdateOperationsInput;

@Field(() => UserUncheckedUpdateManyWithoutFavoriteArticlesInput, { nullable: true })
@Type(() => UserUncheckedUpdateManyWithoutFavoriteArticlesInput)
favoritedBy?: UserUncheckedUpdateManyWithoutFavoriteArticlesInput;
@Field(() => UserUncheckedUpdateManyWithoutFavoriteArticlesNestedInput, {
nullable: true,
})
@Type(() => UserUncheckedUpdateManyWithoutFavoriteArticlesNestedInput)
favoritedBy?: UserUncheckedUpdateManyWithoutFavoriteArticlesNestedInput;

@Field(() => CommentUncheckedUpdateManyWithoutArticleInput, { nullable: true })
comments?: CommentUncheckedUpdateManyWithoutArticleInput;
@Field(() => CommentUncheckedUpdateManyWithoutArticleNestedInput, { nullable: true })
comments?: CommentUncheckedUpdateManyWithoutArticleNestedInput;

@Field(() => NullableBoolFieldUpdateOperationsInput, { nullable: true })
active?: NullableBoolFieldUpdateOperationsInput;
Expand Down
22 changes: 12 additions & 10 deletions @generated/article/article-unchecked-update.input.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
import { TagUncheckedUpdateManyWithoutArticlesInput } from '../tag/tag-unchecked-update-many-without-articles.input';
import { TagUncheckedUpdateManyWithoutArticlesNestedInput } from '../tag/tag-unchecked-update-many-without-articles-nested.input';
import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-field-update-operations.input';
import { IntFieldUpdateOperationsInput } from '../prisma/int-field-update-operations.input';
import { UserUncheckedUpdateManyWithoutFavoriteArticlesInput } from '../user/user-unchecked-update-many-without-favorite-articles.input';
import { UserUncheckedUpdateManyWithoutFavoriteArticlesNestedInput } from '../user/user-unchecked-update-many-without-favorite-articles-nested.input';
import { Type } from 'class-transformer';
import { CommentUncheckedUpdateManyWithoutArticleInput } from '../comment/comment-unchecked-update-many-without-article.input';
import { CommentUncheckedUpdateManyWithoutArticleNestedInput } from '../comment/comment-unchecked-update-many-without-article-nested.input';
import { NullableBoolFieldUpdateOperationsInput } from '../prisma/nullable-bool-field-update-operations.input';

@InputType()
Expand All @@ -26,8 +26,8 @@ export class ArticleUncheckedUpdateInput {
@Field(() => StringFieldUpdateOperationsInput, { nullable: true })
body?: StringFieldUpdateOperationsInput;

@Field(() => TagUncheckedUpdateManyWithoutArticlesInput, { nullable: true })
tags?: TagUncheckedUpdateManyWithoutArticlesInput;
@Field(() => TagUncheckedUpdateManyWithoutArticlesNestedInput, { nullable: true })
tags?: TagUncheckedUpdateManyWithoutArticlesNestedInput;

@Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true })
createdAt?: DateTimeFieldUpdateOperationsInput;
Expand All @@ -41,12 +41,14 @@ export class ArticleUncheckedUpdateInput {
@Field(() => StringFieldUpdateOperationsInput, { nullable: true })
authorId?: StringFieldUpdateOperationsInput;

@Field(() => UserUncheckedUpdateManyWithoutFavoriteArticlesInput, { nullable: true })
@Type(() => UserUncheckedUpdateManyWithoutFavoriteArticlesInput)
favoritedBy?: UserUncheckedUpdateManyWithoutFavoriteArticlesInput;
@Field(() => UserUncheckedUpdateManyWithoutFavoriteArticlesNestedInput, {
nullable: true,
})
@Type(() => UserUncheckedUpdateManyWithoutFavoriteArticlesNestedInput)
favoritedBy?: UserUncheckedUpdateManyWithoutFavoriteArticlesNestedInput;

@Field(() => CommentUncheckedUpdateManyWithoutArticleInput, { nullable: true })
comments?: CommentUncheckedUpdateManyWithoutArticleInput;
@Field(() => CommentUncheckedUpdateManyWithoutArticleNestedInput, { nullable: true })
comments?: CommentUncheckedUpdateManyWithoutArticleNestedInput;

@Field(() => NullableBoolFieldUpdateOperationsInput, { nullable: true })
active?: NullableBoolFieldUpdateOperationsInput;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { ArticleUpdateManyWithWhereWithoutAuthorInput } from './article-update-m
import { ArticleScalarWhereInput } from './article-scalar-where.input';

@InputType()
export class ArticleUpdateManyWithoutAuthorInput {
export class ArticleUpdateManyWithoutAuthorNestedInput {
@Field(() => [ArticleCreateWithoutAuthorInput], { nullable: true })
@Type(() => ArticleCreateWithoutAuthorInput)
create?: Array<ArticleCreateWithoutAuthorInput>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { ArticleUpdateManyWithWhereWithoutFavoritedByInput } from './article-upd
import { ArticleScalarWhereInput } from './article-scalar-where.input';

@InputType()
export class ArticleUpdateManyWithoutFavoritedByInput {
export class ArticleUpdateManyWithoutFavoritedByNestedInput {
@Field(() => [ArticleCreateWithoutFavoritedByInput], { nullable: true })
@Type(() => ArticleCreateWithoutFavoritedByInput)
create?: Array<ArticleCreateWithoutFavoritedByInput>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { ArticleUpdateManyWithWhereWithoutTagsInput } from './article-update-man
import { ArticleScalarWhereInput } from './article-scalar-where.input';

@InputType()
export class ArticleUpdateManyWithoutTagsInput {
export class ArticleUpdateManyWithoutTagsNestedInput {
@Field(() => [ArticleCreateWithoutTagsInput], { nullable: true })
@Type(() => ArticleCreateWithoutTagsInput)
create?: Array<ArticleCreateWithoutTagsInput>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { ArticleWhereUniqueInput } from './article-where-unique.input';
import { ArticleUpdateWithoutCommentsInput } from './article-update-without-comments.input';

@InputType()
export class ArticleUpdateOneWithoutCommentsInput {
export class ArticleUpdateOneWithoutCommentsNestedInput {
@Field(() => ArticleCreateWithoutCommentsInput, { nullable: true })
@Type(() => ArticleCreateWithoutCommentsInput)
create?: ArticleCreateWithoutCommentsInput;
Expand Down
20 changes: 10 additions & 10 deletions @generated/article/article-update-without-author.input.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update-operations.input';
import { TagUpdateManyWithoutArticlesInput } from '../tag/tag-update-many-without-articles.input';
import { TagUpdateManyWithoutArticlesNestedInput } from '../tag/tag-update-many-without-articles-nested.input';
import { DateTimeFieldUpdateOperationsInput } from '../prisma/date-time-field-update-operations.input';
import { IntFieldUpdateOperationsInput } from '../prisma/int-field-update-operations.input';
import { UserUpdateManyWithoutFavoriteArticlesInput } from '../user/user-update-many-without-favorite-articles.input';
import { UserUpdateManyWithoutFavoriteArticlesNestedInput } from '../user/user-update-many-without-favorite-articles-nested.input';
import { Type } from 'class-transformer';
import { CommentUpdateManyWithoutArticleInput } from '../comment/comment-update-many-without-article.input';
import { CommentUpdateManyWithoutArticleNestedInput } from '../comment/comment-update-many-without-article-nested.input';
import { NullableBoolFieldUpdateOperationsInput } from '../prisma/nullable-bool-field-update-operations.input';

@InputType()
Expand All @@ -26,8 +26,8 @@ export class ArticleUpdateWithoutAuthorInput {
@Field(() => StringFieldUpdateOperationsInput, { nullable: true })
body?: StringFieldUpdateOperationsInput;

@Field(() => TagUpdateManyWithoutArticlesInput, { nullable: true })
tags?: TagUpdateManyWithoutArticlesInput;
@Field(() => TagUpdateManyWithoutArticlesNestedInput, { nullable: true })
tags?: TagUpdateManyWithoutArticlesNestedInput;

@Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true })
createdAt?: DateTimeFieldUpdateOperationsInput;
Expand All @@ -38,12 +38,12 @@ export class ArticleUpdateWithoutAuthorInput {
@Field(() => IntFieldUpdateOperationsInput, { nullable: true })
favoritesCount?: IntFieldUpdateOperationsInput;

@Field(() => UserUpdateManyWithoutFavoriteArticlesInput, { nullable: true })
@Type(() => UserUpdateManyWithoutFavoriteArticlesInput)
favoritedBy?: UserUpdateManyWithoutFavoriteArticlesInput;
@Field(() => UserUpdateManyWithoutFavoriteArticlesNestedInput, { nullable: true })
@Type(() => UserUpdateManyWithoutFavoriteArticlesNestedInput)
favoritedBy?: UserUpdateManyWithoutFavoriteArticlesNestedInput;

@Field(() => CommentUpdateManyWithoutArticleInput, { nullable: true })
comments?: CommentUpdateManyWithoutArticleInput;
@Field(() => CommentUpdateManyWithoutArticleNestedInput, { nullable: true })
comments?: CommentUpdateManyWithoutArticleNestedInput;

@Field(() => NullableBoolFieldUpdateOperationsInput, { nullable: true })
active?: NullableBoolFieldUpdateOperationsInput;
Expand Down
Loading

0 comments on commit 1456303

Please sign in to comment.