Skip to content

Commit 5015de7

Browse files
committed
feat: Generate args types
1 parent a6213c7 commit 5015de7

File tree

148 files changed

+856
-182
lines changed

Some content is hidden

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

148 files changed

+856
-182
lines changed

.eslintrc.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,5 +114,13 @@ module.exports = {
114114
'sonarjs/no-duplicate-string': 0,
115115
},
116116
},
117+
{
118+
files: ['src/testing/type-tests.ts'],
119+
rules: {
120+
'etc/no-unused-declaration': 0,
121+
'@typescript-eslint/no-unused-vars': 0,
122+
'@typescript-eslint/no-unsafe-assignment': 0,
123+
},
124+
},
117125
],
118126
};

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@
6666
"@nestjs/core": "^7.4.4",
6767
"@nestjs/graphql": "^7.6.0",
6868
"@nestjs/platform-express": "^7.4.4",
69-
"@paljs/plugins": "^1.2.6",
69+
"@paljs/plugins": "^1.2.8",
7070
"@prisma/cli": "^2.6.2",
7171
"@prisma/client": ">=2.6",
7272
"@semantic-release/changelog": "^5.0.1",
7373
"@semantic-release/git": "^9.0.0",
7474
"@types/mocha": "^8.0.3",
7575
"@types/node": "^14.6.4",
76-
"@typescript-eslint/eslint-plugin": "^4.0.1",
77-
"@typescript-eslint/parser": "^4.0.1",
76+
"@typescript-eslint/eslint-plugin": "^4.1.0",
77+
"@typescript-eslint/parser": "^4.1.0",
7878
"apollo-server-express": "^2.17.0",
7979
"c8": "^7.3.0",
8080
"class-transformer": "^0.3.1",
@@ -90,19 +90,19 @@
9090
"eslint-plugin-simple-import-sort": "^5.0.3",
9191
"eslint-plugin-sonarjs": "^0.5.0",
9292
"eslint-plugin-sort-class-members": "^1.8.0",
93-
"eslint-plugin-total-functions": "^3.0.0",
93+
"eslint-plugin-total-functions": "^3.1.0",
9494
"eslint-plugin-unicorn": "^21.0.0",
9595
"eslint-plugin-wix-editor": "^3.2.0",
9696
"find-cache-dir": "^3.3.1",
9797
"git-branch-is": "^4.0.0",
9898
"graphql": "^15.3.0",
9999
"graphql-type-json": "^0.3.2",
100-
"husky": "^4.2.5",
100+
"husky": "^4.3.0",
101101
"mocha": "^8.1.3",
102102
"precise-commits": "^1.0.2",
103103
"prettier": "^2.1.1",
104104
"reflect-metadata": "^0.1.13",
105-
"rxjs": "^6.6.2",
105+
"rxjs": "^6.6.3",
106106
"semantic-release": "^17.1.1",
107107
"simplytyped": "^3.3.0",
108108
"ts-node": "^9.0.0",
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
import { ArgsType, Field, Int } from '@nestjs/graphql';
2+
3+
import { ArticleAvgAggregateInput } from './article-avg-aggregate.input';
4+
import { ArticleDistinctFieldEnum } from './article-distinct-field.enum';
5+
import { ArticleMaxAggregateInput } from './article-max-aggregate.input';
6+
import { ArticleMinAggregateInput } from './article-min-aggregate.input';
7+
import { ArticleOrderByInput } from './article-order-by.input';
8+
import { ArticleSumAggregateInput } from './article-sum-aggregate.input';
9+
import { ArticleWhereUniqueInput } from './article-where-unique.input';
10+
import { ArticleWhereInput } from './article-where.input';
11+
12+
@ArgsType()
13+
export class AggregateArticleArgs {
14+
@Field(() => ArticleWhereInput, {
15+
nullable: true,
16+
description: undefined,
17+
})
18+
where?: ArticleWhereInput;
19+
20+
@Field(() => [ArticleOrderByInput], {
21+
nullable: true,
22+
description: undefined,
23+
})
24+
orderBy?: Array<ArticleOrderByInput>;
25+
26+
@Field(() => ArticleWhereUniqueInput, {
27+
nullable: true,
28+
description: undefined,
29+
})
30+
cursor?: ArticleWhereUniqueInput;
31+
32+
@Field(() => Int, {
33+
nullable: true,
34+
description: undefined,
35+
})
36+
take?: number;
37+
38+
@Field(() => Int, {
39+
nullable: true,
40+
description: undefined,
41+
})
42+
skip?: number;
43+
44+
@Field(() => [ArticleDistinctFieldEnum], {
45+
nullable: true,
46+
description: undefined,
47+
})
48+
distinct?: Array<ArticleDistinctFieldEnum>;
49+
50+
@Field(() => Boolean, {
51+
nullable: true,
52+
description: undefined,
53+
})
54+
count?: true | null;
55+
56+
@Field(() => ArticleAvgAggregateInput, {
57+
nullable: true,
58+
description: undefined,
59+
})
60+
avg?: ArticleAvgAggregateInput | null;
61+
62+
@Field(() => ArticleSumAggregateInput, {
63+
nullable: true,
64+
description: undefined,
65+
})
66+
sum?: ArticleSumAggregateInput | null;
67+
68+
@Field(() => ArticleMinAggregateInput, {
69+
nullable: true,
70+
description: undefined,
71+
})
72+
min?: ArticleMinAggregateInput | null;
73+
74+
@Field(() => ArticleMaxAggregateInput, {
75+
nullable: true,
76+
description: undefined,
77+
})
78+
max?: ArticleMaxAggregateInput | null;
79+
}

src/@generated/article/article-avg-aggregate.input.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Field, InputType } from '@nestjs/graphql';
22

3-
@InputType({})
3+
@InputType()
44
export class ArticleAvgAggregateInput {
55
@Field(() => Boolean, {
66
nullable: true,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Field, InputType } from '@nestjs/graphql';
33
import { ArticleCreateWithoutAuthorInput } from './article-create-without-author.input';
44
import { ArticleWhereUniqueInput } from './article-where-unique.input';
55

6-
@InputType({})
6+
@InputType()
77
export class ArticleCreateManyWithoutAuthorInput {
88
@Field(() => [ArticleCreateWithoutAuthorInput], {
99
nullable: true,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Field, InputType } from '@nestjs/graphql';
33
import { ArticleCreateWithoutFavoritedByInput } from './article-create-without-favorited-by.input';
44
import { ArticleWhereUniqueInput } from './article-where-unique.input';
55

6-
@InputType({})
6+
@InputType()
77
export class ArticleCreateManyWithoutFavoritedByInput {
88
@Field(() => [ArticleCreateWithoutFavoritedByInput], {
99
nullable: true,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Field, InputType } from '@nestjs/graphql';
33
import { ArticleCreateWithoutTagsInput } from './article-create-without-tags.input';
44
import { ArticleWhereUniqueInput } from './article-where-unique.input';
55

6-
@InputType({})
6+
@InputType()
77
export class ArticleCreateManyWithoutTagsInput {
88
@Field(() => [ArticleCreateWithoutTagsInput], {
99
nullable: true,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Field, InputType } from '@nestjs/graphql';
33
import { ArticleCreateWithoutCommentsInput } from './article-create-without-comments.input';
44
import { ArticleWhereUniqueInput } from './article-where-unique.input';
55

6-
@InputType({})
6+
@InputType()
77
export class ArticleCreateOneWithoutCommentsInput {
88
@Field(() => ArticleCreateWithoutCommentsInput, {
99
nullable: true,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { CommentCreateManyWithoutArticleInput } from '../comment/comment-create-
44
import { TagCreateManyWithoutArticlesInput } from '../tag/tag-create-many-without-articles.input';
55
import { UserCreateManyWithoutFavoriteArticlesInput } from '../user/user-create-many-without-favorite-articles.input';
66

7-
@InputType({})
7+
@InputType()
88
export class ArticleCreateWithoutAuthorInput {
99
@Field(() => String, {
1010
nullable: true,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { TagCreateManyWithoutArticlesInput } from '../tag/tag-create-many-withou
44
import { UserCreateManyWithoutFavoriteArticlesInput } from '../user/user-create-many-without-favorite-articles.input';
55
import { UserCreateOneWithoutArticlesInput } from '../user/user-create-one-without-articles.input';
66

7-
@InputType({})
7+
@InputType()
88
export class ArticleCreateWithoutCommentsInput {
99
@Field(() => String, {
1010
nullable: true,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { CommentCreateManyWithoutArticleInput } from '../comment/comment-create-
44
import { TagCreateManyWithoutArticlesInput } from '../tag/tag-create-many-without-articles.input';
55
import { UserCreateOneWithoutArticlesInput } from '../user/user-create-one-without-articles.input';
66

7-
@InputType({})
7+
@InputType()
88
export class ArticleCreateWithoutFavoritedByInput {
99
@Field(() => String, {
1010
nullable: true,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { CommentCreateManyWithoutArticleInput } from '../comment/comment-create-
44
import { UserCreateManyWithoutFavoriteArticlesInput } from '../user/user-create-many-without-favorite-articles.input';
55
import { UserCreateOneWithoutArticlesInput } from '../user/user-create-one-without-articles.input';
66

7-
@InputType({})
7+
@InputType()
88
export class ArticleCreateWithoutTagsInput {
99
@Field(() => String, {
1010
nullable: true,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { TagCreateManyWithoutArticlesInput } from '../tag/tag-create-many-withou
55
import { UserCreateManyWithoutFavoriteArticlesInput } from '../user/user-create-many-without-favorite-articles.input';
66
import { UserCreateOneWithoutArticlesInput } from '../user/user-create-one-without-articles.input';
77

8-
@InputType({})
8+
@InputType()
99
export class ArticleCreateInput {
1010
@Field(() => String, {
1111
nullable: true,

src/@generated/article/article-list-relation-filter.input.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Field, InputType } from '@nestjs/graphql';
22

33
import { ArticleWhereInput } from './article-where.input';
44

5-
@InputType({})
5+
@InputType()
66
export class ArticleListRelationFilter {
77
@Field(() => ArticleWhereInput, {
88
nullable: true,

src/@generated/article/article-max-aggregate.input.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Field, InputType } from '@nestjs/graphql';
22

3-
@InputType({})
3+
@InputType()
44
export class ArticleMaxAggregateInput {
55
@Field(() => Boolean, {
66
nullable: true,

src/@generated/article/article-min-aggregate.input.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Field, InputType } from '@nestjs/graphql';
22

3-
@InputType({})
3+
@InputType()
44
export class ArticleMinAggregateInput {
55
@Field(() => Boolean, {
66
nullable: true,

src/@generated/article/article-order-by.input.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Field, InputType } from '@nestjs/graphql';
22

33
import { SortOrder } from '../prisma/sort-order.enum';
44

5-
@InputType({})
5+
@InputType()
66
export class ArticleOrderByInput {
77
@Field(() => SortOrder, {
88
nullable: true,

src/@generated/article/article-relation-filter.input.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Field, InputType } from '@nestjs/graphql';
22

33
import { ArticleWhereInput } from './article-where.input';
44

5-
@InputType({})
5+
@InputType()
66
export class ArticleRelationFilter {
77
@Field(() => ArticleWhereInput, {
88
nullable: true,

src/@generated/article/article-scalar-where.input.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { DateTimeFilter } from '../prisma/date-time-filter.input';
55
import { IntFilter } from '../prisma/int-filter.input';
66
import { StringFilter } from '../prisma/string-filter.input';
77

8-
@InputType({})
8+
@InputType()
99
export class ArticleScalarWhereInput {
1010
@Field(() => [ArticleScalarWhereInput], {
1111
nullable: true,

src/@generated/article/article-sum-aggregate.input.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Field, InputType } from '@nestjs/graphql';
22

3-
@InputType({})
3+
@InputType()
44
export class ArticleSumAggregateInput {
55
@Field(() => Boolean, {
66
nullable: true,

src/@generated/article/article-update-many-data.input.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Field, InputType, Int } from '@nestjs/graphql';
22

3-
@InputType({})
3+
@InputType()
44
export class ArticleUpdateManyDataInput {
55
@Field(() => String, {
66
nullable: true,

src/@generated/article/article-update-many-mutation.input.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Field, InputType, Int } from '@nestjs/graphql';
22

3-
@InputType({})
3+
@InputType()
44
export class ArticleUpdateManyMutationInput {
55
@Field(() => String, {
66
nullable: true,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Field, InputType } from '@nestjs/graphql';
33
import { ArticleScalarWhereInput } from './article-scalar-where.input';
44
import { ArticleUpdateManyDataInput } from './article-update-many-data.input';
55

6-
@InputType({})
6+
@InputType()
77
export class ArticleUpdateManyWithWhereNestedInput {
88
@Field(() => ArticleScalarWhereInput, {
99
nullable: true,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { ArticleUpdateWithWhereUniqueWithoutAuthorInput } from './article-update
77
import { ArticleUpsertWithWhereUniqueWithoutAuthorInput } from './article-upsert-with-where-unique-without-author.input';
88
import { ArticleWhereUniqueInput } from './article-where-unique.input';
99

10-
@InputType({})
10+
@InputType()
1111
export class ArticleUpdateManyWithoutAuthorInput {
1212
@Field(() => [ArticleCreateWithoutAuthorInput], {
1313
nullable: true,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { ArticleUpdateWithWhereUniqueWithoutFavoritedByInput } from './article-u
77
import { ArticleUpsertWithWhereUniqueWithoutFavoritedByInput } from './article-upsert-with-where-unique-without-favorited-by.input';
88
import { ArticleWhereUniqueInput } from './article-where-unique.input';
99

10-
@InputType({})
10+
@InputType()
1111
export class ArticleUpdateManyWithoutFavoritedByInput {
1212
@Field(() => [ArticleCreateWithoutFavoritedByInput], {
1313
nullable: true,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { ArticleUpdateWithWhereUniqueWithoutTagsInput } from './article-update-w
77
import { ArticleUpsertWithWhereUniqueWithoutTagsInput } from './article-upsert-with-where-unique-without-tags.input';
88
import { ArticleWhereUniqueInput } from './article-where-unique.input';
99

10-
@InputType({})
10+
@InputType()
1111
export class ArticleUpdateManyWithoutTagsInput {
1212
@Field(() => [ArticleCreateWithoutTagsInput], {
1313
nullable: true,

src/@generated/article/article-update-one-without-comments.input.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { ArticleUpdateWithoutCommentsDataInput } from './article-update-without-
55
import { ArticleUpsertWithoutCommentsInput } from './article-upsert-without-comments.input';
66
import { ArticleWhereUniqueInput } from './article-where-unique.input';
77

8-
@InputType({})
8+
@InputType()
99
export class ArticleUpdateOneWithoutCommentsInput {
1010
@Field(() => ArticleCreateWithoutCommentsInput, {
1111
nullable: true,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Field, InputType } from '@nestjs/graphql';
33
import { ArticleUpdateWithoutAuthorDataInput } from './article-update-without-author-data.input';
44
import { ArticleWhereUniqueInput } from './article-where-unique.input';
55

6-
@InputType({})
6+
@InputType()
77
export class ArticleUpdateWithWhereUniqueWithoutAuthorInput {
88
@Field(() => ArticleWhereUniqueInput, {
99
nullable: true,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Field, InputType } from '@nestjs/graphql';
33
import { ArticleUpdateWithoutFavoritedByDataInput } from './article-update-without-favorited-by-data.input';
44
import { ArticleWhereUniqueInput } from './article-where-unique.input';
55

6-
@InputType({})
6+
@InputType()
77
export class ArticleUpdateWithWhereUniqueWithoutFavoritedByInput {
88
@Field(() => ArticleWhereUniqueInput, {
99
nullable: true,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Field, InputType } from '@nestjs/graphql';
33
import { ArticleUpdateWithoutTagsDataInput } from './article-update-without-tags-data.input';
44
import { ArticleWhereUniqueInput } from './article-where-unique.input';
55

6-
@InputType({})
6+
@InputType()
77
export class ArticleUpdateWithWhereUniqueWithoutTagsInput {
88
@Field(() => ArticleWhereUniqueInput, {
99
nullable: true,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { CommentUpdateManyWithoutArticleInput } from '../comment/comment-update-
44
import { TagUpdateManyWithoutArticlesInput } from '../tag/tag-update-many-without-articles.input';
55
import { UserUpdateManyWithoutFavoriteArticlesInput } from '../user/user-update-many-without-favorite-articles.input';
66

7-
@InputType({})
7+
@InputType()
88
export class ArticleUpdateWithoutAuthorDataInput {
99
@Field(() => String, {
1010
nullable: true,

src/@generated/article/article-update-without-comments-data.input.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { TagUpdateManyWithoutArticlesInput } from '../tag/tag-update-many-withou
44
import { UserUpdateManyWithoutFavoriteArticlesInput } from '../user/user-update-many-without-favorite-articles.input';
55
import { UserUpdateOneRequiredWithoutArticlesInput } from '../user/user-update-one-required-without-articles.input';
66

7-
@InputType({})
7+
@InputType()
88
export class ArticleUpdateWithoutCommentsDataInput {
99
@Field(() => String, {
1010
nullable: true,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { CommentUpdateManyWithoutArticleInput } from '../comment/comment-update-
44
import { TagUpdateManyWithoutArticlesInput } from '../tag/tag-update-many-without-articles.input';
55
import { UserUpdateOneRequiredWithoutArticlesInput } from '../user/user-update-one-required-without-articles.input';
66

7-
@InputType({})
7+
@InputType()
88
export class ArticleUpdateWithoutFavoritedByDataInput {
99
@Field(() => String, {
1010
nullable: true,

0 commit comments

Comments
 (0)