Skip to content

Commit a5356c3

Browse files
committed
fix: Missing enum import type with enum filter object
closes: unlight#3
1 parent dcf495e commit a5356c3

File tree

118 files changed

+1191
-497
lines changed

Some content is hidden

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

118 files changed

+1191
-497
lines changed

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ module.exports = {
9696
},
9797
],
9898
// etc
99-
'etc/deprecation': 1,
99+
'etc/no-deprecated': 1,
100100
'etc/no-assign-mutated-array': 1,
101101
},
102102
overrides: [

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
"mocha": "node node_modules/mocha/bin/_mocha",
2626
"test:r": "mocha -r ts-node/register/transpile-only src/**/*.spec.ts",
2727
"test:cov": "c8 --reporter text --exclude \"**/*.spec.ts\" --exclude \"**/testing/**\" npm run test:r -- --no-timeouts",
28-
"test:w": "mocha -r ts-node/register/transpile-only --watch-files src/**/*.ts --watch src/**/*.spec.ts",
29-
"test:d": "node --inspect-brk -r ts-node/register/transpile-only node_modules/mocha/bin/_mocha --no-timeouts --watch-files src/**/*.ts --watch src/**/*.spec.ts",
28+
"test:w": "mocha -r ts-node/register/transpile-only --watch-files src/**/*.ts --timeout 5s --watch src/**/*.spec.ts",
29+
"test:d": "node --inspect -r ts-node/register/transpile-only node_modules/mocha/bin/_mocha --no-timeouts --watch-files src/**/*.ts --watch src/**/*.spec.ts",
3030
"test:brk": "node --inspect-brk -r ts-node/register/transpile-only node_modules/mocha/bin/_mocha --no-timeouts src/**/*.spec.ts",
3131
"tscheck": "echo tscheck... && tsc --noEmit",
3232
"tscheck:w": "npm run tscheck -- --watch",
@@ -77,12 +77,14 @@
7777
"@prisma/client": "^2.8.0",
7878
"@semantic-release/changelog": "^5.0.1",
7979
"@semantic-release/git": "^9.0.0",
80+
"@types/chai": "^4.2.14",
8081
"@types/mocha": "^8.0.3",
8182
"@types/node": "^14.14.7",
8283
"@typescript-eslint/eslint-plugin": "^4.7.0",
8384
"@typescript-eslint/parser": "^4.7.0",
8485
"apollo-server-express": "^2.19.0",
8586
"c8": "^7.3.5",
87+
"chai": "^4.2.0",
8688
"class-transformer": "^0.3.1",
8789
"class-validator": "^0.12.2",
8890
"commitizen": "^4.2.2",

prisma/schema.prisma

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
datasource database {
2-
provider = "sqlite"
2+
provider = "postgres"
33
url = env("DATABASE_URL")
44
}
55

@@ -27,6 +27,7 @@ model User {
2727
comments Comment[]
2828
countComments Int?
2929
rating Float?
30+
role Role?
3031
}
3132

3233
model Tag {
@@ -62,3 +63,7 @@ model Comment {
6263
article Article? @relation(fields: [articleId], references: [id])
6364
articleId String?
6465
}
66+
67+
enum Role {
68+
USER
69+
}

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

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

3+
import { ArticleCreateOrConnectWithoutauthorInput } from './article-create-or-connect-withoutauthor.input';
34
import { ArticleCreateWithoutAuthorInput } from './article-create-without-author.input';
45
import { ArticleWhereUniqueInput } from './article-where-unique.input';
56

@@ -16,4 +17,12 @@ export class ArticleCreateManyWithoutAuthorInput {
1617
description: undefined,
1718
})
1819
connect?: ArticleWhereUniqueInput | Array<ArticleWhereUniqueInput>;
20+
21+
@Field(() => [ArticleCreateOrConnectWithoutauthorInput], {
22+
nullable: true,
23+
description: undefined,
24+
})
25+
connectOrCreate?:
26+
| ArticleCreateOrConnectWithoutauthorInput
27+
| Array<ArticleCreateOrConnectWithoutauthorInput>;
1928
}

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

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

3+
import { ArticleCreateOrConnectWithoutfavoritedByInput } from './article-create-or-connect-withoutfavorited-by.input';
34
import { ArticleCreateWithoutFavoritedByInput } from './article-create-without-favorited-by.input';
45
import { ArticleWhereUniqueInput } from './article-where-unique.input';
56

@@ -16,4 +17,12 @@ export class ArticleCreateManyWithoutFavoritedByInput {
1617
description: undefined,
1718
})
1819
connect?: ArticleWhereUniqueInput | Array<ArticleWhereUniqueInput>;
20+
21+
@Field(() => [ArticleCreateOrConnectWithoutfavoritedByInput], {
22+
nullable: true,
23+
description: undefined,
24+
})
25+
connectOrCreate?:
26+
| ArticleCreateOrConnectWithoutfavoritedByInput
27+
| Array<ArticleCreateOrConnectWithoutfavoritedByInput>;
1928
}

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

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

3+
import { ArticleCreateOrConnectWithouttagsInput } from './article-create-or-connect-withouttags.input';
34
import { ArticleCreateWithoutTagsInput } from './article-create-without-tags.input';
45
import { ArticleWhereUniqueInput } from './article-where-unique.input';
56

@@ -16,4 +17,12 @@ export class ArticleCreateManyWithoutTagsInput {
1617
description: undefined,
1718
})
1819
connect?: ArticleWhereUniqueInput | Array<ArticleWhereUniqueInput>;
20+
21+
@Field(() => [ArticleCreateOrConnectWithouttagsInput], {
22+
nullable: true,
23+
description: undefined,
24+
})
25+
connectOrCreate?:
26+
| ArticleCreateOrConnectWithouttagsInput
27+
| Array<ArticleCreateOrConnectWithouttagsInput>;
1928
}

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

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

3+
import { ArticleCreateOrConnectWithoutcommentsInput } from './article-create-or-connect-withoutcomments.input';
34
import { ArticleCreateWithoutCommentsInput } from './article-create-without-comments.input';
45
import { ArticleWhereUniqueInput } from './article-where-unique.input';
56

@@ -16,4 +17,10 @@ export class ArticleCreateOneWithoutCommentsInput {
1617
description: undefined,
1718
})
1819
connect?: ArticleWhereUniqueInput;
20+
21+
@Field(() => ArticleCreateOrConnectWithoutcommentsInput, {
22+
nullable: true,
23+
description: undefined,
24+
})
25+
connectOrCreate?: ArticleCreateOrConnectWithoutcommentsInput;
1926
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { Field, InputType } from '@nestjs/graphql';
2+
3+
import { ArticleCreateWithoutAuthorInput } from './article-create-without-author.input';
4+
import { ArticleWhereUniqueInput } from './article-where-unique.input';
5+
6+
@InputType()
7+
export class ArticleCreateOrConnectWithoutauthorInput {
8+
@Field(() => ArticleWhereUniqueInput, {
9+
nullable: true,
10+
description: undefined,
11+
})
12+
where?: ArticleWhereUniqueInput;
13+
14+
@Field(() => ArticleCreateWithoutAuthorInput, {
15+
nullable: true,
16+
description: undefined,
17+
})
18+
create?: ArticleCreateWithoutAuthorInput;
19+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { Field, InputType } from '@nestjs/graphql';
2+
3+
import { ArticleCreateWithoutCommentsInput } from './article-create-without-comments.input';
4+
import { ArticleWhereUniqueInput } from './article-where-unique.input';
5+
6+
@InputType()
7+
export class ArticleCreateOrConnectWithoutcommentsInput {
8+
@Field(() => ArticleWhereUniqueInput, {
9+
nullable: true,
10+
description: undefined,
11+
})
12+
where?: ArticleWhereUniqueInput;
13+
14+
@Field(() => ArticleCreateWithoutCommentsInput, {
15+
nullable: true,
16+
description: undefined,
17+
})
18+
create?: ArticleCreateWithoutCommentsInput;
19+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { Field, InputType } from '@nestjs/graphql';
2+
3+
import { ArticleCreateWithoutFavoritedByInput } from './article-create-without-favorited-by.input';
4+
import { ArticleWhereUniqueInput } from './article-where-unique.input';
5+
6+
@InputType()
7+
export class ArticleCreateOrConnectWithoutfavoritedByInput {
8+
@Field(() => ArticleWhereUniqueInput, {
9+
nullable: true,
10+
description: undefined,
11+
})
12+
where?: ArticleWhereUniqueInput;
13+
14+
@Field(() => ArticleCreateWithoutFavoritedByInput, {
15+
nullable: true,
16+
description: undefined,
17+
})
18+
create?: ArticleCreateWithoutFavoritedByInput;
19+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { Field, InputType } from '@nestjs/graphql';
2+
3+
import { ArticleCreateWithoutTagsInput } from './article-create-without-tags.input';
4+
import { ArticleWhereUniqueInput } from './article-where-unique.input';
5+
6+
@InputType()
7+
export class ArticleCreateOrConnectWithouttagsInput {
8+
@Field(() => ArticleWhereUniqueInput, {
9+
nullable: true,
10+
description: undefined,
11+
})
12+
where?: ArticleWhereUniqueInput;
13+
14+
@Field(() => ArticleCreateWithoutTagsInput, {
15+
nullable: true,
16+
description: undefined,
17+
})
18+
create?: ArticleCreateWithoutTagsInput;
19+
}

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

Lines changed: 0 additions & 58 deletions
This file was deleted.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { Field, InputType } from '@nestjs/graphql';
2+
3+
import { ArticleScalarWhereInput } from './article-scalar-where.input';
4+
import { ArticleUpdateManyMutationInput } from './article-update-many-mutation.input';
5+
6+
@InputType()
7+
export class ArticleUpdateManyWithWhereWithoutAuthorInput {
8+
@Field(() => ArticleScalarWhereInput, {
9+
nullable: true,
10+
description: undefined,
11+
})
12+
where?: ArticleScalarWhereInput;
13+
14+
@Field(() => ArticleUpdateManyMutationInput, {
15+
nullable: true,
16+
description: undefined,
17+
})
18+
data?: ArticleUpdateManyMutationInput;
19+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { Field, InputType } from '@nestjs/graphql';
2+
3+
import { ArticleScalarWhereInput } from './article-scalar-where.input';
4+
import { ArticleUpdateManyMutationInput } from './article-update-many-mutation.input';
5+
6+
@InputType()
7+
export class ArticleUpdateManyWithWhereWithoutFavoritedByInput {
8+
@Field(() => ArticleScalarWhereInput, {
9+
nullable: true,
10+
description: undefined,
11+
})
12+
where?: ArticleScalarWhereInput;
13+
14+
@Field(() => ArticleUpdateManyMutationInput, {
15+
nullable: true,
16+
description: undefined,
17+
})
18+
data?: ArticleUpdateManyMutationInput;
19+
}
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
import { Field, InputType } from '@nestjs/graphql';
22

33
import { ArticleScalarWhereInput } from './article-scalar-where.input';
4-
import { ArticleUpdateManyDataInput } from './article-update-many-data.input';
4+
import { ArticleUpdateManyMutationInput } from './article-update-many-mutation.input';
55

66
@InputType()
7-
export class ArticleUpdateManyWithWhereNestedInput {
7+
export class ArticleUpdateManyWithWhereWithoutTagsInput {
88
@Field(() => ArticleScalarWhereInput, {
99
nullable: true,
1010
description: undefined,
1111
})
1212
where?: ArticleScalarWhereInput;
1313

14-
@Field(() => ArticleUpdateManyDataInput, {
14+
@Field(() => ArticleUpdateManyMutationInput, {
1515
nullable: true,
1616
description: undefined,
1717
})
18-
data?: ArticleUpdateManyDataInput;
18+
data?: ArticleUpdateManyMutationInput;
1919
}

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

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { Field, InputType } from '@nestjs/graphql';
22

3+
import { ArticleCreateOrConnectWithoutauthorInput } from './article-create-or-connect-withoutauthor.input';
34
import { ArticleCreateWithoutAuthorInput } from './article-create-without-author.input';
45
import { ArticleScalarWhereInput } from './article-scalar-where.input';
5-
import { ArticleUpdateManyWithWhereNestedInput } from './article-update-many-with-where-nested.input';
6+
import { ArticleUpdateManyWithWhereWithoutAuthorInput } from './article-update-many-with-where-without-author.input';
67
import { ArticleUpdateWithWhereUniqueWithoutAuthorInput } from './article-update-with-where-unique-without-author.input';
78
import { ArticleUpsertWithWhereUniqueWithoutAuthorInput } from './article-upsert-with-where-unique-without-author.input';
89
import { ArticleWhereUniqueInput } from './article-where-unique.input';
@@ -47,13 +48,13 @@ export class ArticleUpdateManyWithoutAuthorInput {
4748
| ArticleUpdateWithWhereUniqueWithoutAuthorInput
4849
| Array<ArticleUpdateWithWhereUniqueWithoutAuthorInput>;
4950

50-
@Field(() => [ArticleUpdateManyWithWhereNestedInput], {
51+
@Field(() => [ArticleUpdateManyWithWhereWithoutAuthorInput], {
5152
nullable: true,
5253
description: undefined,
5354
})
5455
updateMany?:
55-
| ArticleUpdateManyWithWhereNestedInput
56-
| Array<ArticleUpdateManyWithWhereNestedInput>;
56+
| ArticleUpdateManyWithWhereWithoutAuthorInput
57+
| Array<ArticleUpdateManyWithWhereWithoutAuthorInput>;
5758

5859
@Field(() => [ArticleScalarWhereInput], {
5960
nullable: true,
@@ -68,4 +69,12 @@ export class ArticleUpdateManyWithoutAuthorInput {
6869
upsert?:
6970
| ArticleUpsertWithWhereUniqueWithoutAuthorInput
7071
| Array<ArticleUpsertWithWhereUniqueWithoutAuthorInput>;
72+
73+
@Field(() => [ArticleCreateOrConnectWithoutauthorInput], {
74+
nullable: true,
75+
description: undefined,
76+
})
77+
connectOrCreate?:
78+
| ArticleCreateOrConnectWithoutauthorInput
79+
| Array<ArticleCreateOrConnectWithoutauthorInput>;
7180
}

0 commit comments

Comments
 (0)