Skip to content

Commit

Permalink
perf: Slightly improved
Browse files Browse the repository at this point in the history
  • Loading branch information
unlight committed Feb 28, 2021
1 parent 7707b19 commit fd88dc9
Show file tree
Hide file tree
Showing 307 changed files with 6,214 additions and 4,336 deletions.
7 changes: 2 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,7 @@ module.exports = {
rules: {
// core
'consistent-return': [1, { treatUndefinedAsUnspecified: true }],
quotes: [
1,
'single',
{ allowTemplateLiterals: true, avoidEscape: true },
],
quotes: [1, 'single', { allowTemplateLiterals: true, avoidEscape: true }],
semi: [1, 'always'],
'max-lines': [1, { max: 300 }],
'max-params': [1, { max: 5 }],
Expand Down Expand Up @@ -115,6 +111,7 @@ module.exports = {
'@typescript-eslint/camelcase': 0,
'@typescript-eslint/no-unsafe-assignment': 0,
'@typescript-eslint/no-unused-vars': 0,
'@typescript-eslint/no-non-null-asserted-optional-chain': 0,
'import/max-dependencies': 0,
'sonarjs/no-duplicate-string': 0,
},
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
},
"dependencies": {
"@prisma/generator-helper": "^2.17.0",
"await-event-emitter": "^2.0.2",
"flat": "^5.0.2",
"get-relative-path": "^1.0.2",
"lodash": "^4.17.21",
Expand Down
5 changes: 3 additions & 2 deletions src/@generated/article/aggregate-article.args.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { ArgsType, Field, Int } from '@nestjs/graphql';

import { ArticleAvgAggregateInput } from './article-avg-aggregate.input';
import { ArticleCountAggregateInput } from './article-count-aggregate.input';
import { ArticleMaxAggregateInput } from './article-max-aggregate.input';
import { ArticleMinAggregateInput } from './article-min-aggregate.input';
import { ArticleOrderByInput } from './article-order-by.input';
Expand Down Expand Up @@ -35,10 +36,10 @@ export class AggregateArticleArgs {
})
skip?: number;

@Field(() => Boolean, {
@Field(() => ArticleCountAggregateInput, {
nullable: true,
})
count?: true;
count?: ArticleCountAggregateInput;

@Field(() => ArticleAvgAggregateInput, {
nullable: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Field, InputType } from '@nestjs/graphql';
import { ArticleCreateManyAuthorInput } from './article-create-many-author.input';

@InputType()
export class ArticleCreateManyAuthorEnvelopeInput {
export class ArticleCreateManyAuthorInputEnvelope {
@Field(() => [ArticleCreateManyAuthorInput], {
nullable: false,
})
Expand Down
4 changes: 2 additions & 2 deletions src/@generated/article/article-create-many-author.input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ export class ArticleCreateManyAuthorInput {
})
body!: string;

@Field(() => String, {
@Field(() => Date, {
nullable: true,
})
createdAt?: Date | string;

@Field(() => String, {
@Field(() => Date, {
nullable: true,
})
updatedAt?: Date | string;
Expand Down
4 changes: 2 additions & 2 deletions src/@generated/article/article-create-many.input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ export class ArticleCreateManyInput {
})
body!: string;

@Field(() => String, {
@Field(() => Date, {
nullable: true,
})
createdAt?: Date | string;

@Field(() => String, {
@Field(() => Date, {
nullable: true,
})
updatedAt?: Date | string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Field, InputType } from '@nestjs/graphql';

import { ArticleCreateManyAuthorEnvelopeInput } from './article-create-many-author-envelope.input';
import { ArticleCreateManyAuthorInputEnvelope } from './article-create-many-author-input-envelope.input';
import { ArticleCreateOrConnectWithoutAuthorInput } from './article-create-or-connect-without-author.input';
import { ArticleCreateWithoutAuthorInput } from './article-create-without-author.input';
import { ArticleWhereUniqueInput } from './article-where-unique.input';

@InputType()
export class ArticleCreateManyWithoutAuthorInput {
export class ArticleCreateNestedManyWithoutAuthorInput {
@Field(() => [ArticleCreateWithoutAuthorInput], {
nullable: true,
})
Expand All @@ -17,10 +17,10 @@ export class ArticleCreateManyWithoutAuthorInput {
})
connectOrCreate?: Array<ArticleCreateOrConnectWithoutAuthorInput>;

@Field(() => ArticleCreateManyAuthorEnvelopeInput, {
@Field(() => ArticleCreateManyAuthorInputEnvelope, {
nullable: true,
})
createMany?: ArticleCreateManyAuthorEnvelopeInput;
createMany?: ArticleCreateManyAuthorInputEnvelope;

@Field(() => [ArticleWhereUniqueInput], {
nullable: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ArticleCreateWithoutFavoritedByInput } from './article-create-without-f
import { ArticleWhereUniqueInput } from './article-where-unique.input';

@InputType()
export class ArticleCreateManyWithoutFavoritedByInput {
export class ArticleCreateNestedManyWithoutFavoritedByInput {
@Field(() => [ArticleCreateWithoutFavoritedByInput], {
nullable: true,
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ArticleCreateWithoutTagsInput } from './article-create-without-tags.inp
import { ArticleWhereUniqueInput } from './article-where-unique.input';

@InputType()
export class ArticleCreateManyWithoutTagsInput {
export class ArticleCreateNestedManyWithoutTagsInput {
@Field(() => [ArticleCreateWithoutTagsInput], {
nullable: true,
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ArticleCreateWithoutCommentsInput } from './article-create-without-comm
import { ArticleWhereUniqueInput } from './article-where-unique.input';

@InputType()
export class ArticleCreateOneWithoutCommentsInput {
export class ArticleCreateNestedOneWithoutCommentsInput {
@Field(() => ArticleCreateWithoutCommentsInput, {
nullable: true,
})
Expand Down
22 changes: 11 additions & 11 deletions src/@generated/article/article-create-without-author.input.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Field, InputType, Int } from '@nestjs/graphql';

import { CommentCreateManyWithoutArticleInput } from '../comment/comment-create-many-without-article.input';
import { TagCreateManyWithoutArticlesInput } from '../tag/tag-create-many-without-articles.input';
import { UserCreateManyWithoutFavoriteArticlesInput } from '../user/user-create-many-without-favorite-articles.input';
import { CommentCreateNestedManyWithoutArticleInput } from '../comment/comment-create-nested-many-without-article.input';
import { TagCreateNestedManyWithoutArticlesInput } from '../tag/tag-create-nested-many-without-articles.input';
import { UserCreateNestedManyWithoutFavoriteArticlesInput } from '../user/user-create-nested-many-without-favorite-articles.input';

@InputType()
export class ArticleCreateWithoutAuthorInput {
Expand Down Expand Up @@ -31,12 +31,12 @@ export class ArticleCreateWithoutAuthorInput {
})
body!: string;

@Field(() => String, {
@Field(() => Date, {
nullable: true,
})
createdAt?: Date | string;

@Field(() => String, {
@Field(() => Date, {
nullable: true,
})
updatedAt?: Date | string;
Expand All @@ -51,18 +51,18 @@ export class ArticleCreateWithoutAuthorInput {
})
active?: boolean;

@Field(() => TagCreateManyWithoutArticlesInput, {
@Field(() => TagCreateNestedManyWithoutArticlesInput, {
nullable: true,
})
tags?: TagCreateManyWithoutArticlesInput;
tags?: TagCreateNestedManyWithoutArticlesInput;

@Field(() => UserCreateManyWithoutFavoriteArticlesInput, {
@Field(() => UserCreateNestedManyWithoutFavoriteArticlesInput, {
nullable: true,
})
favoritedBy?: UserCreateManyWithoutFavoriteArticlesInput;
favoritedBy?: UserCreateNestedManyWithoutFavoriteArticlesInput;

@Field(() => CommentCreateManyWithoutArticleInput, {
@Field(() => CommentCreateNestedManyWithoutArticleInput, {
nullable: true,
})
comments?: CommentCreateManyWithoutArticleInput;
comments?: CommentCreateNestedManyWithoutArticleInput;
}
22 changes: 11 additions & 11 deletions src/@generated/article/article-create-without-comments.input.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Field, InputType, Int } from '@nestjs/graphql';

import { TagCreateManyWithoutArticlesInput } from '../tag/tag-create-many-without-articles.input';
import { UserCreateManyWithoutFavoriteArticlesInput } from '../user/user-create-many-without-favorite-articles.input';
import { UserCreateOneWithoutArticlesInput } from '../user/user-create-one-without-articles.input';
import { TagCreateNestedManyWithoutArticlesInput } from '../tag/tag-create-nested-many-without-articles.input';
import { UserCreateNestedManyWithoutFavoriteArticlesInput } from '../user/user-create-nested-many-without-favorite-articles.input';
import { UserCreateNestedOneWithoutArticlesInput } from '../user/user-create-nested-one-without-articles.input';

@InputType()
export class ArticleCreateWithoutCommentsInput {
Expand Down Expand Up @@ -31,12 +31,12 @@ export class ArticleCreateWithoutCommentsInput {
})
body!: string;

@Field(() => String, {
@Field(() => Date, {
nullable: true,
})
createdAt?: Date | string;

@Field(() => String, {
@Field(() => Date, {
nullable: true,
})
updatedAt?: Date | string;
Expand All @@ -51,18 +51,18 @@ export class ArticleCreateWithoutCommentsInput {
})
active?: boolean;

@Field(() => TagCreateManyWithoutArticlesInput, {
@Field(() => TagCreateNestedManyWithoutArticlesInput, {
nullable: true,
})
tags?: TagCreateManyWithoutArticlesInput;
tags?: TagCreateNestedManyWithoutArticlesInput;

@Field(() => UserCreateOneWithoutArticlesInput, {
@Field(() => UserCreateNestedOneWithoutArticlesInput, {
nullable: false,
})
author!: UserCreateOneWithoutArticlesInput;
author!: UserCreateNestedOneWithoutArticlesInput;

@Field(() => UserCreateManyWithoutFavoriteArticlesInput, {
@Field(() => UserCreateNestedManyWithoutFavoriteArticlesInput, {
nullable: true,
})
favoritedBy?: UserCreateManyWithoutFavoriteArticlesInput;
favoritedBy?: UserCreateNestedManyWithoutFavoriteArticlesInput;
}
22 changes: 11 additions & 11 deletions src/@generated/article/article-create-without-favorited-by.input.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Field, InputType, Int } from '@nestjs/graphql';

import { CommentCreateManyWithoutArticleInput } from '../comment/comment-create-many-without-article.input';
import { TagCreateManyWithoutArticlesInput } from '../tag/tag-create-many-without-articles.input';
import { UserCreateOneWithoutArticlesInput } from '../user/user-create-one-without-articles.input';
import { CommentCreateNestedManyWithoutArticleInput } from '../comment/comment-create-nested-many-without-article.input';
import { TagCreateNestedManyWithoutArticlesInput } from '../tag/tag-create-nested-many-without-articles.input';
import { UserCreateNestedOneWithoutArticlesInput } from '../user/user-create-nested-one-without-articles.input';

@InputType()
export class ArticleCreateWithoutFavoritedByInput {
Expand Down Expand Up @@ -31,12 +31,12 @@ export class ArticleCreateWithoutFavoritedByInput {
})
body!: string;

@Field(() => String, {
@Field(() => Date, {
nullable: true,
})
createdAt?: Date | string;

@Field(() => String, {
@Field(() => Date, {
nullable: true,
})
updatedAt?: Date | string;
Expand All @@ -51,18 +51,18 @@ export class ArticleCreateWithoutFavoritedByInput {
})
active?: boolean;

@Field(() => TagCreateManyWithoutArticlesInput, {
@Field(() => TagCreateNestedManyWithoutArticlesInput, {
nullable: true,
})
tags?: TagCreateManyWithoutArticlesInput;
tags?: TagCreateNestedManyWithoutArticlesInput;

@Field(() => UserCreateOneWithoutArticlesInput, {
@Field(() => UserCreateNestedOneWithoutArticlesInput, {
nullable: false,
})
author!: UserCreateOneWithoutArticlesInput;
author!: UserCreateNestedOneWithoutArticlesInput;

@Field(() => CommentCreateManyWithoutArticleInput, {
@Field(() => CommentCreateNestedManyWithoutArticleInput, {
nullable: true,
})
comments?: CommentCreateManyWithoutArticleInput;
comments?: CommentCreateNestedManyWithoutArticleInput;
}
22 changes: 11 additions & 11 deletions src/@generated/article/article-create-without-tags.input.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Field, InputType, Int } from '@nestjs/graphql';

import { CommentCreateManyWithoutArticleInput } from '../comment/comment-create-many-without-article.input';
import { UserCreateManyWithoutFavoriteArticlesInput } from '../user/user-create-many-without-favorite-articles.input';
import { UserCreateOneWithoutArticlesInput } from '../user/user-create-one-without-articles.input';
import { CommentCreateNestedManyWithoutArticleInput } from '../comment/comment-create-nested-many-without-article.input';
import { UserCreateNestedManyWithoutFavoriteArticlesInput } from '../user/user-create-nested-many-without-favorite-articles.input';
import { UserCreateNestedOneWithoutArticlesInput } from '../user/user-create-nested-one-without-articles.input';

@InputType()
export class ArticleCreateWithoutTagsInput {
Expand Down Expand Up @@ -31,12 +31,12 @@ export class ArticleCreateWithoutTagsInput {
})
body!: string;

@Field(() => String, {
@Field(() => Date, {
nullable: true,
})
createdAt?: Date | string;

@Field(() => String, {
@Field(() => Date, {
nullable: true,
})
updatedAt?: Date | string;
Expand All @@ -51,18 +51,18 @@ export class ArticleCreateWithoutTagsInput {
})
active?: boolean;

@Field(() => UserCreateOneWithoutArticlesInput, {
@Field(() => UserCreateNestedOneWithoutArticlesInput, {
nullable: false,
})
author!: UserCreateOneWithoutArticlesInput;
author!: UserCreateNestedOneWithoutArticlesInput;

@Field(() => UserCreateManyWithoutFavoriteArticlesInput, {
@Field(() => UserCreateNestedManyWithoutFavoriteArticlesInput, {
nullable: true,
})
favoritedBy?: UserCreateManyWithoutFavoriteArticlesInput;
favoritedBy?: UserCreateNestedManyWithoutFavoriteArticlesInput;

@Field(() => CommentCreateManyWithoutArticleInput, {
@Field(() => CommentCreateNestedManyWithoutArticleInput, {
nullable: true,
})
comments?: CommentCreateManyWithoutArticleInput;
comments?: CommentCreateNestedManyWithoutArticleInput;
}
Loading

0 comments on commit fd88dc9

Please sign in to comment.