Skip to content

Commit b5587cd

Browse files
committed
fix: Type mismatch between prisma types
BREAKING CHANGE: Generated types tries to be compatible with Prisma types, nullability (optional/required) changed for input types closes: unlight#4
1 parent f91e120 commit b5587cd

File tree

95 files changed

+456
-588
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+456
-588
lines changed

.editorconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ insert_final_newline = true
1111

1212
[*.md]
1313
trim_trailing_whitespace = false
14-
max_line_length = 80
1514

1615
[*.{json,yml}]
1716
indent_size = 2

.prettierrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
2-
printWidth: 80,
2+
printWidth: 88,
33
trailingComma: 'all',
44
tabWidth: 4,
55
semi: true,

src/@generated/article/article-create-many-without-author.input.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ export class ArticleCreateManyWithoutAuthorInput {
99
@Field(() => [ArticleCreateWithoutAuthorInput], {
1010
nullable: true,
1111
})
12-
create?:
13-
| ArticleCreateWithoutAuthorInput
14-
| Array<ArticleCreateWithoutAuthorInput>;
12+
create?: ArticleCreateWithoutAuthorInput | Array<ArticleCreateWithoutAuthorInput>;
1513

1614
@Field(() => [ArticleWhereUniqueInput], {
1715
nullable: true,

src/@generated/article/article-create-many-without-tags.input.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ export class ArticleCreateManyWithoutTagsInput {
99
@Field(() => [ArticleCreateWithoutTagsInput], {
1010
nullable: true,
1111
})
12-
create?:
13-
| ArticleCreateWithoutTagsInput
14-
| Array<ArticleCreateWithoutTagsInput>;
12+
create?: ArticleCreateWithoutTagsInput | Array<ArticleCreateWithoutTagsInput>;
1513

1614
@Field(() => [ArticleWhereUniqueInput], {
1715
nullable: true,

src/@generated/article/article-create-or-connect-withoutauthor.input.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import { ArticleWhereUniqueInput } from './article-where-unique.input';
66
@InputType()
77
export class ArticleCreateOrConnectWithoutauthorInput {
88
@Field(() => ArticleWhereUniqueInput, {
9-
nullable: true,
9+
nullable: false,
1010
})
11-
where?: ArticleWhereUniqueInput;
11+
where!: ArticleWhereUniqueInput;
1212

1313
@Field(() => ArticleCreateWithoutAuthorInput, {
14-
nullable: true,
14+
nullable: false,
1515
})
16-
create?: ArticleCreateWithoutAuthorInput;
16+
create!: ArticleCreateWithoutAuthorInput;
1717
}

src/@generated/article/article-create-or-connect-withoutcomments.input.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import { ArticleWhereUniqueInput } from './article-where-unique.input';
66
@InputType()
77
export class ArticleCreateOrConnectWithoutcommentsInput {
88
@Field(() => ArticleWhereUniqueInput, {
9-
nullable: true,
9+
nullable: false,
1010
})
11-
where?: ArticleWhereUniqueInput;
11+
where!: ArticleWhereUniqueInput;
1212

1313
@Field(() => ArticleCreateWithoutCommentsInput, {
14-
nullable: true,
14+
nullable: false,
1515
})
16-
create?: ArticleCreateWithoutCommentsInput;
16+
create!: ArticleCreateWithoutCommentsInput;
1717
}

src/@generated/article/article-create-or-connect-withoutfavorited-by.input.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import { ArticleWhereUniqueInput } from './article-where-unique.input';
66
@InputType()
77
export class ArticleCreateOrConnectWithoutfavoritedByInput {
88
@Field(() => ArticleWhereUniqueInput, {
9-
nullable: true,
9+
nullable: false,
1010
})
11-
where?: ArticleWhereUniqueInput;
11+
where!: ArticleWhereUniqueInput;
1212

1313
@Field(() => ArticleCreateWithoutFavoritedByInput, {
14-
nullable: true,
14+
nullable: false,
1515
})
16-
create?: ArticleCreateWithoutFavoritedByInput;
16+
create!: ArticleCreateWithoutFavoritedByInput;
1717
}

src/@generated/article/article-create-or-connect-withouttags.input.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import { ArticleWhereUniqueInput } from './article-where-unique.input';
66
@InputType()
77
export class ArticleCreateOrConnectWithouttagsInput {
88
@Field(() => ArticleWhereUniqueInput, {
9-
nullable: true,
9+
nullable: false,
1010
})
11-
where?: ArticleWhereUniqueInput;
11+
where!: ArticleWhereUniqueInput;
1212

1313
@Field(() => ArticleCreateWithoutTagsInput, {
14-
nullable: true,
14+
nullable: false,
1515
})
16-
create?: ArticleCreateWithoutTagsInput;
16+
create!: ArticleCreateWithoutTagsInput;
1717
}

src/@generated/article/article-create-without-author.input.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,24 @@ export class ArticleCreateWithoutAuthorInput {
1212
id?: string;
1313

1414
@Field(() => String, {
15-
nullable: true,
15+
nullable: false,
1616
})
17-
slug?: string;
17+
slug!: string;
1818

1919
@Field(() => String, {
20-
nullable: true,
20+
nullable: false,
2121
})
22-
title?: string;
22+
title!: string;
2323

2424
@Field(() => String, {
25-
nullable: true,
25+
nullable: false,
2626
})
27-
description?: string;
27+
description!: string;
2828

2929
@Field(() => String, {
30-
nullable: true,
30+
nullable: false,
3131
})
32-
body?: string;
32+
body!: string;
3333

3434
@Field(() => String, {
3535
nullable: true,

src/@generated/article/article-create-without-comments.input.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,24 @@ export class ArticleCreateWithoutCommentsInput {
1212
id?: string;
1313

1414
@Field(() => String, {
15-
nullable: true,
15+
nullable: false,
1616
})
17-
slug?: string;
17+
slug!: string;
1818

1919
@Field(() => String, {
20-
nullable: true,
20+
nullable: false,
2121
})
22-
title?: string;
22+
title!: string;
2323

2424
@Field(() => String, {
25-
nullable: true,
25+
nullable: false,
2626
})
27-
description?: string;
27+
description!: string;
2828

2929
@Field(() => String, {
30-
nullable: true,
30+
nullable: false,
3131
})
32-
body?: string;
32+
body!: string;
3333

3434
@Field(() => String, {
3535
nullable: true,
@@ -57,9 +57,9 @@ export class ArticleCreateWithoutCommentsInput {
5757
tags?: TagCreateManyWithoutArticlesInput;
5858

5959
@Field(() => UserCreateOneWithoutArticlesInput, {
60-
nullable: true,
60+
nullable: false,
6161
})
62-
author?: UserCreateOneWithoutArticlesInput;
62+
author!: UserCreateOneWithoutArticlesInput;
6363

6464
@Field(() => UserCreateManyWithoutFavoriteArticlesInput, {
6565
nullable: true,

src/@generated/article/article-create-without-favorited-by.input.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,24 @@ export class ArticleCreateWithoutFavoritedByInput {
1212
id?: string;
1313

1414
@Field(() => String, {
15-
nullable: true,
15+
nullable: false,
1616
})
17-
slug?: string;
17+
slug!: string;
1818

1919
@Field(() => String, {
20-
nullable: true,
20+
nullable: false,
2121
})
22-
title?: string;
22+
title!: string;
2323

2424
@Field(() => String, {
25-
nullable: true,
25+
nullable: false,
2626
})
27-
description?: string;
27+
description!: string;
2828

2929
@Field(() => String, {
30-
nullable: true,
30+
nullable: false,
3131
})
32-
body?: string;
32+
body!: string;
3333

3434
@Field(() => String, {
3535
nullable: true,
@@ -57,9 +57,9 @@ export class ArticleCreateWithoutFavoritedByInput {
5757
tags?: TagCreateManyWithoutArticlesInput;
5858

5959
@Field(() => UserCreateOneWithoutArticlesInput, {
60-
nullable: true,
60+
nullable: false,
6161
})
62-
author?: UserCreateOneWithoutArticlesInput;
62+
author!: UserCreateOneWithoutArticlesInput;
6363

6464
@Field(() => CommentCreateManyWithoutArticleInput, {
6565
nullable: true,

src/@generated/article/article-create-without-tags.input.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,24 @@ export class ArticleCreateWithoutTagsInput {
1212
id?: string;
1313

1414
@Field(() => String, {
15-
nullable: true,
15+
nullable: false,
1616
})
17-
slug?: string;
17+
slug!: string;
1818

1919
@Field(() => String, {
20-
nullable: true,
20+
nullable: false,
2121
})
22-
title?: string;
22+
title!: string;
2323

2424
@Field(() => String, {
25-
nullable: true,
25+
nullable: false,
2626
})
27-
description?: string;
27+
description!: string;
2828

2929
@Field(() => String, {
30-
nullable: true,
30+
nullable: false,
3131
})
32-
body?: string;
32+
body!: string;
3333

3434
@Field(() => String, {
3535
nullable: true,
@@ -52,9 +52,9 @@ export class ArticleCreateWithoutTagsInput {
5252
active?: boolean;
5353

5454
@Field(() => UserCreateOneWithoutArticlesInput, {
55-
nullable: true,
55+
nullable: false,
5656
})
57-
author?: UserCreateOneWithoutArticlesInput;
57+
author!: UserCreateOneWithoutArticlesInput;
5858

5959
@Field(() => UserCreateManyWithoutFavoriteArticlesInput, {
6060
nullable: true,

src/@generated/article/article-create.input.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,24 @@ export class ArticleCreateInput {
1313
id?: string;
1414

1515
@Field(() => String, {
16-
nullable: true,
16+
nullable: false,
1717
})
18-
slug?: string;
18+
slug!: string;
1919

2020
@Field(() => String, {
21-
nullable: true,
21+
nullable: false,
2222
})
23-
title?: string;
23+
title!: string;
2424

2525
@Field(() => String, {
26-
nullable: true,
26+
nullable: false,
2727
})
28-
description?: string;
28+
description!: string;
2929

3030
@Field(() => String, {
31-
nullable: true,
31+
nullable: false,
3232
})
33-
body?: string;
33+
body!: string;
3434

3535
@Field(() => String, {
3636
nullable: true,
@@ -58,9 +58,9 @@ export class ArticleCreateInput {
5858
tags?: TagCreateManyWithoutArticlesInput;
5959

6060
@Field(() => UserCreateOneWithoutArticlesInput, {
61-
nullable: true,
61+
nullable: false,
6262
})
63-
author?: UserCreateOneWithoutArticlesInput;
63+
author!: UserCreateOneWithoutArticlesInput;
6464

6565
@Field(() => UserCreateManyWithoutFavoriteArticlesInput, {
6666
nullable: true,

src/@generated/article/article-update-many-with-where-without-author.input.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import { ArticleUpdateManyMutationInput } from './article-update-many-mutation.i
66
@InputType()
77
export class ArticleUpdateManyWithWhereWithoutAuthorInput {
88
@Field(() => ArticleScalarWhereInput, {
9-
nullable: true,
9+
nullable: false,
1010
})
11-
where?: ArticleScalarWhereInput;
11+
where!: ArticleScalarWhereInput;
1212

1313
@Field(() => ArticleUpdateManyMutationInput, {
14-
nullable: true,
14+
nullable: false,
1515
})
16-
data?: ArticleUpdateManyMutationInput;
16+
data!: ArticleUpdateManyMutationInput;
1717
}

src/@generated/article/article-update-many-with-where-without-favorited-by.input.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import { ArticleUpdateManyMutationInput } from './article-update-many-mutation.i
66
@InputType()
77
export class ArticleUpdateManyWithWhereWithoutFavoritedByInput {
88
@Field(() => ArticleScalarWhereInput, {
9-
nullable: true,
9+
nullable: false,
1010
})
11-
where?: ArticleScalarWhereInput;
11+
where!: ArticleScalarWhereInput;
1212

1313
@Field(() => ArticleUpdateManyMutationInput, {
14-
nullable: true,
14+
nullable: false,
1515
})
16-
data?: ArticleUpdateManyMutationInput;
16+
data!: ArticleUpdateManyMutationInput;
1717
}

src/@generated/article/article-update-many-with-where-without-tags.input.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import { ArticleUpdateManyMutationInput } from './article-update-many-mutation.i
66
@InputType()
77
export class ArticleUpdateManyWithWhereWithoutTagsInput {
88
@Field(() => ArticleScalarWhereInput, {
9-
nullable: true,
9+
nullable: false,
1010
})
11-
where?: ArticleScalarWhereInput;
11+
where!: ArticleScalarWhereInput;
1212

1313
@Field(() => ArticleUpdateManyMutationInput, {
14-
nullable: true,
14+
nullable: false,
1515
})
16-
data?: ArticleUpdateManyMutationInput;
16+
data!: ArticleUpdateManyMutationInput;
1717
}

src/@generated/article/article-update-many-without-author.input.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ export class ArticleUpdateManyWithoutAuthorInput {
1313
@Field(() => [ArticleCreateWithoutAuthorInput], {
1414
nullable: true,
1515
})
16-
create?:
17-
| ArticleCreateWithoutAuthorInput
18-
| Array<ArticleCreateWithoutAuthorInput>;
16+
create?: ArticleCreateWithoutAuthorInput | Array<ArticleCreateWithoutAuthorInput>;
1917

2018
@Field(() => [ArticleWhereUniqueInput], {
2119
nullable: true,

src/@generated/article/article-update-many-without-tags.input.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ export class ArticleUpdateManyWithoutTagsInput {
1313
@Field(() => [ArticleCreateWithoutTagsInput], {
1414
nullable: true,
1515
})
16-
create?:
17-
| ArticleCreateWithoutTagsInput
18-
| Array<ArticleCreateWithoutTagsInput>;
16+
create?: ArticleCreateWithoutTagsInput | Array<ArticleCreateWithoutTagsInput>;
1917

2018
@Field(() => [ArticleWhereUniqueInput], {
2119
nullable: true,

0 commit comments

Comments
 (0)