diff --git a/.commitlintrc.js b/.commitlintrc.js index f792f1ed..e2da7dc9 100644 --- a/.commitlintrc.js +++ b/.commitlintrc.js @@ -1,9 +1,9 @@ module.exports = { - extends: ['@commitlint/config-conventional'], - rules: { - 'subject-case': [2, 'always', ['sentence-case']], - 'scope-case': [2, 'always', ['lower-case', 'upper-case']], - 'body-max-line-length': [1, 'never'], - 'footer-max-line-length': [1, 'never'], - }, + extends: ['@commitlint/config-conventional'], + rules: { + 'subject-case': [2, 'always', ['sentence-case']], + 'scope-case': [2, 'always', ['lower-case', 'upper-case']], + 'body-max-line-length': [1, 'never'], + 'footer-max-line-length': [1, 'never'], + }, }; diff --git a/.cz-config.js b/.cz-config.js index 4af03e6c..05533898 100644 --- a/.cz-config.js +++ b/.cz-config.js @@ -1,50 +1,50 @@ module.exports = { - types: [ - { value: 'feat', name: 'feat: A new feature' }, - { value: 'fix', name: 'fix: A bug fix' }, - { value: 'docs', name: 'docs: Documentation only changes' }, - { - value: 'style', - name: 'style: Changes that do not affect the meaning of the code\n (white-space, formatting, missing semi-colons, etc)', - }, - { - value: 'refactor', - name: 'refactor: A code change that neither fixes a bug nor adds a feature', - }, - { - value: 'perf', - name: 'perf: A code change that improves performance', - }, - { value: 'test', name: 'test: Adding missing tests' }, - { - value: 'ci', - name: 'ci: Changes related to continious integration', - }, - { value: 'build', name: 'build: Changes related to build process' }, - { - value: 'chore', - name: 'chore: Changes to the build process or auxiliary tools\n and libraries such as documentation generation', - }, - { value: 'revert', name: 'revert: Revert to a commit' }, - { value: 'WIP', name: 'WIP: Work in progress' }, - ], + types: [ + { value: 'feat', name: 'feat: A new feature' }, + { value: 'fix', name: 'fix: A bug fix' }, + { value: 'docs', name: 'docs: Documentation only changes' }, + { + value: 'style', + name: 'style: Changes that do not affect the meaning of the code\n (white-space, formatting, missing semi-colons, etc)', + }, + { + value: 'refactor', + name: 'refactor: A code change that neither fixes a bug nor adds a feature', + }, + { + value: 'perf', + name: 'perf: A code change that improves performance', + }, + { value: 'test', name: 'test: Adding missing tests' }, + { + value: 'ci', + name: 'ci: Changes related to continious integration', + }, + { value: 'build', name: 'build: Changes related to build process' }, + { + value: 'chore', + name: 'chore: Changes to the build process or auxiliary tools\n and libraries such as documentation generation', + }, + { value: 'revert', name: 'revert: Revert to a commit' }, + { value: 'WIP', name: 'WIP: Work in progress' }, + ], - scopes: [ - { name: 'hide field' }, - { name: 'configuration' }, - { name: 'custom decorators' }, - { name: 'compatibility' }, - { name: 'mongodb' }, - { name: 'other' }, - ], + scopes: [ + { name: 'hide field' }, + { name: 'configuration' }, + { name: 'custom decorators' }, + { name: 'compatibility' }, + { name: 'mongodb' }, + { name: 'other' }, + ], - allowTicketNumber: false, - isTicketNumberRequired: false, - ticketNumberPrefix: '#', - ticketNumberRegExp: '\\d{1,5}', + allowTicketNumber: false, + isTicketNumberRequired: false, + ticketNumberPrefix: '#', + ticketNumberRegExp: '\\d{1,5}', - // it needs to match the value for field type. Eg.: 'fix' - /* + // it needs to match the value for field type. Eg.: 'fix' + /* scopeOverrides: { fix: [ @@ -55,28 +55,28 @@ module.exports = { ] }, */ - // override the messages, defaults are as follows - messages: { - type: "Select the type of change that you're committing:", - scope: '\nDenote the SCOPE of this change (optional):', - // used if allowCustomScopes is true - customScope: 'Denote the SCOPE of this change:', - subject: 'Write a SHORT, IMPERATIVE tense description of the change:\n', - body: 'Provide a LONGER description of the change (optional). Use "|" to break new line:\n', - breaking: 'List any BREAKING CHANGES (optional):\n', - footer: 'List any ISSUES CLOSED by this change (optional). E.g.: #31, #34:\n', - confirmCommit: 'Are you sure you want to proceed with the commit above?', - }, + // override the messages, defaults are as follows + messages: { + type: "Select the type of change that you're committing:", + scope: '\nDenote the SCOPE of this change (optional):', + // used if allowCustomScopes is true + customScope: 'Denote the SCOPE of this change:', + subject: 'Write a SHORT, IMPERATIVE tense description of the change:\n', + body: 'Provide a LONGER description of the change (optional). Use "|" to break new line:\n', + breaking: 'List any BREAKING CHANGES (optional):\n', + footer: 'List any ISSUES CLOSED by this change (optional). E.g.: #31, #34:\n', + confirmCommit: 'Are you sure you want to proceed with the commit above?', + }, - allowCustomScopes: true, - allowBreakingChanges: ['feat', 'fix', 'refactor', 'chore'], - // skip any questions you want - skipQuestions: ['body'], + allowCustomScopes: true, + allowBreakingChanges: ['feat', 'fix', 'refactor', 'chore'], + // skip any questions you want + skipQuestions: ['body'], - // limit subject length - subjectLimit: 100, - // breaklineChar: '|', // It is supported for fields body and footer. - footerPrefix: 'close:', - // askForBreakingChangeFirst : true, // default is false - upperCaseSubject: true, + // limit subject length + subjectLimit: 100, + // breaklineChar: '|', // It is supported for fields body and footer. + footerPrefix: 'close:', + // askForBreakingChangeFirst : true, // default is false + upperCaseSubject: true, }; diff --git a/.eslintrc.js b/.eslintrc.js index 4b10eae2..4fe21ac6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,120 +1,120 @@ module.exports = { - root: true, - env: { - es6: true, - node: true, - browser: true, + root: true, + env: { + es6: true, + node: true, + browser: true, + }, + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + 'plugin:@typescript-eslint/recommended-requiring-type-checking', + 'plugin:unicorn/recommended', + 'plugin:import/warnings', + 'plugin:regexp/recommended', + ], + parser: '@typescript-eslint/parser', + parserOptions: { + project: 'tsconfig.json', + sourceType: 'module', + ecmaFeatures: { + jsx: false, }, - extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended', - 'plugin:@typescript-eslint/recommended-requiring-type-checking', - 'plugin:unicorn/recommended', - 'plugin:import/warnings', - 'plugin:regexp/recommended', - ], - parser: '@typescript-eslint/parser', - parserOptions: { - project: 'tsconfig.json', - sourceType: 'module', - ecmaFeatures: { - jsx: false, + warnOnUnsupportedTypeScriptVersion: false, + }, + plugins: [ + 'unicorn', + 'import', + 'wix-editor', + '@typescript-eslint', + 'prettier', + 'simple-import-sort', + 'sort-class-members', + 'etc', + 'only-warn', + ], + rules: { + // core + 'consistent-return': [0, { treatUndefinedAsUnspecified: false }], + quotes: [1, 'single', { allowTemplateLiterals: true, avoidEscape: true }], + semi: [1, 'always'], + 'max-lines': [1, { max: 300 }], + 'max-params': [1, { max: 5 }], + 'no-unneeded-ternary': [1], + // wix-editor + 'wix-editor/no-instanceof-array': 1, + 'wix-editor/no-not-not': 1, + 'wix-editor/no-unneeded-match': 1, + 'wix-editor/prefer-filter': 1, + 'wix-editor/prefer-ternary': 1, + 'wix-editor/return-boolean': 1, + 'wix-editor/simplify-boolean-expression': 1, + // unicorn + 'unicorn/prefer-spread': 0, + 'unicorn/catch-error-name': 0, + 'unicorn/prefer-node-protocol': 0, + 'unicorn/prevent-abbreviations': [ + 1, + { + replacements: { + args: false, + err: false, + prod: false, + ref: false, + params: false, }, - warnOnUnsupportedTypeScriptVersion: false, - }, - plugins: [ - 'unicorn', - 'import', - 'wix-editor', - '@typescript-eslint', - 'prettier', - 'simple-import-sort', - 'sort-class-members', - 'etc', - 'only-warn', + }, ], - rules: { - // core - 'consistent-return': [0, { treatUndefinedAsUnspecified: false }], - quotes: [1, 'single', { allowTemplateLiterals: true, avoidEscape: true }], - semi: [1, 'always'], - 'max-lines': [1, { max: 300 }], - 'max-params': [1, { max: 5 }], - 'no-unneeded-ternary': [1], - // wix-editor - 'wix-editor/no-instanceof-array': 1, - 'wix-editor/no-not-not': 1, - 'wix-editor/no-unneeded-match': 1, - 'wix-editor/prefer-filter': 1, - 'wix-editor/prefer-ternary': 1, - 'wix-editor/return-boolean': 1, - 'wix-editor/simplify-boolean-expression': 1, - // unicorn - 'unicorn/prefer-spread': 0, - 'unicorn/catch-error-name': 0, - 'unicorn/prefer-node-protocol': 0, - 'unicorn/prevent-abbreviations': [ - 1, - { - replacements: { - args: false, - err: false, - prod: false, - ref: false, - params: false, - }, - }, - ], - // import - 'import/max-dependencies': [1, { max: 15 }], - // simple-import-sort with recomended settings - 'simple-import-sort/imports': 1, - 'sort-imports': 'off', - 'import/order': 'off', - // typescript-eslint - '@typescript-eslint/no-floating-promises': 1, - '@typescript-eslint/no-unnecessary-condition': 1, - '@typescript-eslint/explicit-module-boundary-types': 0, - '@typescript-eslint/unbound-method': 0, - // sort-class-members - 'sort-class-members/sort-class-members': [ - 1, - { - order: [ - '[static-properties]', - '[static-methods]', - '[properties]', - '[conventional-private-properties]', - 'constructor', - '[methods]', - '[conventional-private-methods]', - ], - accessorPairPositioning: 'getThenSet', - }, + // import + 'import/max-dependencies': [1, { max: 15 }], + // simple-import-sort with recomended settings + 'simple-import-sort/imports': 1, + 'sort-imports': 'off', + 'import/order': 'off', + // typescript-eslint + '@typescript-eslint/no-floating-promises': 1, + '@typescript-eslint/no-unnecessary-condition': 1, + '@typescript-eslint/explicit-module-boundary-types': 0, + '@typescript-eslint/unbound-method': 0, + // sort-class-members + 'sort-class-members/sort-class-members': [ + 1, + { + order: [ + '[static-properties]', + '[static-methods]', + '[properties]', + '[conventional-private-properties]', + 'constructor', + '[methods]', + '[conventional-private-methods]', ], - // etc - 'etc/no-deprecated': 1, - 'etc/no-assign-mutated-array': 1, - }, - overrides: [ - { - files: ['*.spec.ts', '**/{test,@generated}/**/*.ts'], - rules: { - 'consistent-return': 0, - 'max-lines': 0, - 'regexp/strict': 0, - '@typescript-eslint/no-misused-promises': 0, - '@typescript-eslint/no-explicit-any': 0, - '@typescript-eslint/no-unsafe-member-access': 0, - '@typescript-eslint/no-floating-promises': 0, - '@typescript-eslint/no-non-null-assertion': 0, - '@typescript-eslint/camelcase': 0, - '@typescript-eslint/no-unsafe-assignment': 0, - '@typescript-eslint/no-unused-vars': 0, - '@typescript-eslint/no-unsafe-return': 0, - '@typescript-eslint/no-non-null-asserted-optional-chain': 0, - 'import/max-dependencies': 0, - }, - }, + accessorPairPositioning: 'getThenSet', + }, ], + // etc + 'etc/no-deprecated': 1, + 'etc/no-assign-mutated-array': 1, + }, + overrides: [ + { + files: ['*.spec.ts', '**/{test,@generated}/**/*.ts'], + rules: { + 'consistent-return': 0, + 'max-lines': 0, + 'regexp/strict': 0, + '@typescript-eslint/no-misused-promises': 0, + '@typescript-eslint/no-explicit-any': 0, + '@typescript-eslint/no-unsafe-member-access': 0, + '@typescript-eslint/no-floating-promises': 0, + '@typescript-eslint/no-non-null-assertion': 0, + '@typescript-eslint/camelcase': 0, + '@typescript-eslint/no-unsafe-assignment': 0, + '@typescript-eslint/no-unused-vars': 0, + '@typescript-eslint/no-unsafe-return': 0, + '@typescript-eslint/no-non-null-asserted-optional-chain': 0, + 'import/max-dependencies': 0, + }, + }, + ], }; diff --git a/.releaserc.js b/.releaserc.js index 14c6f27d..ef9666f4 100644 --- a/.releaserc.js +++ b/.releaserc.js @@ -1,25 +1,25 @@ module.exports = { - plugins: [ - [ - '@semantic-release/commit-analyzer', - { - preset: 'conventionalcommits', - }, - ], - [ - '@semantic-release/release-notes-generator', - { - preset: 'conventionalcommits', - }, - ], - '@semantic-release/changelog', - [ - '@semantic-release/npm', - { - pkgRoot: 'dist', - }, - ], - '@semantic-release/github', - '@semantic-release/git', + plugins: [ + [ + '@semantic-release/commit-analyzer', + { + preset: 'conventionalcommits', + }, ], + [ + '@semantic-release/release-notes-generator', + { + preset: 'conventionalcommits', + }, + ], + '@semantic-release/changelog', + [ + '@semantic-release/npm', + { + pkgRoot: 'dist', + }, + ], + '@semantic-release/github', + '@semantic-release/git', + ], }; diff --git a/.swcrc b/.swcrc index 9d491284..3c69b0e4 100644 --- a/.swcrc +++ b/.swcrc @@ -1,20 +1,20 @@ { - "sourceMaps": false, - "module": { - "type": "commonjs" + "sourceMaps": false, + "module": { + "type": "commonjs" + }, + "jsc": { + "externalHelpers": true, + "keepClassNames": true, + "target": "es2020", + "parser": { + "syntax": "typescript", + "tsx": false, + "decorators": false }, - "jsc": { - "externalHelpers": true, - "keepClassNames": true, - "target": "es2020", - "parser": { - "syntax": "typescript", - "tsx": false, - "decorators": false - }, - "transform": { - "legacyDecorator": true, - "decoratorMetadata": false - } + "transform": { + "legacyDecorator": true, + "decoratorMetadata": false } + } } diff --git a/@generated/article/aggregate-article.output.ts b/@generated/article/aggregate-article.output.ts index 33f1c0f9..d5e310c5 100644 --- a/@generated/article/aggregate-article.output.ts +++ b/@generated/article/aggregate-article.output.ts @@ -8,18 +8,18 @@ import { ArticleMaxAggregate } from './article-max-aggregate.output'; @ObjectType() export class AggregateArticle { - @Field(() => ArticleCountAggregate, { nullable: true }) - _count?: ArticleCountAggregate; + @Field(() => ArticleCountAggregate, { nullable: true }) + _count?: ArticleCountAggregate; - @Field(() => ArticleAvgAggregate, { nullable: true }) - _avg?: ArticleAvgAggregate; + @Field(() => ArticleAvgAggregate, { nullable: true }) + _avg?: ArticleAvgAggregate; - @Field(() => ArticleSumAggregate, { nullable: true }) - _sum?: ArticleSumAggregate; + @Field(() => ArticleSumAggregate, { nullable: true }) + _sum?: ArticleSumAggregate; - @Field(() => ArticleMinAggregate, { nullable: true }) - _min?: ArticleMinAggregate; + @Field(() => ArticleMinAggregate, { nullable: true }) + _min?: ArticleMinAggregate; - @Field(() => ArticleMaxAggregate, { nullable: true }) - _max?: ArticleMaxAggregate; + @Field(() => ArticleMaxAggregate, { nullable: true }) + _max?: ArticleMaxAggregate; } diff --git a/@generated/article/article-aggregate.args.ts b/@generated/article/article-aggregate.args.ts index 29e3b3f9..df6e59c5 100644 --- a/@generated/article/article-aggregate.args.ts +++ b/@generated/article/article-aggregate.args.ts @@ -12,35 +12,35 @@ import { ArticleMaxAggregateInput } from './article-max-aggregate.input'; @ArgsType() export class ArticleAggregateArgs { - @Field(() => ArticleWhereInput, { nullable: true }) - where?: ArticleWhereInput; + @Field(() => ArticleWhereInput, { nullable: true }) + where?: ArticleWhereInput; - @Field(() => [ArticleOrderByWithRelationAndSearchRelevanceInput], { - nullable: true, - }) - orderBy?: Array; + @Field(() => [ArticleOrderByWithRelationAndSearchRelevanceInput], { + nullable: true, + }) + orderBy?: Array; - @Field(() => ArticleWhereUniqueInput, { nullable: true }) - cursor?: ArticleWhereUniqueInput; + @Field(() => ArticleWhereUniqueInput, { nullable: true }) + cursor?: ArticleWhereUniqueInput; - @Field(() => Int, { nullable: true }) - take?: number; + @Field(() => Int, { nullable: true }) + take?: number; - @Field(() => Int, { nullable: true }) - skip?: number; + @Field(() => Int, { nullable: true }) + skip?: number; - @Field(() => ArticleCountAggregateInput, { nullable: true }) - _count?: ArticleCountAggregateInput; + @Field(() => ArticleCountAggregateInput, { nullable: true }) + _count?: ArticleCountAggregateInput; - @Field(() => ArticleAvgAggregateInput, { nullable: true }) - _avg?: ArticleAvgAggregateInput; + @Field(() => ArticleAvgAggregateInput, { nullable: true }) + _avg?: ArticleAvgAggregateInput; - @Field(() => ArticleSumAggregateInput, { nullable: true }) - _sum?: ArticleSumAggregateInput; + @Field(() => ArticleSumAggregateInput, { nullable: true }) + _sum?: ArticleSumAggregateInput; - @Field(() => ArticleMinAggregateInput, { nullable: true }) - _min?: ArticleMinAggregateInput; + @Field(() => ArticleMinAggregateInput, { nullable: true }) + _min?: ArticleMinAggregateInput; - @Field(() => ArticleMaxAggregateInput, { nullable: true }) - _max?: ArticleMaxAggregateInput; + @Field(() => ArticleMaxAggregateInput, { nullable: true }) + _max?: ArticleMaxAggregateInput; } diff --git a/@generated/article/article-avg-aggregate.input.ts b/@generated/article/article-avg-aggregate.input.ts index 17f8c546..2a425696 100644 --- a/@generated/article/article-avg-aggregate.input.ts +++ b/@generated/article/article-avg-aggregate.input.ts @@ -3,6 +3,6 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class ArticleAvgAggregateInput { - @Field(() => Boolean, { nullable: true }) - favoritesCount?: true; + @Field(() => Boolean, { nullable: true }) + favoritesCount?: true; } diff --git a/@generated/article/article-avg-aggregate.output.ts b/@generated/article/article-avg-aggregate.output.ts index 1998d277..b21f6f5b 100644 --- a/@generated/article/article-avg-aggregate.output.ts +++ b/@generated/article/article-avg-aggregate.output.ts @@ -4,6 +4,6 @@ import { Float } from '@nestjs/graphql'; @ObjectType() export class ArticleAvgAggregate { - @Field(() => Float, { nullable: true }) - favoritesCount?: number; + @Field(() => Float, { nullable: true }) + favoritesCount?: number; } diff --git a/@generated/article/article-avg-order-by-aggregate.input.ts b/@generated/article/article-avg-order-by-aggregate.input.ts index 72bbf9ea..74e268ee 100644 --- a/@generated/article/article-avg-order-by-aggregate.input.ts +++ b/@generated/article/article-avg-order-by-aggregate.input.ts @@ -4,6 +4,6 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class ArticleAvgOrderByAggregateInput { - @Field(() => SortOrder, { nullable: true }) - favoritesCount?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + favoritesCount?: keyof typeof SortOrder; } diff --git a/@generated/article/article-count-aggregate.input.ts b/@generated/article/article-count-aggregate.input.ts index fcc30b95..75d2aa06 100644 --- a/@generated/article/article-count-aggregate.input.ts +++ b/@generated/article/article-count-aggregate.input.ts @@ -3,36 +3,36 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class ArticleCountAggregateInput { - @Field(() => Boolean, { nullable: true }) - id?: true; + @Field(() => Boolean, { nullable: true }) + id?: true; - @Field(() => Boolean, { nullable: true }) - slug?: true; + @Field(() => Boolean, { nullable: true }) + slug?: true; - @Field(() => Boolean, { nullable: true }) - title?: true; + @Field(() => Boolean, { nullable: true }) + title?: true; - @Field(() => Boolean, { nullable: true }) - description?: true; + @Field(() => Boolean, { nullable: true }) + description?: true; - @Field(() => Boolean, { nullable: true }) - body?: true; + @Field(() => Boolean, { nullable: true }) + body?: true; - @Field(() => Boolean, { nullable: true }) - createdAt?: true; + @Field(() => Boolean, { nullable: true }) + createdAt?: true; - @Field(() => Boolean, { nullable: true }) - updatedAt?: true; + @Field(() => Boolean, { nullable: true }) + updatedAt?: true; - @Field(() => Boolean, { nullable: true }) - favoritesCount?: true; + @Field(() => Boolean, { nullable: true }) + favoritesCount?: true; - @Field(() => Boolean, { nullable: true }) - authorId?: true; + @Field(() => Boolean, { nullable: true }) + authorId?: true; - @Field(() => Boolean, { nullable: true }) - active?: true; + @Field(() => Boolean, { nullable: true }) + active?: true; - @Field(() => Boolean, { nullable: true }) - _all?: true; + @Field(() => Boolean, { nullable: true }) + _all?: true; } diff --git a/@generated/article/article-count-aggregate.output.ts b/@generated/article/article-count-aggregate.output.ts index 3b5be4ee..b6804d27 100644 --- a/@generated/article/article-count-aggregate.output.ts +++ b/@generated/article/article-count-aggregate.output.ts @@ -4,36 +4,36 @@ import { Int } from '@nestjs/graphql'; @ObjectType() export class ArticleCountAggregate { - @Field(() => Int, { nullable: false }) - id!: number; + @Field(() => Int, { nullable: false }) + id!: number; - @Field(() => Int, { nullable: false }) - slug!: number; + @Field(() => Int, { nullable: false }) + slug!: number; - @Field(() => Int, { nullable: false }) - title!: number; + @Field(() => Int, { nullable: false }) + title!: number; - @Field(() => Int, { nullable: false }) - description!: number; + @Field(() => Int, { nullable: false }) + description!: number; - @Field(() => Int, { nullable: false }) - body!: number; + @Field(() => Int, { nullable: false }) + body!: number; - @Field(() => Int, { nullable: false }) - createdAt!: number; + @Field(() => Int, { nullable: false }) + createdAt!: number; - @Field(() => Int, { nullable: false }) - updatedAt!: number; + @Field(() => Int, { nullable: false }) + updatedAt!: number; - @Field(() => Int, { nullable: false }) - favoritesCount!: number; + @Field(() => Int, { nullable: false }) + favoritesCount!: number; - @Field(() => Int, { nullable: false }) - authorId!: number; + @Field(() => Int, { nullable: false }) + authorId!: number; - @Field(() => Int, { nullable: false }) - active!: number; + @Field(() => Int, { nullable: false }) + active!: number; - @Field(() => Int, { nullable: false }) - _all!: number; + @Field(() => Int, { nullable: false }) + _all!: number; } diff --git a/@generated/article/article-count-order-by-aggregate.input.ts b/@generated/article/article-count-order-by-aggregate.input.ts index d895a896..de0fb11b 100644 --- a/@generated/article/article-count-order-by-aggregate.input.ts +++ b/@generated/article/article-count-order-by-aggregate.input.ts @@ -4,33 +4,33 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class ArticleCountOrderByAggregateInput { - @Field(() => SortOrder, { nullable: true }) - id?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + id?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - slug?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + slug?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - title?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + title?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - description?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + description?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - body?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + body?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - createdAt?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + createdAt?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - updatedAt?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + updatedAt?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - favoritesCount?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + favoritesCount?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - authorId?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + authorId?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - active?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + active?: keyof typeof SortOrder; } diff --git a/@generated/article/article-count.output.ts b/@generated/article/article-count.output.ts index 858761bd..96d8aa3a 100644 --- a/@generated/article/article-count.output.ts +++ b/@generated/article/article-count.output.ts @@ -4,12 +4,12 @@ import { Int } from '@nestjs/graphql'; @ObjectType() export class ArticleCount { - @Field(() => Int, { nullable: false }) - tags?: number; + @Field(() => Int, { nullable: false }) + tags?: number; - @Field(() => Int, { nullable: false }) - favoritedBy?: number; + @Field(() => Int, { nullable: false }) + favoritedBy?: number; - @Field(() => Int, { nullable: false }) - comments?: number; + @Field(() => Int, { nullable: false }) + comments?: number; } diff --git a/@generated/article/article-create-many-author-input-envelope.input.ts b/@generated/article/article-create-many-author-input-envelope.input.ts index eabede9b..a4da7829 100644 --- a/@generated/article/article-create-many-author-input-envelope.input.ts +++ b/@generated/article/article-create-many-author-input-envelope.input.ts @@ -4,9 +4,9 @@ import { ArticleCreateManyAuthorInput } from './article-create-many-author.input @InputType() export class ArticleCreateManyAuthorInputEnvelope { - @Field(() => [ArticleCreateManyAuthorInput], { nullable: false }) - data!: Array; + @Field(() => [ArticleCreateManyAuthorInput], { nullable: false }) + data!: Array; - @Field(() => Boolean, { nullable: true }) - skipDuplicates?: boolean; + @Field(() => Boolean, { nullable: true }) + skipDuplicates?: boolean; } diff --git a/@generated/article/article-create-many-author.input.ts b/@generated/article/article-create-many-author.input.ts index 4c64801a..91e5fca9 100644 --- a/@generated/article/article-create-many-author.input.ts +++ b/@generated/article/article-create-many-author.input.ts @@ -5,30 +5,30 @@ import { Int } from '@nestjs/graphql'; @InputType() export class ArticleCreateManyAuthorInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => String, { nullable: false }) - slug!: string; + @Field(() => String, { nullable: false }) + slug!: string; - @Field(() => String, { nullable: false }) - title!: string; + @Field(() => String, { nullable: false }) + title!: string; - @Field(() => String, { nullable: false }) - description!: string; + @Field(() => String, { nullable: false }) + description!: string; - @Field(() => String, { nullable: false }) - body!: string; + @Field(() => String, { nullable: false }) + body!: string; - @HideField() - createdAt?: Date | string; + @HideField() + createdAt?: Date | string; - @Field(() => Date, { nullable: true }) - updatedAt?: Date | string; + @Field(() => Date, { nullable: true }) + updatedAt?: Date | string; - @Field(() => Int, { nullable: true }) - favoritesCount?: number; + @Field(() => Int, { nullable: true }) + favoritesCount?: number; - @Field(() => Boolean, { nullable: true }) - active?: boolean; + @Field(() => Boolean, { nullable: true }) + active?: boolean; } diff --git a/@generated/article/article-create-many.input.ts b/@generated/article/article-create-many.input.ts index 2755b611..859b204a 100644 --- a/@generated/article/article-create-many.input.ts +++ b/@generated/article/article-create-many.input.ts @@ -5,33 +5,33 @@ import { Int } from '@nestjs/graphql'; @InputType() export class ArticleCreateManyInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => String, { nullable: false }) - slug!: string; + @Field(() => String, { nullable: false }) + slug!: string; - @Field(() => String, { nullable: false }) - title!: string; + @Field(() => String, { nullable: false }) + title!: string; - @Field(() => String, { nullable: false }) - description!: string; + @Field(() => String, { nullable: false }) + description!: string; - @Field(() => String, { nullable: false }) - body!: string; + @Field(() => String, { nullable: false }) + body!: string; - @HideField() - createdAt?: Date | string; + @HideField() + createdAt?: Date | string; - @Field(() => Date, { nullable: true }) - updatedAt?: Date | string; + @Field(() => Date, { nullable: true }) + updatedAt?: Date | string; - @Field(() => Int, { nullable: true }) - favoritesCount?: number; + @Field(() => Int, { nullable: true }) + favoritesCount?: number; - @Field(() => String, { nullable: false }) - authorId!: string; + @Field(() => String, { nullable: false }) + authorId!: string; - @Field(() => Boolean, { nullable: true }) - active?: boolean; + @Field(() => Boolean, { nullable: true }) + active?: boolean; } diff --git a/@generated/article/article-create-nested-many-without-author.input.ts b/@generated/article/article-create-nested-many-without-author.input.ts index 386bd3f4..83860b90 100644 --- a/@generated/article/article-create-nested-many-without-author.input.ts +++ b/@generated/article/article-create-nested-many-without-author.input.ts @@ -7,15 +7,15 @@ import { ArticleWhereUniqueInput } from './article-where-unique.input'; @InputType() export class ArticleCreateNestedManyWithoutAuthorInput { - @Field(() => [ArticleCreateWithoutAuthorInput], { nullable: true }) - create?: Array; + @Field(() => [ArticleCreateWithoutAuthorInput], { nullable: true }) + create?: Array; - @Field(() => [ArticleCreateOrConnectWithoutAuthorInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [ArticleCreateOrConnectWithoutAuthorInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => ArticleCreateManyAuthorInputEnvelope, { nullable: true }) - createMany?: ArticleCreateManyAuthorInputEnvelope; + @Field(() => ArticleCreateManyAuthorInputEnvelope, { nullable: true }) + createMany?: ArticleCreateManyAuthorInputEnvelope; - @Field(() => [ArticleWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [ArticleWhereUniqueInput], { nullable: true }) + connect?: Array; } diff --git a/@generated/article/article-create-nested-many-without-favorited-by.input.ts b/@generated/article/article-create-nested-many-without-favorited-by.input.ts index 14d97bef..0610f962 100644 --- a/@generated/article/article-create-nested-many-without-favorited-by.input.ts +++ b/@generated/article/article-create-nested-many-without-favorited-by.input.ts @@ -6,12 +6,12 @@ import { ArticleWhereUniqueInput } from './article-where-unique.input'; @InputType() export class ArticleCreateNestedManyWithoutFavoritedByInput { - @Field(() => [ArticleCreateWithoutFavoritedByInput], { nullable: true }) - create?: Array; + @Field(() => [ArticleCreateWithoutFavoritedByInput], { nullable: true }) + create?: Array; - @Field(() => [ArticleCreateOrConnectWithoutFavoritedByInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [ArticleCreateOrConnectWithoutFavoritedByInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => [ArticleWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [ArticleWhereUniqueInput], { nullable: true }) + connect?: Array; } diff --git a/@generated/article/article-create-nested-many-without-tags.input.ts b/@generated/article/article-create-nested-many-without-tags.input.ts index bb31d035..a436d888 100644 --- a/@generated/article/article-create-nested-many-without-tags.input.ts +++ b/@generated/article/article-create-nested-many-without-tags.input.ts @@ -6,12 +6,12 @@ import { ArticleWhereUniqueInput } from './article-where-unique.input'; @InputType() export class ArticleCreateNestedManyWithoutTagsInput { - @Field(() => [ArticleCreateWithoutTagsInput], { nullable: true }) - create?: Array; + @Field(() => [ArticleCreateWithoutTagsInput], { nullable: true }) + create?: Array; - @Field(() => [ArticleCreateOrConnectWithoutTagsInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [ArticleCreateOrConnectWithoutTagsInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => [ArticleWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [ArticleWhereUniqueInput], { nullable: true }) + connect?: Array; } diff --git a/@generated/article/article-create-nested-one-without-comments.input.ts b/@generated/article/article-create-nested-one-without-comments.input.ts index 9b1be0f5..7406f358 100644 --- a/@generated/article/article-create-nested-one-without-comments.input.ts +++ b/@generated/article/article-create-nested-one-without-comments.input.ts @@ -6,12 +6,12 @@ import { ArticleWhereUniqueInput } from './article-where-unique.input'; @InputType() export class ArticleCreateNestedOneWithoutCommentsInput { - @Field(() => ArticleCreateWithoutCommentsInput, { nullable: true }) - create?: ArticleCreateWithoutCommentsInput; + @Field(() => ArticleCreateWithoutCommentsInput, { nullable: true }) + create?: ArticleCreateWithoutCommentsInput; - @Field(() => ArticleCreateOrConnectWithoutCommentsInput, { nullable: true }) - connectOrCreate?: ArticleCreateOrConnectWithoutCommentsInput; + @Field(() => ArticleCreateOrConnectWithoutCommentsInput, { nullable: true }) + connectOrCreate?: ArticleCreateOrConnectWithoutCommentsInput; - @Field(() => ArticleWhereUniqueInput, { nullable: true }) - connect?: ArticleWhereUniqueInput; + @Field(() => ArticleWhereUniqueInput, { nullable: true }) + connect?: ArticleWhereUniqueInput; } diff --git a/@generated/article/article-create-or-connect-without-author.input.ts b/@generated/article/article-create-or-connect-without-author.input.ts index 714aae29..06281636 100644 --- a/@generated/article/article-create-or-connect-without-author.input.ts +++ b/@generated/article/article-create-or-connect-without-author.input.ts @@ -5,9 +5,9 @@ import { ArticleCreateWithoutAuthorInput } from './article-create-without-author @InputType() export class ArticleCreateOrConnectWithoutAuthorInput { - @Field(() => ArticleWhereUniqueInput, { nullable: false }) - where!: ArticleWhereUniqueInput; + @Field(() => ArticleWhereUniqueInput, { nullable: false }) + where!: ArticleWhereUniqueInput; - @Field(() => ArticleCreateWithoutAuthorInput, { nullable: false }) - create!: ArticleCreateWithoutAuthorInput; + @Field(() => ArticleCreateWithoutAuthorInput, { nullable: false }) + create!: ArticleCreateWithoutAuthorInput; } diff --git a/@generated/article/article-create-or-connect-without-comments.input.ts b/@generated/article/article-create-or-connect-without-comments.input.ts index 7269b2ec..9affa304 100644 --- a/@generated/article/article-create-or-connect-without-comments.input.ts +++ b/@generated/article/article-create-or-connect-without-comments.input.ts @@ -5,9 +5,9 @@ import { ArticleCreateWithoutCommentsInput } from './article-create-without-comm @InputType() export class ArticleCreateOrConnectWithoutCommentsInput { - @Field(() => ArticleWhereUniqueInput, { nullable: false }) - where!: ArticleWhereUniqueInput; + @Field(() => ArticleWhereUniqueInput, { nullable: false }) + where!: ArticleWhereUniqueInput; - @Field(() => ArticleCreateWithoutCommentsInput, { nullable: false }) - create!: ArticleCreateWithoutCommentsInput; + @Field(() => ArticleCreateWithoutCommentsInput, { nullable: false }) + create!: ArticleCreateWithoutCommentsInput; } diff --git a/@generated/article/article-create-or-connect-without-favorited-by.input.ts b/@generated/article/article-create-or-connect-without-favorited-by.input.ts index 0e7dd773..b3139d67 100644 --- a/@generated/article/article-create-or-connect-without-favorited-by.input.ts +++ b/@generated/article/article-create-or-connect-without-favorited-by.input.ts @@ -5,9 +5,9 @@ import { ArticleCreateWithoutFavoritedByInput } from './article-create-without-f @InputType() export class ArticleCreateOrConnectWithoutFavoritedByInput { - @Field(() => ArticleWhereUniqueInput, { nullable: false }) - where!: ArticleWhereUniqueInput; + @Field(() => ArticleWhereUniqueInput, { nullable: false }) + where!: ArticleWhereUniqueInput; - @Field(() => ArticleCreateWithoutFavoritedByInput, { nullable: false }) - create!: ArticleCreateWithoutFavoritedByInput; + @Field(() => ArticleCreateWithoutFavoritedByInput, { nullable: false }) + create!: ArticleCreateWithoutFavoritedByInput; } diff --git a/@generated/article/article-create-or-connect-without-tags.input.ts b/@generated/article/article-create-or-connect-without-tags.input.ts index f3e35c49..514a048b 100644 --- a/@generated/article/article-create-or-connect-without-tags.input.ts +++ b/@generated/article/article-create-or-connect-without-tags.input.ts @@ -5,9 +5,9 @@ import { ArticleCreateWithoutTagsInput } from './article-create-without-tags.inp @InputType() export class ArticleCreateOrConnectWithoutTagsInput { - @Field(() => ArticleWhereUniqueInput, { nullable: false }) - where!: ArticleWhereUniqueInput; + @Field(() => ArticleWhereUniqueInput, { nullable: false }) + where!: ArticleWhereUniqueInput; - @Field(() => ArticleCreateWithoutTagsInput, { nullable: false }) - create!: ArticleCreateWithoutTagsInput; + @Field(() => ArticleCreateWithoutTagsInput, { nullable: false }) + create!: ArticleCreateWithoutTagsInput; } diff --git a/@generated/article/article-create-without-author.input.ts b/@generated/article/article-create-without-author.input.ts index c65c9333..b770e405 100644 --- a/@generated/article/article-create-without-author.input.ts +++ b/@generated/article/article-create-without-author.input.ts @@ -8,39 +8,39 @@ import { CommentCreateNestedManyWithoutArticleInput } from '../comment/comment-c @InputType() export class ArticleCreateWithoutAuthorInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => String, { nullable: false }) - slug!: string; + @Field(() => String, { nullable: false }) + slug!: string; - @Field(() => String, { nullable: false }) - title!: string; + @Field(() => String, { nullable: false }) + title!: string; - @Field(() => String, { nullable: false }) - description!: string; + @Field(() => String, { nullable: false }) + description!: string; - @Field(() => String, { nullable: false }) - body!: string; + @Field(() => String, { nullable: false }) + body!: string; - @Field(() => TagCreateNestedManyWithoutArticlesInput, { nullable: true }) - tags?: TagCreateNestedManyWithoutArticlesInput; + @Field(() => TagCreateNestedManyWithoutArticlesInput, { nullable: true }) + tags?: TagCreateNestedManyWithoutArticlesInput; - @HideField() - createdAt?: Date | string; + @HideField() + createdAt?: Date | string; - @Field(() => Date, { nullable: true }) - updatedAt?: Date | string; + @Field(() => Date, { nullable: true }) + updatedAt?: Date | string; - @Field(() => Int, { nullable: true }) - favoritesCount?: number; + @Field(() => Int, { nullable: true }) + favoritesCount?: number; - @Field(() => UserCreateNestedManyWithoutFavoriteArticlesInput, { nullable: true }) - favoritedBy?: UserCreateNestedManyWithoutFavoriteArticlesInput; + @Field(() => UserCreateNestedManyWithoutFavoriteArticlesInput, { nullable: true }) + favoritedBy?: UserCreateNestedManyWithoutFavoriteArticlesInput; - @Field(() => CommentCreateNestedManyWithoutArticleInput, { nullable: true }) - comments?: CommentCreateNestedManyWithoutArticleInput; + @Field(() => CommentCreateNestedManyWithoutArticleInput, { nullable: true }) + comments?: CommentCreateNestedManyWithoutArticleInput; - @Field(() => Boolean, { nullable: true }) - active?: boolean; + @Field(() => Boolean, { nullable: true }) + active?: boolean; } diff --git a/@generated/article/article-create-without-comments.input.ts b/@generated/article/article-create-without-comments.input.ts index 511e5582..081113a6 100644 --- a/@generated/article/article-create-without-comments.input.ts +++ b/@generated/article/article-create-without-comments.input.ts @@ -8,39 +8,39 @@ import { UserCreateNestedManyWithoutFavoriteArticlesInput } from '../user/user-c @InputType() export class ArticleCreateWithoutCommentsInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => String, { nullable: false }) - slug!: string; + @Field(() => String, { nullable: false }) + slug!: string; - @Field(() => String, { nullable: false }) - title!: string; + @Field(() => String, { nullable: false }) + title!: string; - @Field(() => String, { nullable: false }) - description!: string; + @Field(() => String, { nullable: false }) + description!: string; - @Field(() => String, { nullable: false }) - body!: string; + @Field(() => String, { nullable: false }) + body!: string; - @Field(() => TagCreateNestedManyWithoutArticlesInput, { nullable: true }) - tags?: TagCreateNestedManyWithoutArticlesInput; + @Field(() => TagCreateNestedManyWithoutArticlesInput, { nullable: true }) + tags?: TagCreateNestedManyWithoutArticlesInput; - @HideField() - createdAt?: Date | string; + @HideField() + createdAt?: Date | string; - @Field(() => Date, { nullable: true }) - updatedAt?: Date | string; + @Field(() => Date, { nullable: true }) + updatedAt?: Date | string; - @Field(() => Int, { nullable: true }) - favoritesCount?: number; + @Field(() => Int, { nullable: true }) + favoritesCount?: number; - @Field(() => UserCreateNestedOneWithoutArticlesInput, { nullable: false }) - author!: UserCreateNestedOneWithoutArticlesInput; + @Field(() => UserCreateNestedOneWithoutArticlesInput, { nullable: false }) + author!: UserCreateNestedOneWithoutArticlesInput; - @Field(() => UserCreateNestedManyWithoutFavoriteArticlesInput, { nullable: true }) - favoritedBy?: UserCreateNestedManyWithoutFavoriteArticlesInput; + @Field(() => UserCreateNestedManyWithoutFavoriteArticlesInput, { nullable: true }) + favoritedBy?: UserCreateNestedManyWithoutFavoriteArticlesInput; - @Field(() => Boolean, { nullable: true }) - active?: boolean; + @Field(() => Boolean, { nullable: true }) + active?: boolean; } diff --git a/@generated/article/article-create-without-favorited-by.input.ts b/@generated/article/article-create-without-favorited-by.input.ts index 7dae8c9b..1dc370c6 100644 --- a/@generated/article/article-create-without-favorited-by.input.ts +++ b/@generated/article/article-create-without-favorited-by.input.ts @@ -8,39 +8,39 @@ import { CommentCreateNestedManyWithoutArticleInput } from '../comment/comment-c @InputType() export class ArticleCreateWithoutFavoritedByInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => String, { nullable: false }) - slug!: string; + @Field(() => String, { nullable: false }) + slug!: string; - @Field(() => String, { nullable: false }) - title!: string; + @Field(() => String, { nullable: false }) + title!: string; - @Field(() => String, { nullable: false }) - description!: string; + @Field(() => String, { nullable: false }) + description!: string; - @Field(() => String, { nullable: false }) - body!: string; + @Field(() => String, { nullable: false }) + body!: string; - @Field(() => TagCreateNestedManyWithoutArticlesInput, { nullable: true }) - tags?: TagCreateNestedManyWithoutArticlesInput; + @Field(() => TagCreateNestedManyWithoutArticlesInput, { nullable: true }) + tags?: TagCreateNestedManyWithoutArticlesInput; - @HideField() - createdAt?: Date | string; + @HideField() + createdAt?: Date | string; - @Field(() => Date, { nullable: true }) - updatedAt?: Date | string; + @Field(() => Date, { nullable: true }) + updatedAt?: Date | string; - @Field(() => Int, { nullable: true }) - favoritesCount?: number; + @Field(() => Int, { nullable: true }) + favoritesCount?: number; - @Field(() => UserCreateNestedOneWithoutArticlesInput, { nullable: false }) - author!: UserCreateNestedOneWithoutArticlesInput; + @Field(() => UserCreateNestedOneWithoutArticlesInput, { nullable: false }) + author!: UserCreateNestedOneWithoutArticlesInput; - @Field(() => CommentCreateNestedManyWithoutArticleInput, { nullable: true }) - comments?: CommentCreateNestedManyWithoutArticleInput; + @Field(() => CommentCreateNestedManyWithoutArticleInput, { nullable: true }) + comments?: CommentCreateNestedManyWithoutArticleInput; - @Field(() => Boolean, { nullable: true }) - active?: boolean; + @Field(() => Boolean, { nullable: true }) + active?: boolean; } diff --git a/@generated/article/article-create-without-tags.input.ts b/@generated/article/article-create-without-tags.input.ts index a5da13c9..a133873e 100644 --- a/@generated/article/article-create-without-tags.input.ts +++ b/@generated/article/article-create-without-tags.input.ts @@ -8,39 +8,39 @@ import { CommentCreateNestedManyWithoutArticleInput } from '../comment/comment-c @InputType() export class ArticleCreateWithoutTagsInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => String, { nullable: false }) - slug!: string; + @Field(() => String, { nullable: false }) + slug!: string; - @Field(() => String, { nullable: false }) - title!: string; + @Field(() => String, { nullable: false }) + title!: string; - @Field(() => String, { nullable: false }) - description!: string; + @Field(() => String, { nullable: false }) + description!: string; - @Field(() => String, { nullable: false }) - body!: string; + @Field(() => String, { nullable: false }) + body!: string; - @HideField() - createdAt?: Date | string; + @HideField() + createdAt?: Date | string; - @Field(() => Date, { nullable: true }) - updatedAt?: Date | string; + @Field(() => Date, { nullable: true }) + updatedAt?: Date | string; - @Field(() => Int, { nullable: true }) - favoritesCount?: number; + @Field(() => Int, { nullable: true }) + favoritesCount?: number; - @Field(() => UserCreateNestedOneWithoutArticlesInput, { nullable: false }) - author!: UserCreateNestedOneWithoutArticlesInput; + @Field(() => UserCreateNestedOneWithoutArticlesInput, { nullable: false }) + author!: UserCreateNestedOneWithoutArticlesInput; - @Field(() => UserCreateNestedManyWithoutFavoriteArticlesInput, { nullable: true }) - favoritedBy?: UserCreateNestedManyWithoutFavoriteArticlesInput; + @Field(() => UserCreateNestedManyWithoutFavoriteArticlesInput, { nullable: true }) + favoritedBy?: UserCreateNestedManyWithoutFavoriteArticlesInput; - @Field(() => CommentCreateNestedManyWithoutArticleInput, { nullable: true }) - comments?: CommentCreateNestedManyWithoutArticleInput; + @Field(() => CommentCreateNestedManyWithoutArticleInput, { nullable: true }) + comments?: CommentCreateNestedManyWithoutArticleInput; - @Field(() => Boolean, { nullable: true }) - active?: boolean; + @Field(() => Boolean, { nullable: true }) + active?: boolean; } diff --git a/@generated/article/article-create.input.ts b/@generated/article/article-create.input.ts index cdfa237c..bc0d36e4 100644 --- a/@generated/article/article-create.input.ts +++ b/@generated/article/article-create.input.ts @@ -9,42 +9,42 @@ import { CommentCreateNestedManyWithoutArticleInput } from '../comment/comment-c @InputType() export class ArticleCreateInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => String, { nullable: false }) - slug!: string; + @Field(() => String, { nullable: false }) + slug!: string; - @Field(() => String, { nullable: false }) - title!: string; + @Field(() => String, { nullable: false }) + title!: string; - @Field(() => String, { nullable: false }) - description!: string; + @Field(() => String, { nullable: false }) + description!: string; - @Field(() => String, { nullable: false }) - body!: string; + @Field(() => String, { nullable: false }) + body!: string; - @Field(() => TagCreateNestedManyWithoutArticlesInput, { nullable: true }) - tags?: TagCreateNestedManyWithoutArticlesInput; + @Field(() => TagCreateNestedManyWithoutArticlesInput, { nullable: true }) + tags?: TagCreateNestedManyWithoutArticlesInput; - @HideField() - createdAt?: Date | string; + @HideField() + createdAt?: Date | string; - @Field(() => Date, { nullable: true }) - updatedAt?: Date | string; + @Field(() => Date, { nullable: true }) + updatedAt?: Date | string; - @Field(() => Int, { nullable: true }) - favoritesCount?: number; + @Field(() => Int, { nullable: true }) + favoritesCount?: number; - @Field(() => UserCreateNestedOneWithoutArticlesInput, { nullable: false }) - author!: UserCreateNestedOneWithoutArticlesInput; + @Field(() => UserCreateNestedOneWithoutArticlesInput, { nullable: false }) + author!: UserCreateNestedOneWithoutArticlesInput; - @Field(() => UserCreateNestedManyWithoutFavoriteArticlesInput, { nullable: true }) - favoritedBy?: UserCreateNestedManyWithoutFavoriteArticlesInput; + @Field(() => UserCreateNestedManyWithoutFavoriteArticlesInput, { nullable: true }) + favoritedBy?: UserCreateNestedManyWithoutFavoriteArticlesInput; - @Field(() => CommentCreateNestedManyWithoutArticleInput, { nullable: true }) - comments?: CommentCreateNestedManyWithoutArticleInput; + @Field(() => CommentCreateNestedManyWithoutArticleInput, { nullable: true }) + comments?: CommentCreateNestedManyWithoutArticleInput; - @Field(() => Boolean, { nullable: true }) - active?: boolean; + @Field(() => Boolean, { nullable: true }) + active?: boolean; } diff --git a/@generated/article/article-group-by.args.ts b/@generated/article/article-group-by.args.ts index c92fd0ee..e8137e42 100644 --- a/@generated/article/article-group-by.args.ts +++ b/@generated/article/article-group-by.args.ts @@ -13,36 +13,36 @@ import { ArticleMaxAggregateInput } from './article-max-aggregate.input'; @ArgsType() export class ArticleGroupByArgs { - @Field(() => ArticleWhereInput, { nullable: true }) - where?: ArticleWhereInput; + @Field(() => ArticleWhereInput, { nullable: true }) + where?: ArticleWhereInput; - @Field(() => [ArticleOrderByWithAggregationInput], { nullable: true }) - orderBy?: Array; + @Field(() => [ArticleOrderByWithAggregationInput], { nullable: true }) + orderBy?: Array; - @Field(() => [ArticleScalarFieldEnum], { nullable: false }) - by!: Array; + @Field(() => [ArticleScalarFieldEnum], { nullable: false }) + by!: Array; - @Field(() => ArticleScalarWhereWithAggregatesInput, { nullable: true }) - having?: ArticleScalarWhereWithAggregatesInput; + @Field(() => ArticleScalarWhereWithAggregatesInput, { nullable: true }) + having?: ArticleScalarWhereWithAggregatesInput; - @Field(() => Int, { nullable: true }) - take?: number; + @Field(() => Int, { nullable: true }) + take?: number; - @Field(() => Int, { nullable: true }) - skip?: number; + @Field(() => Int, { nullable: true }) + skip?: number; - @Field(() => ArticleCountAggregateInput, { nullable: true }) - _count?: ArticleCountAggregateInput; + @Field(() => ArticleCountAggregateInput, { nullable: true }) + _count?: ArticleCountAggregateInput; - @Field(() => ArticleAvgAggregateInput, { nullable: true }) - _avg?: ArticleAvgAggregateInput; + @Field(() => ArticleAvgAggregateInput, { nullable: true }) + _avg?: ArticleAvgAggregateInput; - @Field(() => ArticleSumAggregateInput, { nullable: true }) - _sum?: ArticleSumAggregateInput; + @Field(() => ArticleSumAggregateInput, { nullable: true }) + _sum?: ArticleSumAggregateInput; - @Field(() => ArticleMinAggregateInput, { nullable: true }) - _min?: ArticleMinAggregateInput; + @Field(() => ArticleMinAggregateInput, { nullable: true }) + _min?: ArticleMinAggregateInput; - @Field(() => ArticleMaxAggregateInput, { nullable: true }) - _max?: ArticleMaxAggregateInput; + @Field(() => ArticleMaxAggregateInput, { nullable: true }) + _max?: ArticleMaxAggregateInput; } diff --git a/@generated/article/article-group-by.output.ts b/@generated/article/article-group-by.output.ts index 15e0c7af..e468c495 100644 --- a/@generated/article/article-group-by.output.ts +++ b/@generated/article/article-group-by.output.ts @@ -9,48 +9,48 @@ import { ArticleMaxAggregate } from './article-max-aggregate.output'; @ObjectType() export class ArticleGroupBy { - @Field(() => String, { nullable: false }) - id!: string; + @Field(() => String, { nullable: false }) + id!: string; - @Field(() => String, { nullable: false }) - slug!: string; + @Field(() => String, { nullable: false }) + slug!: string; - @Field(() => String, { nullable: false }) - title!: string; + @Field(() => String, { nullable: false }) + title!: string; - @Field(() => String, { nullable: false }) - description!: string; + @Field(() => String, { nullable: false }) + description!: string; - @Field(() => String, { nullable: false }) - body!: string; + @Field(() => String, { nullable: false }) + body!: string; - @Field(() => Date, { nullable: false }) - createdAt!: Date | string; + @Field(() => Date, { nullable: false }) + createdAt!: Date | string; - @Field(() => Date, { nullable: false }) - updatedAt!: Date | string; + @Field(() => Date, { nullable: false }) + updatedAt!: Date | string; - @Field(() => Int, { nullable: false }) - favoritesCount!: number; + @Field(() => Int, { nullable: false }) + favoritesCount!: number; - @Field(() => String, { nullable: false }) - authorId!: string; + @Field(() => String, { nullable: false }) + authorId!: string; - @Field(() => Boolean, { nullable: true }) - active?: boolean; + @Field(() => Boolean, { nullable: true }) + active?: boolean; - @Field(() => ArticleCountAggregate, { nullable: true }) - _count?: ArticleCountAggregate; + @Field(() => ArticleCountAggregate, { nullable: true }) + _count?: ArticleCountAggregate; - @Field(() => ArticleAvgAggregate, { nullable: true }) - _avg?: ArticleAvgAggregate; + @Field(() => ArticleAvgAggregate, { nullable: true }) + _avg?: ArticleAvgAggregate; - @Field(() => ArticleSumAggregate, { nullable: true }) - _sum?: ArticleSumAggregate; + @Field(() => ArticleSumAggregate, { nullable: true }) + _sum?: ArticleSumAggregate; - @Field(() => ArticleMinAggregate, { nullable: true }) - _min?: ArticleMinAggregate; + @Field(() => ArticleMinAggregate, { nullable: true }) + _min?: ArticleMinAggregate; - @Field(() => ArticleMaxAggregate, { nullable: true }) - _max?: ArticleMaxAggregate; + @Field(() => ArticleMaxAggregate, { nullable: true }) + _max?: ArticleMaxAggregate; } diff --git a/@generated/article/article-list-relation-filter.input.ts b/@generated/article/article-list-relation-filter.input.ts index cbb25c79..bf21c6f8 100644 --- a/@generated/article/article-list-relation-filter.input.ts +++ b/@generated/article/article-list-relation-filter.input.ts @@ -4,12 +4,12 @@ import { ArticleWhereInput } from './article-where.input'; @InputType() export class ArticleListRelationFilter { - @Field(() => ArticleWhereInput, { nullable: true }) - every?: ArticleWhereInput; + @Field(() => ArticleWhereInput, { nullable: true }) + every?: ArticleWhereInput; - @Field(() => ArticleWhereInput, { nullable: true }) - some?: ArticleWhereInput; + @Field(() => ArticleWhereInput, { nullable: true }) + some?: ArticleWhereInput; - @Field(() => ArticleWhereInput, { nullable: true }) - none?: ArticleWhereInput; + @Field(() => ArticleWhereInput, { nullable: true }) + none?: ArticleWhereInput; } diff --git a/@generated/article/article-max-aggregate.input.ts b/@generated/article/article-max-aggregate.input.ts index 85bda16f..d113282b 100644 --- a/@generated/article/article-max-aggregate.input.ts +++ b/@generated/article/article-max-aggregate.input.ts @@ -3,33 +3,33 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class ArticleMaxAggregateInput { - @Field(() => Boolean, { nullable: true }) - id?: true; + @Field(() => Boolean, { nullable: true }) + id?: true; - @Field(() => Boolean, { nullable: true }) - slug?: true; + @Field(() => Boolean, { nullable: true }) + slug?: true; - @Field(() => Boolean, { nullable: true }) - title?: true; + @Field(() => Boolean, { nullable: true }) + title?: true; - @Field(() => Boolean, { nullable: true }) - description?: true; + @Field(() => Boolean, { nullable: true }) + description?: true; - @Field(() => Boolean, { nullable: true }) - body?: true; + @Field(() => Boolean, { nullable: true }) + body?: true; - @Field(() => Boolean, { nullable: true }) - createdAt?: true; + @Field(() => Boolean, { nullable: true }) + createdAt?: true; - @Field(() => Boolean, { nullable: true }) - updatedAt?: true; + @Field(() => Boolean, { nullable: true }) + updatedAt?: true; - @Field(() => Boolean, { nullable: true }) - favoritesCount?: true; + @Field(() => Boolean, { nullable: true }) + favoritesCount?: true; - @Field(() => Boolean, { nullable: true }) - authorId?: true; + @Field(() => Boolean, { nullable: true }) + authorId?: true; - @Field(() => Boolean, { nullable: true }) - active?: true; + @Field(() => Boolean, { nullable: true }) + active?: true; } diff --git a/@generated/article/article-max-aggregate.output.ts b/@generated/article/article-max-aggregate.output.ts index 621f89ab..1d02ebed 100644 --- a/@generated/article/article-max-aggregate.output.ts +++ b/@generated/article/article-max-aggregate.output.ts @@ -4,33 +4,33 @@ import { Int } from '@nestjs/graphql'; @ObjectType() export class ArticleMaxAggregate { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => String, { nullable: true }) - slug?: string; + @Field(() => String, { nullable: true }) + slug?: string; - @Field(() => String, { nullable: true }) - title?: string; + @Field(() => String, { nullable: true }) + title?: string; - @Field(() => String, { nullable: true }) - description?: string; + @Field(() => String, { nullable: true }) + description?: string; - @Field(() => String, { nullable: true }) - body?: string; + @Field(() => String, { nullable: true }) + body?: string; - @Field(() => Date, { nullable: true }) - createdAt?: Date | string; + @Field(() => Date, { nullable: true }) + createdAt?: Date | string; - @Field(() => Date, { nullable: true }) - updatedAt?: Date | string; + @Field(() => Date, { nullable: true }) + updatedAt?: Date | string; - @Field(() => Int, { nullable: true }) - favoritesCount?: number; + @Field(() => Int, { nullable: true }) + favoritesCount?: number; - @Field(() => String, { nullable: true }) - authorId?: string; + @Field(() => String, { nullable: true }) + authorId?: string; - @Field(() => Boolean, { nullable: true }) - active?: boolean; + @Field(() => Boolean, { nullable: true }) + active?: boolean; } diff --git a/@generated/article/article-max-order-by-aggregate.input.ts b/@generated/article/article-max-order-by-aggregate.input.ts index f7f73efd..e9e948aa 100644 --- a/@generated/article/article-max-order-by-aggregate.input.ts +++ b/@generated/article/article-max-order-by-aggregate.input.ts @@ -4,33 +4,33 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class ArticleMaxOrderByAggregateInput { - @Field(() => SortOrder, { nullable: true }) - id?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + id?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - slug?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + slug?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - title?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + title?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - description?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + description?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - body?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + body?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - createdAt?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + createdAt?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - updatedAt?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + updatedAt?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - favoritesCount?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + favoritesCount?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - authorId?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + authorId?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - active?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + active?: keyof typeof SortOrder; } diff --git a/@generated/article/article-min-aggregate.input.ts b/@generated/article/article-min-aggregate.input.ts index 07d4cd29..f440acb6 100644 --- a/@generated/article/article-min-aggregate.input.ts +++ b/@generated/article/article-min-aggregate.input.ts @@ -3,33 +3,33 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class ArticleMinAggregateInput { - @Field(() => Boolean, { nullable: true }) - id?: true; + @Field(() => Boolean, { nullable: true }) + id?: true; - @Field(() => Boolean, { nullable: true }) - slug?: true; + @Field(() => Boolean, { nullable: true }) + slug?: true; - @Field(() => Boolean, { nullable: true }) - title?: true; + @Field(() => Boolean, { nullable: true }) + title?: true; - @Field(() => Boolean, { nullable: true }) - description?: true; + @Field(() => Boolean, { nullable: true }) + description?: true; - @Field(() => Boolean, { nullable: true }) - body?: true; + @Field(() => Boolean, { nullable: true }) + body?: true; - @Field(() => Boolean, { nullable: true }) - createdAt?: true; + @Field(() => Boolean, { nullable: true }) + createdAt?: true; - @Field(() => Boolean, { nullable: true }) - updatedAt?: true; + @Field(() => Boolean, { nullable: true }) + updatedAt?: true; - @Field(() => Boolean, { nullable: true }) - favoritesCount?: true; + @Field(() => Boolean, { nullable: true }) + favoritesCount?: true; - @Field(() => Boolean, { nullable: true }) - authorId?: true; + @Field(() => Boolean, { nullable: true }) + authorId?: true; - @Field(() => Boolean, { nullable: true }) - active?: true; + @Field(() => Boolean, { nullable: true }) + active?: true; } diff --git a/@generated/article/article-min-aggregate.output.ts b/@generated/article/article-min-aggregate.output.ts index f9d2e388..d427daba 100644 --- a/@generated/article/article-min-aggregate.output.ts +++ b/@generated/article/article-min-aggregate.output.ts @@ -4,33 +4,33 @@ import { Int } from '@nestjs/graphql'; @ObjectType() export class ArticleMinAggregate { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => String, { nullable: true }) - slug?: string; + @Field(() => String, { nullable: true }) + slug?: string; - @Field(() => String, { nullable: true }) - title?: string; + @Field(() => String, { nullable: true }) + title?: string; - @Field(() => String, { nullable: true }) - description?: string; + @Field(() => String, { nullable: true }) + description?: string; - @Field(() => String, { nullable: true }) - body?: string; + @Field(() => String, { nullable: true }) + body?: string; - @Field(() => Date, { nullable: true }) - createdAt?: Date | string; + @Field(() => Date, { nullable: true }) + createdAt?: Date | string; - @Field(() => Date, { nullable: true }) - updatedAt?: Date | string; + @Field(() => Date, { nullable: true }) + updatedAt?: Date | string; - @Field(() => Int, { nullable: true }) - favoritesCount?: number; + @Field(() => Int, { nullable: true }) + favoritesCount?: number; - @Field(() => String, { nullable: true }) - authorId?: string; + @Field(() => String, { nullable: true }) + authorId?: string; - @Field(() => Boolean, { nullable: true }) - active?: boolean; + @Field(() => Boolean, { nullable: true }) + active?: boolean; } diff --git a/@generated/article/article-min-order-by-aggregate.input.ts b/@generated/article/article-min-order-by-aggregate.input.ts index 2ed646f6..6cd0e3eb 100644 --- a/@generated/article/article-min-order-by-aggregate.input.ts +++ b/@generated/article/article-min-order-by-aggregate.input.ts @@ -4,33 +4,33 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class ArticleMinOrderByAggregateInput { - @Field(() => SortOrder, { nullable: true }) - id?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + id?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - slug?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + slug?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - title?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + title?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - description?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + description?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - body?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + body?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - createdAt?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + createdAt?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - updatedAt?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + updatedAt?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - favoritesCount?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + favoritesCount?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - authorId?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + authorId?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - active?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + active?: keyof typeof SortOrder; } diff --git a/@generated/article/article-order-by-relation-aggregate.input.ts b/@generated/article/article-order-by-relation-aggregate.input.ts index de9e2919..d1f3c8da 100644 --- a/@generated/article/article-order-by-relation-aggregate.input.ts +++ b/@generated/article/article-order-by-relation-aggregate.input.ts @@ -4,6 +4,6 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class ArticleOrderByRelationAggregateInput { - @Field(() => SortOrder, { nullable: true }) - _count?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + _count?: keyof typeof SortOrder; } diff --git a/@generated/article/article-order-by-relevance-field.enum.ts b/@generated/article/article-order-by-relevance-field.enum.ts index 499e49ba..34e0bf28 100644 --- a/@generated/article/article-order-by-relevance-field.enum.ts +++ b/@generated/article/article-order-by-relevance-field.enum.ts @@ -1,15 +1,15 @@ import { registerEnumType } from '@nestjs/graphql'; export enum ArticleOrderByRelevanceFieldEnum { - id = 'id', - slug = 'slug', - title = 'title', - description = 'description', - body = 'body', - authorId = 'authorId', + id = 'id', + slug = 'slug', + title = 'title', + description = 'description', + body = 'body', + authorId = 'authorId', } registerEnumType(ArticleOrderByRelevanceFieldEnum, { - name: 'ArticleOrderByRelevanceFieldEnum', - description: undefined, + name: 'ArticleOrderByRelevanceFieldEnum', + description: undefined, }); diff --git a/@generated/article/article-order-by-relevance.input.ts b/@generated/article/article-order-by-relevance.input.ts index d673dc9e..87d8d5df 100644 --- a/@generated/article/article-order-by-relevance.input.ts +++ b/@generated/article/article-order-by-relevance.input.ts @@ -5,12 +5,12 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class ArticleOrderByRelevanceInput { - @Field(() => [ArticleOrderByRelevanceFieldEnum], { nullable: false }) - fields!: Array; + @Field(() => [ArticleOrderByRelevanceFieldEnum], { nullable: false }) + fields!: Array; - @Field(() => SortOrder, { nullable: false }) - sort!: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: false }) + sort!: keyof typeof SortOrder; - @Field(() => String, { nullable: false }) - search!: string; + @Field(() => String, { nullable: false }) + search!: string; } diff --git a/@generated/article/article-order-by-with-aggregation.input.ts b/@generated/article/article-order-by-with-aggregation.input.ts index 01b84bd4..d0060950 100644 --- a/@generated/article/article-order-by-with-aggregation.input.ts +++ b/@generated/article/article-order-by-with-aggregation.input.ts @@ -9,48 +9,48 @@ import { ArticleSumOrderByAggregateInput } from './article-sum-order-by-aggregat @InputType() export class ArticleOrderByWithAggregationInput { - @Field(() => SortOrder, { nullable: true }) - id?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + id?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - slug?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + slug?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - title?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + title?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - description?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + description?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - body?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + body?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - createdAt?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + createdAt?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - updatedAt?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + updatedAt?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - favoritesCount?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + favoritesCount?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - authorId?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + authorId?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - active?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + active?: keyof typeof SortOrder; - @Field(() => ArticleCountOrderByAggregateInput, { nullable: true }) - _count?: ArticleCountOrderByAggregateInput; + @Field(() => ArticleCountOrderByAggregateInput, { nullable: true }) + _count?: ArticleCountOrderByAggregateInput; - @Field(() => ArticleAvgOrderByAggregateInput, { nullable: true }) - _avg?: ArticleAvgOrderByAggregateInput; + @Field(() => ArticleAvgOrderByAggregateInput, { nullable: true }) + _avg?: ArticleAvgOrderByAggregateInput; - @Field(() => ArticleMaxOrderByAggregateInput, { nullable: true }) - _max?: ArticleMaxOrderByAggregateInput; + @Field(() => ArticleMaxOrderByAggregateInput, { nullable: true }) + _max?: ArticleMaxOrderByAggregateInput; - @Field(() => ArticleMinOrderByAggregateInput, { nullable: true }) - _min?: ArticleMinOrderByAggregateInput; + @Field(() => ArticleMinOrderByAggregateInput, { nullable: true }) + _min?: ArticleMinOrderByAggregateInput; - @Field(() => ArticleSumOrderByAggregateInput, { nullable: true }) - _sum?: ArticleSumOrderByAggregateInput; + @Field(() => ArticleSumOrderByAggregateInput, { nullable: true }) + _sum?: ArticleSumOrderByAggregateInput; } diff --git a/@generated/article/article-order-by-with-relation-and-search-relevance.input.ts b/@generated/article/article-order-by-with-relation-and-search-relevance.input.ts index 1b5cc125..5fba6f2d 100644 --- a/@generated/article/article-order-by-with-relation-and-search-relevance.input.ts +++ b/@generated/article/article-order-by-with-relation-and-search-relevance.input.ts @@ -9,48 +9,48 @@ import { ArticleOrderByRelevanceInput } from './article-order-by-relevance.input @InputType() export class ArticleOrderByWithRelationAndSearchRelevanceInput { - @Field(() => SortOrder, { nullable: true }) - id?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + id?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - slug?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + slug?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - title?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + title?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - description?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + description?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - body?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + body?: keyof typeof SortOrder; - @Field(() => TagOrderByRelationAggregateInput, { nullable: true }) - tags?: TagOrderByRelationAggregateInput; + @Field(() => TagOrderByRelationAggregateInput, { nullable: true }) + tags?: TagOrderByRelationAggregateInput; - @Field(() => SortOrder, { nullable: true }) - createdAt?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + createdAt?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - updatedAt?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + updatedAt?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - favoritesCount?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + favoritesCount?: keyof typeof SortOrder; - @Field(() => UserOrderByWithRelationAndSearchRelevanceInput, { nullable: true }) - author?: UserOrderByWithRelationAndSearchRelevanceInput; + @Field(() => UserOrderByWithRelationAndSearchRelevanceInput, { nullable: true }) + author?: UserOrderByWithRelationAndSearchRelevanceInput; - @Field(() => SortOrder, { nullable: true }) - authorId?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + authorId?: keyof typeof SortOrder; - @Field(() => UserOrderByRelationAggregateInput, { nullable: true }) - favoritedBy?: UserOrderByRelationAggregateInput; + @Field(() => UserOrderByRelationAggregateInput, { nullable: true }) + favoritedBy?: UserOrderByRelationAggregateInput; - @Field(() => CommentOrderByRelationAggregateInput, { nullable: true }) - comments?: CommentOrderByRelationAggregateInput; + @Field(() => CommentOrderByRelationAggregateInput, { nullable: true }) + comments?: CommentOrderByRelationAggregateInput; - @Field(() => SortOrder, { nullable: true }) - active?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + active?: keyof typeof SortOrder; - @Field(() => ArticleOrderByRelevanceInput, { nullable: true }) - _relevance?: ArticleOrderByRelevanceInput; + @Field(() => ArticleOrderByRelevanceInput, { nullable: true }) + _relevance?: ArticleOrderByRelevanceInput; } diff --git a/@generated/article/article-relation-filter.input.ts b/@generated/article/article-relation-filter.input.ts index f71ee145..1e4645b8 100644 --- a/@generated/article/article-relation-filter.input.ts +++ b/@generated/article/article-relation-filter.input.ts @@ -4,9 +4,9 @@ import { ArticleWhereInput } from './article-where.input'; @InputType() export class ArticleRelationFilter { - @Field(() => ArticleWhereInput, { nullable: true }) - is?: ArticleWhereInput; + @Field(() => ArticleWhereInput, { nullable: true }) + is?: ArticleWhereInput; - @Field(() => ArticleWhereInput, { nullable: true }) - isNot?: ArticleWhereInput; + @Field(() => ArticleWhereInput, { nullable: true }) + isNot?: ArticleWhereInput; } diff --git a/@generated/article/article-scalar-field.enum.ts b/@generated/article/article-scalar-field.enum.ts index 5055bc7f..d9983842 100644 --- a/@generated/article/article-scalar-field.enum.ts +++ b/@generated/article/article-scalar-field.enum.ts @@ -1,19 +1,19 @@ import { registerEnumType } from '@nestjs/graphql'; export enum ArticleScalarFieldEnum { - id = 'id', - slug = 'slug', - title = 'title', - description = 'description', - body = 'body', - createdAt = 'createdAt', - updatedAt = 'updatedAt', - favoritesCount = 'favoritesCount', - authorId = 'authorId', - active = 'active', + id = 'id', + slug = 'slug', + title = 'title', + description = 'description', + body = 'body', + createdAt = 'createdAt', + updatedAt = 'updatedAt', + favoritesCount = 'favoritesCount', + authorId = 'authorId', + active = 'active', } registerEnumType(ArticleScalarFieldEnum, { - name: 'ArticleScalarFieldEnum', - description: undefined, + name: 'ArticleScalarFieldEnum', + description: undefined, }); diff --git a/@generated/article/article-scalar-where-with-aggregates.input.ts b/@generated/article/article-scalar-where-with-aggregates.input.ts index 4354af17..3e56f506 100644 --- a/@generated/article/article-scalar-where-with-aggregates.input.ts +++ b/@generated/article/article-scalar-where-with-aggregates.input.ts @@ -7,42 +7,42 @@ import { BoolNullableWithAggregatesFilter } from '../prisma/bool-nullable-with-a @InputType() export class ArticleScalarWhereWithAggregatesInput { - @Field(() => [ArticleScalarWhereWithAggregatesInput], { nullable: true }) - AND?: Array; + @Field(() => [ArticleScalarWhereWithAggregatesInput], { nullable: true }) + AND?: Array; - @Field(() => [ArticleScalarWhereWithAggregatesInput], { nullable: true }) - OR?: Array; + @Field(() => [ArticleScalarWhereWithAggregatesInput], { nullable: true }) + OR?: Array; - @Field(() => [ArticleScalarWhereWithAggregatesInput], { nullable: true }) - NOT?: Array; + @Field(() => [ArticleScalarWhereWithAggregatesInput], { nullable: true }) + NOT?: Array; - @Field(() => StringWithAggregatesFilter, { nullable: true }) - id?: StringWithAggregatesFilter; + @Field(() => StringWithAggregatesFilter, { nullable: true }) + id?: StringWithAggregatesFilter; - @Field(() => StringWithAggregatesFilter, { nullable: true }) - slug?: StringWithAggregatesFilter; + @Field(() => StringWithAggregatesFilter, { nullable: true }) + slug?: StringWithAggregatesFilter; - @Field(() => StringWithAggregatesFilter, { nullable: true }) - title?: StringWithAggregatesFilter; + @Field(() => StringWithAggregatesFilter, { nullable: true }) + title?: StringWithAggregatesFilter; - @Field(() => StringWithAggregatesFilter, { nullable: true }) - description?: StringWithAggregatesFilter; + @Field(() => StringWithAggregatesFilter, { nullable: true }) + description?: StringWithAggregatesFilter; - @Field(() => StringWithAggregatesFilter, { nullable: true }) - body?: StringWithAggregatesFilter; + @Field(() => StringWithAggregatesFilter, { nullable: true }) + body?: StringWithAggregatesFilter; - @Field(() => DateTimeWithAggregatesFilter, { nullable: true }) - createdAt?: DateTimeWithAggregatesFilter; + @Field(() => DateTimeWithAggregatesFilter, { nullable: true }) + createdAt?: DateTimeWithAggregatesFilter; - @Field(() => DateTimeWithAggregatesFilter, { nullable: true }) - updatedAt?: DateTimeWithAggregatesFilter; + @Field(() => DateTimeWithAggregatesFilter, { nullable: true }) + updatedAt?: DateTimeWithAggregatesFilter; - @Field(() => IntWithAggregatesFilter, { nullable: true }) - favoritesCount?: IntWithAggregatesFilter; + @Field(() => IntWithAggregatesFilter, { nullable: true }) + favoritesCount?: IntWithAggregatesFilter; - @Field(() => StringWithAggregatesFilter, { nullable: true }) - authorId?: StringWithAggregatesFilter; + @Field(() => StringWithAggregatesFilter, { nullable: true }) + authorId?: StringWithAggregatesFilter; - @Field(() => BoolNullableWithAggregatesFilter, { nullable: true }) - active?: BoolNullableWithAggregatesFilter; + @Field(() => BoolNullableWithAggregatesFilter, { nullable: true }) + active?: BoolNullableWithAggregatesFilter; } diff --git a/@generated/article/article-scalar-where.input.ts b/@generated/article/article-scalar-where.input.ts index 5557a728..d0656ea8 100644 --- a/@generated/article/article-scalar-where.input.ts +++ b/@generated/article/article-scalar-where.input.ts @@ -7,42 +7,42 @@ import { BoolNullableFilter } from '../prisma/bool-nullable-filter.input'; @InputType() export class ArticleScalarWhereInput { - @Field(() => [ArticleScalarWhereInput], { nullable: true }) - AND?: Array; + @Field(() => [ArticleScalarWhereInput], { nullable: true }) + AND?: Array; - @Field(() => [ArticleScalarWhereInput], { nullable: true }) - OR?: Array; + @Field(() => [ArticleScalarWhereInput], { nullable: true }) + OR?: Array; - @Field(() => [ArticleScalarWhereInput], { nullable: true }) - NOT?: Array; + @Field(() => [ArticleScalarWhereInput], { nullable: true }) + NOT?: Array; - @Field(() => StringFilter, { nullable: true }) - id?: StringFilter; + @Field(() => StringFilter, { nullable: true }) + id?: StringFilter; - @Field(() => StringFilter, { nullable: true }) - slug?: StringFilter; + @Field(() => StringFilter, { nullable: true }) + slug?: StringFilter; - @Field(() => StringFilter, { nullable: true }) - title?: StringFilter; + @Field(() => StringFilter, { nullable: true }) + title?: StringFilter; - @Field(() => StringFilter, { nullable: true }) - description?: StringFilter; + @Field(() => StringFilter, { nullable: true }) + description?: StringFilter; - @Field(() => StringFilter, { nullable: true }) - body?: StringFilter; + @Field(() => StringFilter, { nullable: true }) + body?: StringFilter; - @Field(() => DateTimeFilter, { nullable: true }) - createdAt?: DateTimeFilter; + @Field(() => DateTimeFilter, { nullable: true }) + createdAt?: DateTimeFilter; - @Field(() => DateTimeFilter, { nullable: true }) - updatedAt?: DateTimeFilter; + @Field(() => DateTimeFilter, { nullable: true }) + updatedAt?: DateTimeFilter; - @Field(() => IntFilter, { nullable: true }) - favoritesCount?: IntFilter; + @Field(() => IntFilter, { nullable: true }) + favoritesCount?: IntFilter; - @Field(() => StringFilter, { nullable: true }) - authorId?: StringFilter; + @Field(() => StringFilter, { nullable: true }) + authorId?: StringFilter; - @Field(() => BoolNullableFilter, { nullable: true }) - active?: BoolNullableFilter; + @Field(() => BoolNullableFilter, { nullable: true }) + active?: BoolNullableFilter; } diff --git a/@generated/article/article-sum-aggregate.input.ts b/@generated/article/article-sum-aggregate.input.ts index d3e15b4a..214c04d2 100644 --- a/@generated/article/article-sum-aggregate.input.ts +++ b/@generated/article/article-sum-aggregate.input.ts @@ -3,6 +3,6 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class ArticleSumAggregateInput { - @Field(() => Boolean, { nullable: true }) - favoritesCount?: true; + @Field(() => Boolean, { nullable: true }) + favoritesCount?: true; } diff --git a/@generated/article/article-sum-aggregate.output.ts b/@generated/article/article-sum-aggregate.output.ts index cbe1638c..054a5312 100644 --- a/@generated/article/article-sum-aggregate.output.ts +++ b/@generated/article/article-sum-aggregate.output.ts @@ -4,6 +4,6 @@ import { Int } from '@nestjs/graphql'; @ObjectType() export class ArticleSumAggregate { - @Field(() => Int, { nullable: true }) - favoritesCount?: number; + @Field(() => Int, { nullable: true }) + favoritesCount?: number; } diff --git a/@generated/article/article-sum-order-by-aggregate.input.ts b/@generated/article/article-sum-order-by-aggregate.input.ts index 35c796b9..9b8830da 100644 --- a/@generated/article/article-sum-order-by-aggregate.input.ts +++ b/@generated/article/article-sum-order-by-aggregate.input.ts @@ -4,6 +4,6 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class ArticleSumOrderByAggregateInput { - @Field(() => SortOrder, { nullable: true }) - favoritesCount?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + favoritesCount?: keyof typeof SortOrder; } diff --git a/@generated/article/article-unchecked-create-nested-many-without-author.input.ts b/@generated/article/article-unchecked-create-nested-many-without-author.input.ts index 6f675a30..1f7f168f 100644 --- a/@generated/article/article-unchecked-create-nested-many-without-author.input.ts +++ b/@generated/article/article-unchecked-create-nested-many-without-author.input.ts @@ -7,15 +7,15 @@ import { ArticleWhereUniqueInput } from './article-where-unique.input'; @InputType() export class ArticleUncheckedCreateNestedManyWithoutAuthorInput { - @Field(() => [ArticleCreateWithoutAuthorInput], { nullable: true }) - create?: Array; + @Field(() => [ArticleCreateWithoutAuthorInput], { nullable: true }) + create?: Array; - @Field(() => [ArticleCreateOrConnectWithoutAuthorInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [ArticleCreateOrConnectWithoutAuthorInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => ArticleCreateManyAuthorInputEnvelope, { nullable: true }) - createMany?: ArticleCreateManyAuthorInputEnvelope; + @Field(() => ArticleCreateManyAuthorInputEnvelope, { nullable: true }) + createMany?: ArticleCreateManyAuthorInputEnvelope; - @Field(() => [ArticleWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [ArticleWhereUniqueInput], { nullable: true }) + connect?: Array; } diff --git a/@generated/article/article-unchecked-create-nested-many-without-favorited-by.input.ts b/@generated/article/article-unchecked-create-nested-many-without-favorited-by.input.ts index c17b4f10..d3878fa0 100644 --- a/@generated/article/article-unchecked-create-nested-many-without-favorited-by.input.ts +++ b/@generated/article/article-unchecked-create-nested-many-without-favorited-by.input.ts @@ -6,12 +6,12 @@ import { ArticleWhereUniqueInput } from './article-where-unique.input'; @InputType() export class ArticleUncheckedCreateNestedManyWithoutFavoritedByInput { - @Field(() => [ArticleCreateWithoutFavoritedByInput], { nullable: true }) - create?: Array; + @Field(() => [ArticleCreateWithoutFavoritedByInput], { nullable: true }) + create?: Array; - @Field(() => [ArticleCreateOrConnectWithoutFavoritedByInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [ArticleCreateOrConnectWithoutFavoritedByInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => [ArticleWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [ArticleWhereUniqueInput], { nullable: true }) + connect?: Array; } diff --git a/@generated/article/article-unchecked-create-nested-many-without-tags.input.ts b/@generated/article/article-unchecked-create-nested-many-without-tags.input.ts index 0f70faeb..bd5b00a8 100644 --- a/@generated/article/article-unchecked-create-nested-many-without-tags.input.ts +++ b/@generated/article/article-unchecked-create-nested-many-without-tags.input.ts @@ -6,12 +6,12 @@ import { ArticleWhereUniqueInput } from './article-where-unique.input'; @InputType() export class ArticleUncheckedCreateNestedManyWithoutTagsInput { - @Field(() => [ArticleCreateWithoutTagsInput], { nullable: true }) - create?: Array; + @Field(() => [ArticleCreateWithoutTagsInput], { nullable: true }) + create?: Array; - @Field(() => [ArticleCreateOrConnectWithoutTagsInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [ArticleCreateOrConnectWithoutTagsInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => [ArticleWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [ArticleWhereUniqueInput], { nullable: true }) + connect?: Array; } diff --git a/@generated/article/article-unchecked-create-without-author.input.ts b/@generated/article/article-unchecked-create-without-author.input.ts index 9ae419d9..8aceeb51 100644 --- a/@generated/article/article-unchecked-create-without-author.input.ts +++ b/@generated/article/article-unchecked-create-without-author.input.ts @@ -8,43 +8,43 @@ import { CommentUncheckedCreateNestedManyWithoutArticleInput } from '../comment/ @InputType() export class ArticleUncheckedCreateWithoutAuthorInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => String, { nullable: false }) - slug!: string; + @Field(() => String, { nullable: false }) + slug!: string; - @Field(() => String, { nullable: false }) - title!: string; + @Field(() => String, { nullable: false }) + title!: string; - @Field(() => String, { nullable: false }) - description!: string; + @Field(() => String, { nullable: false }) + description!: string; - @Field(() => String, { nullable: false }) - body!: string; + @Field(() => String, { nullable: false }) + body!: string; - @Field(() => TagUncheckedCreateNestedManyWithoutArticlesInput, { nullable: true }) - tags?: TagUncheckedCreateNestedManyWithoutArticlesInput; + @Field(() => TagUncheckedCreateNestedManyWithoutArticlesInput, { nullable: true }) + tags?: TagUncheckedCreateNestedManyWithoutArticlesInput; - @HideField() - createdAt?: Date | string; + @HideField() + createdAt?: Date | string; - @Field(() => Date, { nullable: true }) - updatedAt?: Date | string; + @Field(() => Date, { nullable: true }) + updatedAt?: Date | string; - @Field(() => Int, { nullable: true }) - favoritesCount?: number; + @Field(() => Int, { nullable: true }) + favoritesCount?: number; - @Field(() => UserUncheckedCreateNestedManyWithoutFavoriteArticlesInput, { - nullable: true, - }) - favoritedBy?: UserUncheckedCreateNestedManyWithoutFavoriteArticlesInput; + @Field(() => UserUncheckedCreateNestedManyWithoutFavoriteArticlesInput, { + nullable: true, + }) + favoritedBy?: UserUncheckedCreateNestedManyWithoutFavoriteArticlesInput; - @Field(() => CommentUncheckedCreateNestedManyWithoutArticleInput, { - nullable: true, - }) - comments?: CommentUncheckedCreateNestedManyWithoutArticleInput; + @Field(() => CommentUncheckedCreateNestedManyWithoutArticleInput, { + nullable: true, + }) + comments?: CommentUncheckedCreateNestedManyWithoutArticleInput; - @Field(() => Boolean, { nullable: true }) - active?: boolean; + @Field(() => Boolean, { nullable: true }) + active?: boolean; } diff --git a/@generated/article/article-unchecked-create-without-comments.input.ts b/@generated/article/article-unchecked-create-without-comments.input.ts index 32bcfa3c..42e84544 100644 --- a/@generated/article/article-unchecked-create-without-comments.input.ts +++ b/@generated/article/article-unchecked-create-without-comments.input.ts @@ -7,41 +7,41 @@ import { UserUncheckedCreateNestedManyWithoutFavoriteArticlesInput } from '../us @InputType() export class ArticleUncheckedCreateWithoutCommentsInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => String, { nullable: false }) - slug!: string; + @Field(() => String, { nullable: false }) + slug!: string; - @Field(() => String, { nullable: false }) - title!: string; + @Field(() => String, { nullable: false }) + title!: string; - @Field(() => String, { nullable: false }) - description!: string; + @Field(() => String, { nullable: false }) + description!: string; - @Field(() => String, { nullable: false }) - body!: string; + @Field(() => String, { nullable: false }) + body!: string; - @Field(() => TagUncheckedCreateNestedManyWithoutArticlesInput, { nullable: true }) - tags?: TagUncheckedCreateNestedManyWithoutArticlesInput; + @Field(() => TagUncheckedCreateNestedManyWithoutArticlesInput, { nullable: true }) + tags?: TagUncheckedCreateNestedManyWithoutArticlesInput; - @HideField() - createdAt?: Date | string; + @HideField() + createdAt?: Date | string; - @Field(() => Date, { nullable: true }) - updatedAt?: Date | string; + @Field(() => Date, { nullable: true }) + updatedAt?: Date | string; - @Field(() => Int, { nullable: true }) - favoritesCount?: number; + @Field(() => Int, { nullable: true }) + favoritesCount?: number; - @Field(() => String, { nullable: false }) - authorId!: string; + @Field(() => String, { nullable: false }) + authorId!: string; - @Field(() => UserUncheckedCreateNestedManyWithoutFavoriteArticlesInput, { - nullable: true, - }) - favoritedBy?: UserUncheckedCreateNestedManyWithoutFavoriteArticlesInput; + @Field(() => UserUncheckedCreateNestedManyWithoutFavoriteArticlesInput, { + nullable: true, + }) + favoritedBy?: UserUncheckedCreateNestedManyWithoutFavoriteArticlesInput; - @Field(() => Boolean, { nullable: true }) - active?: boolean; + @Field(() => Boolean, { nullable: true }) + active?: boolean; } diff --git a/@generated/article/article-unchecked-create-without-favorited-by.input.ts b/@generated/article/article-unchecked-create-without-favorited-by.input.ts index 65e19625..39b2f540 100644 --- a/@generated/article/article-unchecked-create-without-favorited-by.input.ts +++ b/@generated/article/article-unchecked-create-without-favorited-by.input.ts @@ -7,41 +7,41 @@ import { CommentUncheckedCreateNestedManyWithoutArticleInput } from '../comment/ @InputType() export class ArticleUncheckedCreateWithoutFavoritedByInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => String, { nullable: false }) - slug!: string; + @Field(() => String, { nullable: false }) + slug!: string; - @Field(() => String, { nullable: false }) - title!: string; + @Field(() => String, { nullable: false }) + title!: string; - @Field(() => String, { nullable: false }) - description!: string; + @Field(() => String, { nullable: false }) + description!: string; - @Field(() => String, { nullable: false }) - body!: string; + @Field(() => String, { nullable: false }) + body!: string; - @Field(() => TagUncheckedCreateNestedManyWithoutArticlesInput, { nullable: true }) - tags?: TagUncheckedCreateNestedManyWithoutArticlesInput; + @Field(() => TagUncheckedCreateNestedManyWithoutArticlesInput, { nullable: true }) + tags?: TagUncheckedCreateNestedManyWithoutArticlesInput; - @HideField() - createdAt?: Date | string; + @HideField() + createdAt?: Date | string; - @Field(() => Date, { nullable: true }) - updatedAt?: Date | string; + @Field(() => Date, { nullable: true }) + updatedAt?: Date | string; - @Field(() => Int, { nullable: true }) - favoritesCount?: number; + @Field(() => Int, { nullable: true }) + favoritesCount?: number; - @Field(() => String, { nullable: false }) - authorId!: string; + @Field(() => String, { nullable: false }) + authorId!: string; - @Field(() => CommentUncheckedCreateNestedManyWithoutArticleInput, { - nullable: true, - }) - comments?: CommentUncheckedCreateNestedManyWithoutArticleInput; + @Field(() => CommentUncheckedCreateNestedManyWithoutArticleInput, { + nullable: true, + }) + comments?: CommentUncheckedCreateNestedManyWithoutArticleInput; - @Field(() => Boolean, { nullable: true }) - active?: boolean; + @Field(() => Boolean, { nullable: true }) + active?: boolean; } diff --git a/@generated/article/article-unchecked-create-without-tags.input.ts b/@generated/article/article-unchecked-create-without-tags.input.ts index 8c3802ca..b7602077 100644 --- a/@generated/article/article-unchecked-create-without-tags.input.ts +++ b/@generated/article/article-unchecked-create-without-tags.input.ts @@ -7,43 +7,43 @@ import { CommentUncheckedCreateNestedManyWithoutArticleInput } from '../comment/ @InputType() export class ArticleUncheckedCreateWithoutTagsInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => String, { nullable: false }) - slug!: string; + @Field(() => String, { nullable: false }) + slug!: string; - @Field(() => String, { nullable: false }) - title!: string; + @Field(() => String, { nullable: false }) + title!: string; - @Field(() => String, { nullable: false }) - description!: string; + @Field(() => String, { nullable: false }) + description!: string; - @Field(() => String, { nullable: false }) - body!: string; + @Field(() => String, { nullable: false }) + body!: string; - @HideField() - createdAt?: Date | string; + @HideField() + createdAt?: Date | string; - @Field(() => Date, { nullable: true }) - updatedAt?: Date | string; + @Field(() => Date, { nullable: true }) + updatedAt?: Date | string; - @Field(() => Int, { nullable: true }) - favoritesCount?: number; + @Field(() => Int, { nullable: true }) + favoritesCount?: number; - @Field(() => String, { nullable: false }) - authorId!: string; + @Field(() => String, { nullable: false }) + authorId!: string; - @Field(() => UserUncheckedCreateNestedManyWithoutFavoriteArticlesInput, { - nullable: true, - }) - favoritedBy?: UserUncheckedCreateNestedManyWithoutFavoriteArticlesInput; + @Field(() => UserUncheckedCreateNestedManyWithoutFavoriteArticlesInput, { + nullable: true, + }) + favoritedBy?: UserUncheckedCreateNestedManyWithoutFavoriteArticlesInput; - @Field(() => CommentUncheckedCreateNestedManyWithoutArticleInput, { - nullable: true, - }) - comments?: CommentUncheckedCreateNestedManyWithoutArticleInput; + @Field(() => CommentUncheckedCreateNestedManyWithoutArticleInput, { + nullable: true, + }) + comments?: CommentUncheckedCreateNestedManyWithoutArticleInput; - @Field(() => Boolean, { nullable: true }) - active?: boolean; + @Field(() => Boolean, { nullable: true }) + active?: boolean; } diff --git a/@generated/article/article-unchecked-create.input.ts b/@generated/article/article-unchecked-create.input.ts index d19d9025..bdfb0cc9 100644 --- a/@generated/article/article-unchecked-create.input.ts +++ b/@generated/article/article-unchecked-create.input.ts @@ -8,46 +8,46 @@ import { CommentUncheckedCreateNestedManyWithoutArticleInput } from '../comment/ @InputType() export class ArticleUncheckedCreateInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => String, { nullable: false }) - slug!: string; + @Field(() => String, { nullable: false }) + slug!: string; - @Field(() => String, { nullable: false }) - title!: string; + @Field(() => String, { nullable: false }) + title!: string; - @Field(() => String, { nullable: false }) - description!: string; + @Field(() => String, { nullable: false }) + description!: string; - @Field(() => String, { nullable: false }) - body!: string; + @Field(() => String, { nullable: false }) + body!: string; - @Field(() => TagUncheckedCreateNestedManyWithoutArticlesInput, { nullable: true }) - tags?: TagUncheckedCreateNestedManyWithoutArticlesInput; + @Field(() => TagUncheckedCreateNestedManyWithoutArticlesInput, { nullable: true }) + tags?: TagUncheckedCreateNestedManyWithoutArticlesInput; - @HideField() - createdAt?: Date | string; + @HideField() + createdAt?: Date | string; - @Field(() => Date, { nullable: true }) - updatedAt?: Date | string; + @Field(() => Date, { nullable: true }) + updatedAt?: Date | string; - @Field(() => Int, { nullable: true }) - favoritesCount?: number; + @Field(() => Int, { nullable: true }) + favoritesCount?: number; - @Field(() => String, { nullable: false }) - authorId!: string; + @Field(() => String, { nullable: false }) + authorId!: string; - @Field(() => UserUncheckedCreateNestedManyWithoutFavoriteArticlesInput, { - nullable: true, - }) - favoritedBy?: UserUncheckedCreateNestedManyWithoutFavoriteArticlesInput; + @Field(() => UserUncheckedCreateNestedManyWithoutFavoriteArticlesInput, { + nullable: true, + }) + favoritedBy?: UserUncheckedCreateNestedManyWithoutFavoriteArticlesInput; - @Field(() => CommentUncheckedCreateNestedManyWithoutArticleInput, { - nullable: true, - }) - comments?: CommentUncheckedCreateNestedManyWithoutArticleInput; + @Field(() => CommentUncheckedCreateNestedManyWithoutArticleInput, { + nullable: true, + }) + comments?: CommentUncheckedCreateNestedManyWithoutArticleInput; - @Field(() => Boolean, { nullable: true }) - active?: boolean; + @Field(() => Boolean, { nullable: true }) + active?: boolean; } diff --git a/@generated/article/article-unchecked-update-many-without-articles.input.ts b/@generated/article/article-unchecked-update-many-without-articles.input.ts index ecc0ab0f..e17f7327 100644 --- a/@generated/article/article-unchecked-update-many-without-articles.input.ts +++ b/@generated/article/article-unchecked-update-many-without-articles.input.ts @@ -7,30 +7,30 @@ import { NullableBoolFieldUpdateOperationsInput } from '../prisma/nullable-bool- @InputType() export class ArticleUncheckedUpdateManyWithoutArticlesInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - slug?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + slug?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - title?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + title?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - description?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + description?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - body?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + body?: StringFieldUpdateOperationsInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - createdAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + createdAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - updatedAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + updatedAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => IntFieldUpdateOperationsInput, { nullable: true }) - favoritesCount?: IntFieldUpdateOperationsInput; + @Field(() => IntFieldUpdateOperationsInput, { nullable: true }) + favoritesCount?: IntFieldUpdateOperationsInput; - @Field(() => NullableBoolFieldUpdateOperationsInput, { nullable: true }) - active?: NullableBoolFieldUpdateOperationsInput; + @Field(() => NullableBoolFieldUpdateOperationsInput, { nullable: true }) + active?: NullableBoolFieldUpdateOperationsInput; } diff --git a/@generated/article/article-unchecked-update-many-without-author.input.ts b/@generated/article/article-unchecked-update-many-without-author.input.ts index 2f9125ec..4bad0597 100644 --- a/@generated/article/article-unchecked-update-many-without-author.input.ts +++ b/@generated/article/article-unchecked-update-many-without-author.input.ts @@ -11,36 +11,36 @@ import { ArticleScalarWhereInput } from './article-scalar-where.input'; @InputType() export class ArticleUncheckedUpdateManyWithoutAuthorInput { - @Field(() => [ArticleCreateWithoutAuthorInput], { nullable: true }) - create?: Array; + @Field(() => [ArticleCreateWithoutAuthorInput], { nullable: true }) + create?: Array; - @Field(() => [ArticleCreateOrConnectWithoutAuthorInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [ArticleCreateOrConnectWithoutAuthorInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => [ArticleUpsertWithWhereUniqueWithoutAuthorInput], { nullable: true }) - upsert?: Array; + @Field(() => [ArticleUpsertWithWhereUniqueWithoutAuthorInput], { nullable: true }) + upsert?: Array; - @Field(() => ArticleCreateManyAuthorInputEnvelope, { nullable: true }) - createMany?: ArticleCreateManyAuthorInputEnvelope; + @Field(() => ArticleCreateManyAuthorInputEnvelope, { nullable: true }) + createMany?: ArticleCreateManyAuthorInputEnvelope; - @Field(() => [ArticleWhereUniqueInput], { nullable: true }) - set?: Array; + @Field(() => [ArticleWhereUniqueInput], { nullable: true }) + set?: Array; - @Field(() => [ArticleWhereUniqueInput], { nullable: true }) - disconnect?: Array; + @Field(() => [ArticleWhereUniqueInput], { nullable: true }) + disconnect?: Array; - @Field(() => [ArticleWhereUniqueInput], { nullable: true }) - delete?: Array; + @Field(() => [ArticleWhereUniqueInput], { nullable: true }) + delete?: Array; - @Field(() => [ArticleWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [ArticleWhereUniqueInput], { nullable: true }) + connect?: Array; - @Field(() => [ArticleUpdateWithWhereUniqueWithoutAuthorInput], { nullable: true }) - update?: Array; + @Field(() => [ArticleUpdateWithWhereUniqueWithoutAuthorInput], { nullable: true }) + update?: Array; - @Field(() => [ArticleUpdateManyWithWhereWithoutAuthorInput], { nullable: true }) - updateMany?: Array; + @Field(() => [ArticleUpdateManyWithWhereWithoutAuthorInput], { nullable: true }) + updateMany?: Array; - @Field(() => [ArticleScalarWhereInput], { nullable: true }) - deleteMany?: Array; + @Field(() => [ArticleScalarWhereInput], { nullable: true }) + deleteMany?: Array; } diff --git a/@generated/article/article-unchecked-update-many-without-favorite-articles.input.ts b/@generated/article/article-unchecked-update-many-without-favorite-articles.input.ts index 32eb842e..0063c446 100644 --- a/@generated/article/article-unchecked-update-many-without-favorite-articles.input.ts +++ b/@generated/article/article-unchecked-update-many-without-favorite-articles.input.ts @@ -7,33 +7,33 @@ import { NullableBoolFieldUpdateOperationsInput } from '../prisma/nullable-bool- @InputType() export class ArticleUncheckedUpdateManyWithoutFavoriteArticlesInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - slug?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + slug?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - title?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + title?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - description?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + description?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - body?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + body?: StringFieldUpdateOperationsInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - createdAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + createdAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - updatedAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + updatedAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => IntFieldUpdateOperationsInput, { nullable: true }) - favoritesCount?: IntFieldUpdateOperationsInput; + @Field(() => IntFieldUpdateOperationsInput, { nullable: true }) + favoritesCount?: IntFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - authorId?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + authorId?: StringFieldUpdateOperationsInput; - @Field(() => NullableBoolFieldUpdateOperationsInput, { nullable: true }) - active?: NullableBoolFieldUpdateOperationsInput; + @Field(() => NullableBoolFieldUpdateOperationsInput, { nullable: true }) + active?: NullableBoolFieldUpdateOperationsInput; } diff --git a/@generated/article/article-unchecked-update-many-without-favorited-by.input.ts b/@generated/article/article-unchecked-update-many-without-favorited-by.input.ts index d3abae94..a2ece8b6 100644 --- a/@generated/article/article-unchecked-update-many-without-favorited-by.input.ts +++ b/@generated/article/article-unchecked-update-many-without-favorited-by.input.ts @@ -10,39 +10,39 @@ import { ArticleScalarWhereInput } from './article-scalar-where.input'; @InputType() export class ArticleUncheckedUpdateManyWithoutFavoritedByInput { - @Field(() => [ArticleCreateWithoutFavoritedByInput], { nullable: true }) - create?: Array; + @Field(() => [ArticleCreateWithoutFavoritedByInput], { nullable: true }) + create?: Array; - @Field(() => [ArticleCreateOrConnectWithoutFavoritedByInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [ArticleCreateOrConnectWithoutFavoritedByInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => [ArticleUpsertWithWhereUniqueWithoutFavoritedByInput], { - nullable: true, - }) - upsert?: Array; + @Field(() => [ArticleUpsertWithWhereUniqueWithoutFavoritedByInput], { + nullable: true, + }) + upsert?: Array; - @Field(() => [ArticleWhereUniqueInput], { nullable: true }) - set?: Array; + @Field(() => [ArticleWhereUniqueInput], { nullable: true }) + set?: Array; - @Field(() => [ArticleWhereUniqueInput], { nullable: true }) - disconnect?: Array; + @Field(() => [ArticleWhereUniqueInput], { nullable: true }) + disconnect?: Array; - @Field(() => [ArticleWhereUniqueInput], { nullable: true }) - delete?: Array; + @Field(() => [ArticleWhereUniqueInput], { nullable: true }) + delete?: Array; - @Field(() => [ArticleWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [ArticleWhereUniqueInput], { nullable: true }) + connect?: Array; - @Field(() => [ArticleUpdateWithWhereUniqueWithoutFavoritedByInput], { - nullable: true, - }) - update?: Array; + @Field(() => [ArticleUpdateWithWhereUniqueWithoutFavoritedByInput], { + nullable: true, + }) + update?: Array; - @Field(() => [ArticleUpdateManyWithWhereWithoutFavoritedByInput], { - nullable: true, - }) - updateMany?: Array; + @Field(() => [ArticleUpdateManyWithWhereWithoutFavoritedByInput], { + nullable: true, + }) + updateMany?: Array; - @Field(() => [ArticleScalarWhereInput], { nullable: true }) - deleteMany?: Array; + @Field(() => [ArticleScalarWhereInput], { nullable: true }) + deleteMany?: Array; } diff --git a/@generated/article/article-unchecked-update-many-without-tags.input.ts b/@generated/article/article-unchecked-update-many-without-tags.input.ts index dc69b900..70102812 100644 --- a/@generated/article/article-unchecked-update-many-without-tags.input.ts +++ b/@generated/article/article-unchecked-update-many-without-tags.input.ts @@ -10,33 +10,33 @@ import { ArticleScalarWhereInput } from './article-scalar-where.input'; @InputType() export class ArticleUncheckedUpdateManyWithoutTagsInput { - @Field(() => [ArticleCreateWithoutTagsInput], { nullable: true }) - create?: Array; + @Field(() => [ArticleCreateWithoutTagsInput], { nullable: true }) + create?: Array; - @Field(() => [ArticleCreateOrConnectWithoutTagsInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [ArticleCreateOrConnectWithoutTagsInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => [ArticleUpsertWithWhereUniqueWithoutTagsInput], { nullable: true }) - upsert?: Array; + @Field(() => [ArticleUpsertWithWhereUniqueWithoutTagsInput], { nullable: true }) + upsert?: Array; - @Field(() => [ArticleWhereUniqueInput], { nullable: true }) - set?: Array; + @Field(() => [ArticleWhereUniqueInput], { nullable: true }) + set?: Array; - @Field(() => [ArticleWhereUniqueInput], { nullable: true }) - disconnect?: Array; + @Field(() => [ArticleWhereUniqueInput], { nullable: true }) + disconnect?: Array; - @Field(() => [ArticleWhereUniqueInput], { nullable: true }) - delete?: Array; + @Field(() => [ArticleWhereUniqueInput], { nullable: true }) + delete?: Array; - @Field(() => [ArticleWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [ArticleWhereUniqueInput], { nullable: true }) + connect?: Array; - @Field(() => [ArticleUpdateWithWhereUniqueWithoutTagsInput], { nullable: true }) - update?: Array; + @Field(() => [ArticleUpdateWithWhereUniqueWithoutTagsInput], { nullable: true }) + update?: Array; - @Field(() => [ArticleUpdateManyWithWhereWithoutTagsInput], { nullable: true }) - updateMany?: Array; + @Field(() => [ArticleUpdateManyWithWhereWithoutTagsInput], { nullable: true }) + updateMany?: Array; - @Field(() => [ArticleScalarWhereInput], { nullable: true }) - deleteMany?: Array; + @Field(() => [ArticleScalarWhereInput], { nullable: true }) + deleteMany?: Array; } diff --git a/@generated/article/article-unchecked-update-many.input.ts b/@generated/article/article-unchecked-update-many.input.ts index ef0e4cc5..3ee82daa 100644 --- a/@generated/article/article-unchecked-update-many.input.ts +++ b/@generated/article/article-unchecked-update-many.input.ts @@ -7,33 +7,33 @@ import { NullableBoolFieldUpdateOperationsInput } from '../prisma/nullable-bool- @InputType() export class ArticleUncheckedUpdateManyInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - slug?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + slug?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - title?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + title?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - description?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + description?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - body?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + body?: StringFieldUpdateOperationsInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - createdAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + createdAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - updatedAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + updatedAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => IntFieldUpdateOperationsInput, { nullable: true }) - favoritesCount?: IntFieldUpdateOperationsInput; + @Field(() => IntFieldUpdateOperationsInput, { nullable: true }) + favoritesCount?: IntFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - authorId?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + authorId?: StringFieldUpdateOperationsInput; - @Field(() => NullableBoolFieldUpdateOperationsInput, { nullable: true }) - active?: NullableBoolFieldUpdateOperationsInput; + @Field(() => NullableBoolFieldUpdateOperationsInput, { nullable: true }) + active?: NullableBoolFieldUpdateOperationsInput; } diff --git a/@generated/article/article-unchecked-update-without-author.input.ts b/@generated/article/article-unchecked-update-without-author.input.ts index db5ee5e6..2d6cc1e4 100644 --- a/@generated/article/article-unchecked-update-without-author.input.ts +++ b/@generated/article/article-unchecked-update-without-author.input.ts @@ -10,41 +10,41 @@ import { NullableBoolFieldUpdateOperationsInput } from '../prisma/nullable-bool- @InputType() export class ArticleUncheckedUpdateWithoutAuthorInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - slug?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + slug?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - title?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + title?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - description?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + description?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - body?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + body?: StringFieldUpdateOperationsInput; - @Field(() => TagUncheckedUpdateManyWithoutArticlesInput, { nullable: true }) - tags?: TagUncheckedUpdateManyWithoutArticlesInput; + @Field(() => TagUncheckedUpdateManyWithoutArticlesInput, { nullable: true }) + tags?: TagUncheckedUpdateManyWithoutArticlesInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - createdAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + createdAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - updatedAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + updatedAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => IntFieldUpdateOperationsInput, { nullable: true }) - favoritesCount?: IntFieldUpdateOperationsInput; + @Field(() => IntFieldUpdateOperationsInput, { nullable: true }) + favoritesCount?: IntFieldUpdateOperationsInput; - @Field(() => UserUncheckedUpdateManyWithoutFavoriteArticlesInput, { - nullable: true, - }) - favoritedBy?: UserUncheckedUpdateManyWithoutFavoriteArticlesInput; + @Field(() => UserUncheckedUpdateManyWithoutFavoriteArticlesInput, { + nullable: true, + }) + favoritedBy?: UserUncheckedUpdateManyWithoutFavoriteArticlesInput; - @Field(() => CommentUncheckedUpdateManyWithoutArticleInput, { nullable: true }) - comments?: CommentUncheckedUpdateManyWithoutArticleInput; + @Field(() => CommentUncheckedUpdateManyWithoutArticleInput, { nullable: true }) + comments?: CommentUncheckedUpdateManyWithoutArticleInput; - @Field(() => NullableBoolFieldUpdateOperationsInput, { nullable: true }) - active?: NullableBoolFieldUpdateOperationsInput; + @Field(() => NullableBoolFieldUpdateOperationsInput, { nullable: true }) + active?: NullableBoolFieldUpdateOperationsInput; } diff --git a/@generated/article/article-unchecked-update-without-comments.input.ts b/@generated/article/article-unchecked-update-without-comments.input.ts index 7cc2daf5..0d93bb5e 100644 --- a/@generated/article/article-unchecked-update-without-comments.input.ts +++ b/@generated/article/article-unchecked-update-without-comments.input.ts @@ -9,41 +9,41 @@ import { NullableBoolFieldUpdateOperationsInput } from '../prisma/nullable-bool- @InputType() export class ArticleUncheckedUpdateWithoutCommentsInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - slug?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + slug?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - title?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + title?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - description?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + description?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - body?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + body?: StringFieldUpdateOperationsInput; - @Field(() => TagUncheckedUpdateManyWithoutArticlesInput, { nullable: true }) - tags?: TagUncheckedUpdateManyWithoutArticlesInput; + @Field(() => TagUncheckedUpdateManyWithoutArticlesInput, { nullable: true }) + tags?: TagUncheckedUpdateManyWithoutArticlesInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - createdAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + createdAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - updatedAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + updatedAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => IntFieldUpdateOperationsInput, { nullable: true }) - favoritesCount?: IntFieldUpdateOperationsInput; + @Field(() => IntFieldUpdateOperationsInput, { nullable: true }) + favoritesCount?: IntFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - authorId?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + authorId?: StringFieldUpdateOperationsInput; - @Field(() => UserUncheckedUpdateManyWithoutFavoriteArticlesInput, { - nullable: true, - }) - favoritedBy?: UserUncheckedUpdateManyWithoutFavoriteArticlesInput; + @Field(() => UserUncheckedUpdateManyWithoutFavoriteArticlesInput, { + nullable: true, + }) + favoritedBy?: UserUncheckedUpdateManyWithoutFavoriteArticlesInput; - @Field(() => NullableBoolFieldUpdateOperationsInput, { nullable: true }) - active?: NullableBoolFieldUpdateOperationsInput; + @Field(() => NullableBoolFieldUpdateOperationsInput, { nullable: true }) + active?: NullableBoolFieldUpdateOperationsInput; } diff --git a/@generated/article/article-unchecked-update-without-favorited-by.input.ts b/@generated/article/article-unchecked-update-without-favorited-by.input.ts index b256acb0..91193601 100644 --- a/@generated/article/article-unchecked-update-without-favorited-by.input.ts +++ b/@generated/article/article-unchecked-update-without-favorited-by.input.ts @@ -9,39 +9,39 @@ import { NullableBoolFieldUpdateOperationsInput } from '../prisma/nullable-bool- @InputType() export class ArticleUncheckedUpdateWithoutFavoritedByInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - slug?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + slug?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - title?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + title?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - description?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + description?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - body?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + body?: StringFieldUpdateOperationsInput; - @Field(() => TagUncheckedUpdateManyWithoutArticlesInput, { nullable: true }) - tags?: TagUncheckedUpdateManyWithoutArticlesInput; + @Field(() => TagUncheckedUpdateManyWithoutArticlesInput, { nullable: true }) + tags?: TagUncheckedUpdateManyWithoutArticlesInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - createdAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + createdAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - updatedAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + updatedAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => IntFieldUpdateOperationsInput, { nullable: true }) - favoritesCount?: IntFieldUpdateOperationsInput; + @Field(() => IntFieldUpdateOperationsInput, { nullable: true }) + favoritesCount?: IntFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - authorId?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + authorId?: StringFieldUpdateOperationsInput; - @Field(() => CommentUncheckedUpdateManyWithoutArticleInput, { nullable: true }) - comments?: CommentUncheckedUpdateManyWithoutArticleInput; + @Field(() => CommentUncheckedUpdateManyWithoutArticleInput, { nullable: true }) + comments?: CommentUncheckedUpdateManyWithoutArticleInput; - @Field(() => NullableBoolFieldUpdateOperationsInput, { nullable: true }) - active?: NullableBoolFieldUpdateOperationsInput; + @Field(() => NullableBoolFieldUpdateOperationsInput, { nullable: true }) + active?: NullableBoolFieldUpdateOperationsInput; } diff --git a/@generated/article/article-unchecked-update-without-tags.input.ts b/@generated/article/article-unchecked-update-without-tags.input.ts index f391d735..0f4da1ca 100644 --- a/@generated/article/article-unchecked-update-without-tags.input.ts +++ b/@generated/article/article-unchecked-update-without-tags.input.ts @@ -9,41 +9,41 @@ import { NullableBoolFieldUpdateOperationsInput } from '../prisma/nullable-bool- @InputType() export class ArticleUncheckedUpdateWithoutTagsInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - slug?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + slug?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - title?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + title?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - description?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + description?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - body?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + body?: StringFieldUpdateOperationsInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - createdAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + createdAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - updatedAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + updatedAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => IntFieldUpdateOperationsInput, { nullable: true }) - favoritesCount?: IntFieldUpdateOperationsInput; + @Field(() => IntFieldUpdateOperationsInput, { nullable: true }) + favoritesCount?: IntFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - authorId?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + authorId?: StringFieldUpdateOperationsInput; - @Field(() => UserUncheckedUpdateManyWithoutFavoriteArticlesInput, { - nullable: true, - }) - favoritedBy?: UserUncheckedUpdateManyWithoutFavoriteArticlesInput; + @Field(() => UserUncheckedUpdateManyWithoutFavoriteArticlesInput, { + nullable: true, + }) + favoritedBy?: UserUncheckedUpdateManyWithoutFavoriteArticlesInput; - @Field(() => CommentUncheckedUpdateManyWithoutArticleInput, { nullable: true }) - comments?: CommentUncheckedUpdateManyWithoutArticleInput; + @Field(() => CommentUncheckedUpdateManyWithoutArticleInput, { nullable: true }) + comments?: CommentUncheckedUpdateManyWithoutArticleInput; - @Field(() => NullableBoolFieldUpdateOperationsInput, { nullable: true }) - active?: NullableBoolFieldUpdateOperationsInput; + @Field(() => NullableBoolFieldUpdateOperationsInput, { nullable: true }) + active?: NullableBoolFieldUpdateOperationsInput; } diff --git a/@generated/article/article-unchecked-update.input.ts b/@generated/article/article-unchecked-update.input.ts index 8ead978d..b90c325c 100644 --- a/@generated/article/article-unchecked-update.input.ts +++ b/@generated/article/article-unchecked-update.input.ts @@ -10,44 +10,44 @@ import { NullableBoolFieldUpdateOperationsInput } from '../prisma/nullable-bool- @InputType() export class ArticleUncheckedUpdateInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - slug?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + slug?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - title?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + title?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - description?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + description?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - body?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + body?: StringFieldUpdateOperationsInput; - @Field(() => TagUncheckedUpdateManyWithoutArticlesInput, { nullable: true }) - tags?: TagUncheckedUpdateManyWithoutArticlesInput; + @Field(() => TagUncheckedUpdateManyWithoutArticlesInput, { nullable: true }) + tags?: TagUncheckedUpdateManyWithoutArticlesInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - createdAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + createdAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - updatedAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + updatedAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => IntFieldUpdateOperationsInput, { nullable: true }) - favoritesCount?: IntFieldUpdateOperationsInput; + @Field(() => IntFieldUpdateOperationsInput, { nullable: true }) + favoritesCount?: IntFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - authorId?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + authorId?: StringFieldUpdateOperationsInput; - @Field(() => UserUncheckedUpdateManyWithoutFavoriteArticlesInput, { - nullable: true, - }) - favoritedBy?: UserUncheckedUpdateManyWithoutFavoriteArticlesInput; + @Field(() => UserUncheckedUpdateManyWithoutFavoriteArticlesInput, { + nullable: true, + }) + favoritedBy?: UserUncheckedUpdateManyWithoutFavoriteArticlesInput; - @Field(() => CommentUncheckedUpdateManyWithoutArticleInput, { nullable: true }) - comments?: CommentUncheckedUpdateManyWithoutArticleInput; + @Field(() => CommentUncheckedUpdateManyWithoutArticleInput, { nullable: true }) + comments?: CommentUncheckedUpdateManyWithoutArticleInput; - @Field(() => NullableBoolFieldUpdateOperationsInput, { nullable: true }) - active?: NullableBoolFieldUpdateOperationsInput; + @Field(() => NullableBoolFieldUpdateOperationsInput, { nullable: true }) + active?: NullableBoolFieldUpdateOperationsInput; } diff --git a/@generated/article/article-update-many-mutation.input.ts b/@generated/article/article-update-many-mutation.input.ts index 0f2ea398..e45daa8f 100644 --- a/@generated/article/article-update-many-mutation.input.ts +++ b/@generated/article/article-update-many-mutation.input.ts @@ -7,30 +7,30 @@ import { NullableBoolFieldUpdateOperationsInput } from '../prisma/nullable-bool- @InputType() export class ArticleUpdateManyMutationInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - slug?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + slug?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - title?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + title?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - description?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + description?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - body?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + body?: StringFieldUpdateOperationsInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - createdAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + createdAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - updatedAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + updatedAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => IntFieldUpdateOperationsInput, { nullable: true }) - favoritesCount?: IntFieldUpdateOperationsInput; + @Field(() => IntFieldUpdateOperationsInput, { nullable: true }) + favoritesCount?: IntFieldUpdateOperationsInput; - @Field(() => NullableBoolFieldUpdateOperationsInput, { nullable: true }) - active?: NullableBoolFieldUpdateOperationsInput; + @Field(() => NullableBoolFieldUpdateOperationsInput, { nullable: true }) + active?: NullableBoolFieldUpdateOperationsInput; } diff --git a/@generated/article/article-update-many-with-where-without-author.input.ts b/@generated/article/article-update-many-with-where-without-author.input.ts index a3d8af68..f3135636 100644 --- a/@generated/article/article-update-many-with-where-without-author.input.ts +++ b/@generated/article/article-update-many-with-where-without-author.input.ts @@ -5,9 +5,9 @@ import { ArticleUpdateManyMutationInput } from './article-update-many-mutation.i @InputType() export class ArticleUpdateManyWithWhereWithoutAuthorInput { - @Field(() => ArticleScalarWhereInput, { nullable: false }) - where!: ArticleScalarWhereInput; + @Field(() => ArticleScalarWhereInput, { nullable: false }) + where!: ArticleScalarWhereInput; - @Field(() => ArticleUpdateManyMutationInput, { nullable: false }) - data!: ArticleUpdateManyMutationInput; + @Field(() => ArticleUpdateManyMutationInput, { nullable: false }) + data!: ArticleUpdateManyMutationInput; } diff --git a/@generated/article/article-update-many-with-where-without-favorited-by.input.ts b/@generated/article/article-update-many-with-where-without-favorited-by.input.ts index 631f1ae5..c2c3fc70 100644 --- a/@generated/article/article-update-many-with-where-without-favorited-by.input.ts +++ b/@generated/article/article-update-many-with-where-without-favorited-by.input.ts @@ -5,9 +5,9 @@ import { ArticleUpdateManyMutationInput } from './article-update-many-mutation.i @InputType() export class ArticleUpdateManyWithWhereWithoutFavoritedByInput { - @Field(() => ArticleScalarWhereInput, { nullable: false }) - where!: ArticleScalarWhereInput; + @Field(() => ArticleScalarWhereInput, { nullable: false }) + where!: ArticleScalarWhereInput; - @Field(() => ArticleUpdateManyMutationInput, { nullable: false }) - data!: ArticleUpdateManyMutationInput; + @Field(() => ArticleUpdateManyMutationInput, { nullable: false }) + data!: ArticleUpdateManyMutationInput; } diff --git a/@generated/article/article-update-many-with-where-without-tags.input.ts b/@generated/article/article-update-many-with-where-without-tags.input.ts index 303bae65..d9dbacd7 100644 --- a/@generated/article/article-update-many-with-where-without-tags.input.ts +++ b/@generated/article/article-update-many-with-where-without-tags.input.ts @@ -5,9 +5,9 @@ import { ArticleUpdateManyMutationInput } from './article-update-many-mutation.i @InputType() export class ArticleUpdateManyWithWhereWithoutTagsInput { - @Field(() => ArticleScalarWhereInput, { nullable: false }) - where!: ArticleScalarWhereInput; + @Field(() => ArticleScalarWhereInput, { nullable: false }) + where!: ArticleScalarWhereInput; - @Field(() => ArticleUpdateManyMutationInput, { nullable: false }) - data!: ArticleUpdateManyMutationInput; + @Field(() => ArticleUpdateManyMutationInput, { nullable: false }) + data!: ArticleUpdateManyMutationInput; } diff --git a/@generated/article/article-update-many-without-author.input.ts b/@generated/article/article-update-many-without-author.input.ts index 1a210ffc..af27a41e 100644 --- a/@generated/article/article-update-many-without-author.input.ts +++ b/@generated/article/article-update-many-without-author.input.ts @@ -11,36 +11,36 @@ import { ArticleScalarWhereInput } from './article-scalar-where.input'; @InputType() export class ArticleUpdateManyWithoutAuthorInput { - @Field(() => [ArticleCreateWithoutAuthorInput], { nullable: true }) - create?: Array; + @Field(() => [ArticleCreateWithoutAuthorInput], { nullable: true }) + create?: Array; - @Field(() => [ArticleCreateOrConnectWithoutAuthorInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [ArticleCreateOrConnectWithoutAuthorInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => [ArticleUpsertWithWhereUniqueWithoutAuthorInput], { nullable: true }) - upsert?: Array; + @Field(() => [ArticleUpsertWithWhereUniqueWithoutAuthorInput], { nullable: true }) + upsert?: Array; - @Field(() => ArticleCreateManyAuthorInputEnvelope, { nullable: true }) - createMany?: ArticleCreateManyAuthorInputEnvelope; + @Field(() => ArticleCreateManyAuthorInputEnvelope, { nullable: true }) + createMany?: ArticleCreateManyAuthorInputEnvelope; - @Field(() => [ArticleWhereUniqueInput], { nullable: true }) - set?: Array; + @Field(() => [ArticleWhereUniqueInput], { nullable: true }) + set?: Array; - @Field(() => [ArticleWhereUniqueInput], { nullable: true }) - disconnect?: Array; + @Field(() => [ArticleWhereUniqueInput], { nullable: true }) + disconnect?: Array; - @Field(() => [ArticleWhereUniqueInput], { nullable: true }) - delete?: Array; + @Field(() => [ArticleWhereUniqueInput], { nullable: true }) + delete?: Array; - @Field(() => [ArticleWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [ArticleWhereUniqueInput], { nullable: true }) + connect?: Array; - @Field(() => [ArticleUpdateWithWhereUniqueWithoutAuthorInput], { nullable: true }) - update?: Array; + @Field(() => [ArticleUpdateWithWhereUniqueWithoutAuthorInput], { nullable: true }) + update?: Array; - @Field(() => [ArticleUpdateManyWithWhereWithoutAuthorInput], { nullable: true }) - updateMany?: Array; + @Field(() => [ArticleUpdateManyWithWhereWithoutAuthorInput], { nullable: true }) + updateMany?: Array; - @Field(() => [ArticleScalarWhereInput], { nullable: true }) - deleteMany?: Array; + @Field(() => [ArticleScalarWhereInput], { nullable: true }) + deleteMany?: Array; } diff --git a/@generated/article/article-update-many-without-favorited-by.input.ts b/@generated/article/article-update-many-without-favorited-by.input.ts index c75c9786..ba2ad532 100644 --- a/@generated/article/article-update-many-without-favorited-by.input.ts +++ b/@generated/article/article-update-many-without-favorited-by.input.ts @@ -10,39 +10,39 @@ import { ArticleScalarWhereInput } from './article-scalar-where.input'; @InputType() export class ArticleUpdateManyWithoutFavoritedByInput { - @Field(() => [ArticleCreateWithoutFavoritedByInput], { nullable: true }) - create?: Array; + @Field(() => [ArticleCreateWithoutFavoritedByInput], { nullable: true }) + create?: Array; - @Field(() => [ArticleCreateOrConnectWithoutFavoritedByInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [ArticleCreateOrConnectWithoutFavoritedByInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => [ArticleUpsertWithWhereUniqueWithoutFavoritedByInput], { - nullable: true, - }) - upsert?: Array; + @Field(() => [ArticleUpsertWithWhereUniqueWithoutFavoritedByInput], { + nullable: true, + }) + upsert?: Array; - @Field(() => [ArticleWhereUniqueInput], { nullable: true }) - set?: Array; + @Field(() => [ArticleWhereUniqueInput], { nullable: true }) + set?: Array; - @Field(() => [ArticleWhereUniqueInput], { nullable: true }) - disconnect?: Array; + @Field(() => [ArticleWhereUniqueInput], { nullable: true }) + disconnect?: Array; - @Field(() => [ArticleWhereUniqueInput], { nullable: true }) - delete?: Array; + @Field(() => [ArticleWhereUniqueInput], { nullable: true }) + delete?: Array; - @Field(() => [ArticleWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [ArticleWhereUniqueInput], { nullable: true }) + connect?: Array; - @Field(() => [ArticleUpdateWithWhereUniqueWithoutFavoritedByInput], { - nullable: true, - }) - update?: Array; + @Field(() => [ArticleUpdateWithWhereUniqueWithoutFavoritedByInput], { + nullable: true, + }) + update?: Array; - @Field(() => [ArticleUpdateManyWithWhereWithoutFavoritedByInput], { - nullable: true, - }) - updateMany?: Array; + @Field(() => [ArticleUpdateManyWithWhereWithoutFavoritedByInput], { + nullable: true, + }) + updateMany?: Array; - @Field(() => [ArticleScalarWhereInput], { nullable: true }) - deleteMany?: Array; + @Field(() => [ArticleScalarWhereInput], { nullable: true }) + deleteMany?: Array; } diff --git a/@generated/article/article-update-many-without-tags.input.ts b/@generated/article/article-update-many-without-tags.input.ts index 61179149..7bee512f 100644 --- a/@generated/article/article-update-many-without-tags.input.ts +++ b/@generated/article/article-update-many-without-tags.input.ts @@ -10,33 +10,33 @@ import { ArticleScalarWhereInput } from './article-scalar-where.input'; @InputType() export class ArticleUpdateManyWithoutTagsInput { - @Field(() => [ArticleCreateWithoutTagsInput], { nullable: true }) - create?: Array; + @Field(() => [ArticleCreateWithoutTagsInput], { nullable: true }) + create?: Array; - @Field(() => [ArticleCreateOrConnectWithoutTagsInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [ArticleCreateOrConnectWithoutTagsInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => [ArticleUpsertWithWhereUniqueWithoutTagsInput], { nullable: true }) - upsert?: Array; + @Field(() => [ArticleUpsertWithWhereUniqueWithoutTagsInput], { nullable: true }) + upsert?: Array; - @Field(() => [ArticleWhereUniqueInput], { nullable: true }) - set?: Array; + @Field(() => [ArticleWhereUniqueInput], { nullable: true }) + set?: Array; - @Field(() => [ArticleWhereUniqueInput], { nullable: true }) - disconnect?: Array; + @Field(() => [ArticleWhereUniqueInput], { nullable: true }) + disconnect?: Array; - @Field(() => [ArticleWhereUniqueInput], { nullable: true }) - delete?: Array; + @Field(() => [ArticleWhereUniqueInput], { nullable: true }) + delete?: Array; - @Field(() => [ArticleWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [ArticleWhereUniqueInput], { nullable: true }) + connect?: Array; - @Field(() => [ArticleUpdateWithWhereUniqueWithoutTagsInput], { nullable: true }) - update?: Array; + @Field(() => [ArticleUpdateWithWhereUniqueWithoutTagsInput], { nullable: true }) + update?: Array; - @Field(() => [ArticleUpdateManyWithWhereWithoutTagsInput], { nullable: true }) - updateMany?: Array; + @Field(() => [ArticleUpdateManyWithWhereWithoutTagsInput], { nullable: true }) + updateMany?: Array; - @Field(() => [ArticleScalarWhereInput], { nullable: true }) - deleteMany?: Array; + @Field(() => [ArticleScalarWhereInput], { nullable: true }) + deleteMany?: Array; } diff --git a/@generated/article/article-update-one-without-comments.input.ts b/@generated/article/article-update-one-without-comments.input.ts index e9a57206..98d84d9e 100644 --- a/@generated/article/article-update-one-without-comments.input.ts +++ b/@generated/article/article-update-one-without-comments.input.ts @@ -8,24 +8,24 @@ import { ArticleUpdateWithoutCommentsInput } from './article-update-without-comm @InputType() export class ArticleUpdateOneWithoutCommentsInput { - @Field(() => ArticleCreateWithoutCommentsInput, { nullable: true }) - create?: ArticleCreateWithoutCommentsInput; + @Field(() => ArticleCreateWithoutCommentsInput, { nullable: true }) + create?: ArticleCreateWithoutCommentsInput; - @Field(() => ArticleCreateOrConnectWithoutCommentsInput, { nullable: true }) - connectOrCreate?: ArticleCreateOrConnectWithoutCommentsInput; + @Field(() => ArticleCreateOrConnectWithoutCommentsInput, { nullable: true }) + connectOrCreate?: ArticleCreateOrConnectWithoutCommentsInput; - @Field(() => ArticleUpsertWithoutCommentsInput, { nullable: true }) - upsert?: ArticleUpsertWithoutCommentsInput; + @Field(() => ArticleUpsertWithoutCommentsInput, { nullable: true }) + upsert?: ArticleUpsertWithoutCommentsInput; - @Field(() => Boolean, { nullable: true }) - disconnect?: boolean; + @Field(() => Boolean, { nullable: true }) + disconnect?: boolean; - @Field(() => Boolean, { nullable: true }) - delete?: boolean; + @Field(() => Boolean, { nullable: true }) + delete?: boolean; - @Field(() => ArticleWhereUniqueInput, { nullable: true }) - connect?: ArticleWhereUniqueInput; + @Field(() => ArticleWhereUniqueInput, { nullable: true }) + connect?: ArticleWhereUniqueInput; - @Field(() => ArticleUpdateWithoutCommentsInput, { nullable: true }) - update?: ArticleUpdateWithoutCommentsInput; + @Field(() => ArticleUpdateWithoutCommentsInput, { nullable: true }) + update?: ArticleUpdateWithoutCommentsInput; } diff --git a/@generated/article/article-update-with-where-unique-without-author.input.ts b/@generated/article/article-update-with-where-unique-without-author.input.ts index 236ca5d8..53e5b65a 100644 --- a/@generated/article/article-update-with-where-unique-without-author.input.ts +++ b/@generated/article/article-update-with-where-unique-without-author.input.ts @@ -5,9 +5,9 @@ import { ArticleUpdateWithoutAuthorInput } from './article-update-without-author @InputType() export class ArticleUpdateWithWhereUniqueWithoutAuthorInput { - @Field(() => ArticleWhereUniqueInput, { nullable: false }) - where!: ArticleWhereUniqueInput; + @Field(() => ArticleWhereUniqueInput, { nullable: false }) + where!: ArticleWhereUniqueInput; - @Field(() => ArticleUpdateWithoutAuthorInput, { nullable: false }) - data!: ArticleUpdateWithoutAuthorInput; + @Field(() => ArticleUpdateWithoutAuthorInput, { nullable: false }) + data!: ArticleUpdateWithoutAuthorInput; } diff --git a/@generated/article/article-update-with-where-unique-without-favorited-by.input.ts b/@generated/article/article-update-with-where-unique-without-favorited-by.input.ts index 1d8ab1ad..1e463458 100644 --- a/@generated/article/article-update-with-where-unique-without-favorited-by.input.ts +++ b/@generated/article/article-update-with-where-unique-without-favorited-by.input.ts @@ -5,9 +5,9 @@ import { ArticleUpdateWithoutFavoritedByInput } from './article-update-without-f @InputType() export class ArticleUpdateWithWhereUniqueWithoutFavoritedByInput { - @Field(() => ArticleWhereUniqueInput, { nullable: false }) - where!: ArticleWhereUniqueInput; + @Field(() => ArticleWhereUniqueInput, { nullable: false }) + where!: ArticleWhereUniqueInput; - @Field(() => ArticleUpdateWithoutFavoritedByInput, { nullable: false }) - data!: ArticleUpdateWithoutFavoritedByInput; + @Field(() => ArticleUpdateWithoutFavoritedByInput, { nullable: false }) + data!: ArticleUpdateWithoutFavoritedByInput; } diff --git a/@generated/article/article-update-with-where-unique-without-tags.input.ts b/@generated/article/article-update-with-where-unique-without-tags.input.ts index 714933d4..7cc30e09 100644 --- a/@generated/article/article-update-with-where-unique-without-tags.input.ts +++ b/@generated/article/article-update-with-where-unique-without-tags.input.ts @@ -5,9 +5,9 @@ import { ArticleUpdateWithoutTagsInput } from './article-update-without-tags.inp @InputType() export class ArticleUpdateWithWhereUniqueWithoutTagsInput { - @Field(() => ArticleWhereUniqueInput, { nullable: false }) - where!: ArticleWhereUniqueInput; + @Field(() => ArticleWhereUniqueInput, { nullable: false }) + where!: ArticleWhereUniqueInput; - @Field(() => ArticleUpdateWithoutTagsInput, { nullable: false }) - data!: ArticleUpdateWithoutTagsInput; + @Field(() => ArticleUpdateWithoutTagsInput, { nullable: false }) + data!: ArticleUpdateWithoutTagsInput; } diff --git a/@generated/article/article-update-without-author.input.ts b/@generated/article/article-update-without-author.input.ts index 8a1cbc79..ada61b33 100644 --- a/@generated/article/article-update-without-author.input.ts +++ b/@generated/article/article-update-without-author.input.ts @@ -10,39 +10,39 @@ import { NullableBoolFieldUpdateOperationsInput } from '../prisma/nullable-bool- @InputType() export class ArticleUpdateWithoutAuthorInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - slug?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + slug?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - title?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + title?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - description?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + description?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - body?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + body?: StringFieldUpdateOperationsInput; - @Field(() => TagUpdateManyWithoutArticlesInput, { nullable: true }) - tags?: TagUpdateManyWithoutArticlesInput; + @Field(() => TagUpdateManyWithoutArticlesInput, { nullable: true }) + tags?: TagUpdateManyWithoutArticlesInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - createdAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + createdAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - updatedAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + updatedAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => IntFieldUpdateOperationsInput, { nullable: true }) - favoritesCount?: IntFieldUpdateOperationsInput; + @Field(() => IntFieldUpdateOperationsInput, { nullable: true }) + favoritesCount?: IntFieldUpdateOperationsInput; - @Field(() => UserUpdateManyWithoutFavoriteArticlesInput, { nullable: true }) - favoritedBy?: UserUpdateManyWithoutFavoriteArticlesInput; + @Field(() => UserUpdateManyWithoutFavoriteArticlesInput, { nullable: true }) + favoritedBy?: UserUpdateManyWithoutFavoriteArticlesInput; - @Field(() => CommentUpdateManyWithoutArticleInput, { nullable: true }) - comments?: CommentUpdateManyWithoutArticleInput; + @Field(() => CommentUpdateManyWithoutArticleInput, { nullable: true }) + comments?: CommentUpdateManyWithoutArticleInput; - @Field(() => NullableBoolFieldUpdateOperationsInput, { nullable: true }) - active?: NullableBoolFieldUpdateOperationsInput; + @Field(() => NullableBoolFieldUpdateOperationsInput, { nullable: true }) + active?: NullableBoolFieldUpdateOperationsInput; } diff --git a/@generated/article/article-update-without-comments.input.ts b/@generated/article/article-update-without-comments.input.ts index 655378cd..8a5772c8 100644 --- a/@generated/article/article-update-without-comments.input.ts +++ b/@generated/article/article-update-without-comments.input.ts @@ -10,39 +10,39 @@ import { NullableBoolFieldUpdateOperationsInput } from '../prisma/nullable-bool- @InputType() export class ArticleUpdateWithoutCommentsInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - slug?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + slug?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - title?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + title?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - description?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + description?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - body?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + body?: StringFieldUpdateOperationsInput; - @Field(() => TagUpdateManyWithoutArticlesInput, { nullable: true }) - tags?: TagUpdateManyWithoutArticlesInput; + @Field(() => TagUpdateManyWithoutArticlesInput, { nullable: true }) + tags?: TagUpdateManyWithoutArticlesInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - createdAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + createdAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - updatedAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + updatedAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => IntFieldUpdateOperationsInput, { nullable: true }) - favoritesCount?: IntFieldUpdateOperationsInput; + @Field(() => IntFieldUpdateOperationsInput, { nullable: true }) + favoritesCount?: IntFieldUpdateOperationsInput; - @Field(() => UserUpdateOneRequiredWithoutArticlesInput, { nullable: true }) - author?: UserUpdateOneRequiredWithoutArticlesInput; + @Field(() => UserUpdateOneRequiredWithoutArticlesInput, { nullable: true }) + author?: UserUpdateOneRequiredWithoutArticlesInput; - @Field(() => UserUpdateManyWithoutFavoriteArticlesInput, { nullable: true }) - favoritedBy?: UserUpdateManyWithoutFavoriteArticlesInput; + @Field(() => UserUpdateManyWithoutFavoriteArticlesInput, { nullable: true }) + favoritedBy?: UserUpdateManyWithoutFavoriteArticlesInput; - @Field(() => NullableBoolFieldUpdateOperationsInput, { nullable: true }) - active?: NullableBoolFieldUpdateOperationsInput; + @Field(() => NullableBoolFieldUpdateOperationsInput, { nullable: true }) + active?: NullableBoolFieldUpdateOperationsInput; } diff --git a/@generated/article/article-update-without-favorited-by.input.ts b/@generated/article/article-update-without-favorited-by.input.ts index f536f354..1026efb8 100644 --- a/@generated/article/article-update-without-favorited-by.input.ts +++ b/@generated/article/article-update-without-favorited-by.input.ts @@ -10,39 +10,39 @@ import { NullableBoolFieldUpdateOperationsInput } from '../prisma/nullable-bool- @InputType() export class ArticleUpdateWithoutFavoritedByInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - slug?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + slug?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - title?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + title?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - description?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + description?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - body?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + body?: StringFieldUpdateOperationsInput; - @Field(() => TagUpdateManyWithoutArticlesInput, { nullable: true }) - tags?: TagUpdateManyWithoutArticlesInput; + @Field(() => TagUpdateManyWithoutArticlesInput, { nullable: true }) + tags?: TagUpdateManyWithoutArticlesInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - createdAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + createdAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - updatedAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + updatedAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => IntFieldUpdateOperationsInput, { nullable: true }) - favoritesCount?: IntFieldUpdateOperationsInput; + @Field(() => IntFieldUpdateOperationsInput, { nullable: true }) + favoritesCount?: IntFieldUpdateOperationsInput; - @Field(() => UserUpdateOneRequiredWithoutArticlesInput, { nullable: true }) - author?: UserUpdateOneRequiredWithoutArticlesInput; + @Field(() => UserUpdateOneRequiredWithoutArticlesInput, { nullable: true }) + author?: UserUpdateOneRequiredWithoutArticlesInput; - @Field(() => CommentUpdateManyWithoutArticleInput, { nullable: true }) - comments?: CommentUpdateManyWithoutArticleInput; + @Field(() => CommentUpdateManyWithoutArticleInput, { nullable: true }) + comments?: CommentUpdateManyWithoutArticleInput; - @Field(() => NullableBoolFieldUpdateOperationsInput, { nullable: true }) - active?: NullableBoolFieldUpdateOperationsInput; + @Field(() => NullableBoolFieldUpdateOperationsInput, { nullable: true }) + active?: NullableBoolFieldUpdateOperationsInput; } diff --git a/@generated/article/article-update-without-tags.input.ts b/@generated/article/article-update-without-tags.input.ts index f9bbb523..13be0751 100644 --- a/@generated/article/article-update-without-tags.input.ts +++ b/@generated/article/article-update-without-tags.input.ts @@ -10,39 +10,39 @@ import { NullableBoolFieldUpdateOperationsInput } from '../prisma/nullable-bool- @InputType() export class ArticleUpdateWithoutTagsInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - slug?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + slug?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - title?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + title?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - description?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + description?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - body?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + body?: StringFieldUpdateOperationsInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - createdAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + createdAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - updatedAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + updatedAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => IntFieldUpdateOperationsInput, { nullable: true }) - favoritesCount?: IntFieldUpdateOperationsInput; + @Field(() => IntFieldUpdateOperationsInput, { nullable: true }) + favoritesCount?: IntFieldUpdateOperationsInput; - @Field(() => UserUpdateOneRequiredWithoutArticlesInput, { nullable: true }) - author?: UserUpdateOneRequiredWithoutArticlesInput; + @Field(() => UserUpdateOneRequiredWithoutArticlesInput, { nullable: true }) + author?: UserUpdateOneRequiredWithoutArticlesInput; - @Field(() => UserUpdateManyWithoutFavoriteArticlesInput, { nullable: true }) - favoritedBy?: UserUpdateManyWithoutFavoriteArticlesInput; + @Field(() => UserUpdateManyWithoutFavoriteArticlesInput, { nullable: true }) + favoritedBy?: UserUpdateManyWithoutFavoriteArticlesInput; - @Field(() => CommentUpdateManyWithoutArticleInput, { nullable: true }) - comments?: CommentUpdateManyWithoutArticleInput; + @Field(() => CommentUpdateManyWithoutArticleInput, { nullable: true }) + comments?: CommentUpdateManyWithoutArticleInput; - @Field(() => NullableBoolFieldUpdateOperationsInput, { nullable: true }) - active?: NullableBoolFieldUpdateOperationsInput; + @Field(() => NullableBoolFieldUpdateOperationsInput, { nullable: true }) + active?: NullableBoolFieldUpdateOperationsInput; } diff --git a/@generated/article/article-update.input.ts b/@generated/article/article-update.input.ts index 4d698c53..511853f7 100644 --- a/@generated/article/article-update.input.ts +++ b/@generated/article/article-update.input.ts @@ -11,42 +11,42 @@ import { NullableBoolFieldUpdateOperationsInput } from '../prisma/nullable-bool- @InputType() export class ArticleUpdateInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - slug?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + slug?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - title?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + title?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - description?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + description?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - body?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + body?: StringFieldUpdateOperationsInput; - @Field(() => TagUpdateManyWithoutArticlesInput, { nullable: true }) - tags?: TagUpdateManyWithoutArticlesInput; + @Field(() => TagUpdateManyWithoutArticlesInput, { nullable: true }) + tags?: TagUpdateManyWithoutArticlesInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - createdAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + createdAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - updatedAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + updatedAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => IntFieldUpdateOperationsInput, { nullable: true }) - favoritesCount?: IntFieldUpdateOperationsInput; + @Field(() => IntFieldUpdateOperationsInput, { nullable: true }) + favoritesCount?: IntFieldUpdateOperationsInput; - @Field(() => UserUpdateOneRequiredWithoutArticlesInput, { nullable: true }) - author?: UserUpdateOneRequiredWithoutArticlesInput; + @Field(() => UserUpdateOneRequiredWithoutArticlesInput, { nullable: true }) + author?: UserUpdateOneRequiredWithoutArticlesInput; - @Field(() => UserUpdateManyWithoutFavoriteArticlesInput, { nullable: true }) - favoritedBy?: UserUpdateManyWithoutFavoriteArticlesInput; + @Field(() => UserUpdateManyWithoutFavoriteArticlesInput, { nullable: true }) + favoritedBy?: UserUpdateManyWithoutFavoriteArticlesInput; - @Field(() => CommentUpdateManyWithoutArticleInput, { nullable: true }) - comments?: CommentUpdateManyWithoutArticleInput; + @Field(() => CommentUpdateManyWithoutArticleInput, { nullable: true }) + comments?: CommentUpdateManyWithoutArticleInput; - @Field(() => NullableBoolFieldUpdateOperationsInput, { nullable: true }) - active?: NullableBoolFieldUpdateOperationsInput; + @Field(() => NullableBoolFieldUpdateOperationsInput, { nullable: true }) + active?: NullableBoolFieldUpdateOperationsInput; } diff --git a/@generated/article/article-upsert-with-where-unique-without-author.input.ts b/@generated/article/article-upsert-with-where-unique-without-author.input.ts index b46c6e23..e8aa16ca 100644 --- a/@generated/article/article-upsert-with-where-unique-without-author.input.ts +++ b/@generated/article/article-upsert-with-where-unique-without-author.input.ts @@ -6,12 +6,12 @@ import { ArticleCreateWithoutAuthorInput } from './article-create-without-author @InputType() export class ArticleUpsertWithWhereUniqueWithoutAuthorInput { - @Field(() => ArticleWhereUniqueInput, { nullable: false }) - where!: ArticleWhereUniqueInput; + @Field(() => ArticleWhereUniqueInput, { nullable: false }) + where!: ArticleWhereUniqueInput; - @Field(() => ArticleUpdateWithoutAuthorInput, { nullable: false }) - update!: ArticleUpdateWithoutAuthorInput; + @Field(() => ArticleUpdateWithoutAuthorInput, { nullable: false }) + update!: ArticleUpdateWithoutAuthorInput; - @Field(() => ArticleCreateWithoutAuthorInput, { nullable: false }) - create!: ArticleCreateWithoutAuthorInput; + @Field(() => ArticleCreateWithoutAuthorInput, { nullable: false }) + create!: ArticleCreateWithoutAuthorInput; } diff --git a/@generated/article/article-upsert-with-where-unique-without-favorited-by.input.ts b/@generated/article/article-upsert-with-where-unique-without-favorited-by.input.ts index 826abba4..27a7b8cf 100644 --- a/@generated/article/article-upsert-with-where-unique-without-favorited-by.input.ts +++ b/@generated/article/article-upsert-with-where-unique-without-favorited-by.input.ts @@ -6,12 +6,12 @@ import { ArticleCreateWithoutFavoritedByInput } from './article-create-without-f @InputType() export class ArticleUpsertWithWhereUniqueWithoutFavoritedByInput { - @Field(() => ArticleWhereUniqueInput, { nullable: false }) - where!: ArticleWhereUniqueInput; + @Field(() => ArticleWhereUniqueInput, { nullable: false }) + where!: ArticleWhereUniqueInput; - @Field(() => ArticleUpdateWithoutFavoritedByInput, { nullable: false }) - update!: ArticleUpdateWithoutFavoritedByInput; + @Field(() => ArticleUpdateWithoutFavoritedByInput, { nullable: false }) + update!: ArticleUpdateWithoutFavoritedByInput; - @Field(() => ArticleCreateWithoutFavoritedByInput, { nullable: false }) - create!: ArticleCreateWithoutFavoritedByInput; + @Field(() => ArticleCreateWithoutFavoritedByInput, { nullable: false }) + create!: ArticleCreateWithoutFavoritedByInput; } diff --git a/@generated/article/article-upsert-with-where-unique-without-tags.input.ts b/@generated/article/article-upsert-with-where-unique-without-tags.input.ts index 39b2a4ca..ae4bbdc5 100644 --- a/@generated/article/article-upsert-with-where-unique-without-tags.input.ts +++ b/@generated/article/article-upsert-with-where-unique-without-tags.input.ts @@ -6,12 +6,12 @@ import { ArticleCreateWithoutTagsInput } from './article-create-without-tags.inp @InputType() export class ArticleUpsertWithWhereUniqueWithoutTagsInput { - @Field(() => ArticleWhereUniqueInput, { nullable: false }) - where!: ArticleWhereUniqueInput; + @Field(() => ArticleWhereUniqueInput, { nullable: false }) + where!: ArticleWhereUniqueInput; - @Field(() => ArticleUpdateWithoutTagsInput, { nullable: false }) - update!: ArticleUpdateWithoutTagsInput; + @Field(() => ArticleUpdateWithoutTagsInput, { nullable: false }) + update!: ArticleUpdateWithoutTagsInput; - @Field(() => ArticleCreateWithoutTagsInput, { nullable: false }) - create!: ArticleCreateWithoutTagsInput; + @Field(() => ArticleCreateWithoutTagsInput, { nullable: false }) + create!: ArticleCreateWithoutTagsInput; } diff --git a/@generated/article/article-upsert-without-comments.input.ts b/@generated/article/article-upsert-without-comments.input.ts index 66834018..e75a34db 100644 --- a/@generated/article/article-upsert-without-comments.input.ts +++ b/@generated/article/article-upsert-without-comments.input.ts @@ -5,9 +5,9 @@ import { ArticleCreateWithoutCommentsInput } from './article-create-without-comm @InputType() export class ArticleUpsertWithoutCommentsInput { - @Field(() => ArticleUpdateWithoutCommentsInput, { nullable: false }) - update!: ArticleUpdateWithoutCommentsInput; + @Field(() => ArticleUpdateWithoutCommentsInput, { nullable: false }) + update!: ArticleUpdateWithoutCommentsInput; - @Field(() => ArticleCreateWithoutCommentsInput, { nullable: false }) - create!: ArticleCreateWithoutCommentsInput; + @Field(() => ArticleCreateWithoutCommentsInput, { nullable: false }) + create!: ArticleCreateWithoutCommentsInput; } diff --git a/@generated/article/article-where-unique.input.ts b/@generated/article/article-where-unique.input.ts index 7a1acfaf..5f0100b1 100644 --- a/@generated/article/article-where-unique.input.ts +++ b/@generated/article/article-where-unique.input.ts @@ -3,9 +3,9 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class ArticleWhereUniqueInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => String, { nullable: true }) - slug?: string; + @Field(() => String, { nullable: true }) + slug?: string; } diff --git a/@generated/article/article-where.input.ts b/@generated/article/article-where.input.ts index 30916edd..e4944f76 100644 --- a/@generated/article/article-where.input.ts +++ b/@generated/article/article-where.input.ts @@ -11,54 +11,54 @@ import { BoolNullableFilter } from '../prisma/bool-nullable-filter.input'; @InputType() export class ArticleWhereInput { - @Field(() => [ArticleWhereInput], { nullable: true }) - AND?: Array; + @Field(() => [ArticleWhereInput], { nullable: true }) + AND?: Array; - @Field(() => [ArticleWhereInput], { nullable: true }) - OR?: Array; + @Field(() => [ArticleWhereInput], { nullable: true }) + OR?: Array; - @Field(() => [ArticleWhereInput], { nullable: true }) - NOT?: Array; + @Field(() => [ArticleWhereInput], { nullable: true }) + NOT?: Array; - @Field(() => StringFilter, { nullable: true }) - id?: StringFilter; + @Field(() => StringFilter, { nullable: true }) + id?: StringFilter; - @Field(() => StringFilter, { nullable: true }) - slug?: StringFilter; + @Field(() => StringFilter, { nullable: true }) + slug?: StringFilter; - @Field(() => StringFilter, { nullable: true }) - title?: StringFilter; + @Field(() => StringFilter, { nullable: true }) + title?: StringFilter; - @Field(() => StringFilter, { nullable: true }) - description?: StringFilter; + @Field(() => StringFilter, { nullable: true }) + description?: StringFilter; - @Field(() => StringFilter, { nullable: true }) - body?: StringFilter; + @Field(() => StringFilter, { nullable: true }) + body?: StringFilter; - @Field(() => TagListRelationFilter, { nullable: true }) - tags?: TagListRelationFilter; + @Field(() => TagListRelationFilter, { nullable: true }) + tags?: TagListRelationFilter; - @Field(() => DateTimeFilter, { nullable: true }) - createdAt?: DateTimeFilter; + @Field(() => DateTimeFilter, { nullable: true }) + createdAt?: DateTimeFilter; - @Field(() => DateTimeFilter, { nullable: true }) - updatedAt?: DateTimeFilter; + @Field(() => DateTimeFilter, { nullable: true }) + updatedAt?: DateTimeFilter; - @Field(() => IntFilter, { nullable: true }) - favoritesCount?: IntFilter; + @Field(() => IntFilter, { nullable: true }) + favoritesCount?: IntFilter; - @Field(() => UserWhereInput, { nullable: true }) - author?: UserWhereInput; + @Field(() => UserWhereInput, { nullable: true }) + author?: UserWhereInput; - @Field(() => StringFilter, { nullable: true }) - authorId?: StringFilter; + @Field(() => StringFilter, { nullable: true }) + authorId?: StringFilter; - @Field(() => UserListRelationFilter, { nullable: true }) - favoritedBy?: UserListRelationFilter; + @Field(() => UserListRelationFilter, { nullable: true }) + favoritedBy?: UserListRelationFilter; - @Field(() => CommentListRelationFilter, { nullable: true }) - comments?: CommentListRelationFilter; + @Field(() => CommentListRelationFilter, { nullable: true }) + comments?: CommentListRelationFilter; - @Field(() => BoolNullableFilter, { nullable: true }) - active?: BoolNullableFilter; + @Field(() => BoolNullableFilter, { nullable: true }) + active?: BoolNullableFilter; } diff --git a/@generated/article/article.model.ts b/@generated/article/article.model.ts index 15f02223..72396a1d 100644 --- a/@generated/article/article.model.ts +++ b/@generated/article/article.model.ts @@ -9,48 +9,48 @@ import { ArticleCount } from './article-count.output'; @ObjectType() export class Article { - @Field(() => ID, { nullable: false }) - id!: string; + @Field(() => ID, { nullable: false }) + id!: string; - @Field(() => String, { nullable: false }) - slug!: string; + @Field(() => String, { nullable: false }) + slug!: string; - @Field(() => String, { nullable: false }) - title!: string; + @Field(() => String, { nullable: false }) + title!: string; - @Field(() => String, { nullable: false }) - description!: string; + @Field(() => String, { nullable: false }) + description!: string; - @Field(() => String, { nullable: false }) - body!: string; + @Field(() => String, { nullable: false }) + body!: string; - @Field(() => [Tag], { nullable: true }) - tags?: Array; + @Field(() => [Tag], { nullable: true }) + tags?: Array; - @Field(() => Date, { nullable: false }) - createdAt!: Date; + @Field(() => Date, { nullable: false }) + createdAt!: Date; - @Field(() => Date, { nullable: false }) - updatedAt!: Date; + @Field(() => Date, { nullable: false }) + updatedAt!: Date; - @Field(() => Int, { nullable: false, defaultValue: 0 }) - favoritesCount!: number; + @Field(() => Int, { nullable: false, defaultValue: 0 }) + favoritesCount!: number; - @Field(() => User, { nullable: false }) - author?: User; + @Field(() => User, { nullable: false }) + author?: User; - @Field(() => String, { nullable: false }) - authorId!: string; + @Field(() => String, { nullable: false }) + authorId!: string; - @Field(() => [User], { nullable: true }) - favoritedBy?: Array; + @Field(() => [User], { nullable: true }) + favoritedBy?: Array; - @Field(() => [Comment], { nullable: true }) - comments?: Array; + @Field(() => [Comment], { nullable: true }) + comments?: Array; - @Field(() => Boolean, { nullable: true, defaultValue: true }) - active!: boolean | null; + @Field(() => Boolean, { nullable: true, defaultValue: true }) + active!: boolean | null; - @Field(() => ArticleCount, { nullable: false }) - _count?: ArticleCount; + @Field(() => ArticleCount, { nullable: false }) + _count?: ArticleCount; } diff --git a/@generated/article/create-many-article.args.ts b/@generated/article/create-many-article.args.ts index e9e63a58..7369f41e 100644 --- a/@generated/article/create-many-article.args.ts +++ b/@generated/article/create-many-article.args.ts @@ -4,9 +4,9 @@ import { ArticleCreateManyInput } from './article-create-many.input'; @ArgsType() export class CreateManyArticleArgs { - @Field(() => [ArticleCreateManyInput], { nullable: false }) - data!: Array; + @Field(() => [ArticleCreateManyInput], { nullable: false }) + data!: Array; - @Field(() => Boolean, { nullable: true }) - skipDuplicates?: boolean; + @Field(() => Boolean, { nullable: true }) + skipDuplicates?: boolean; } diff --git a/@generated/article/create-one-article.args.ts b/@generated/article/create-one-article.args.ts index e2a91baf..8f1040fe 100644 --- a/@generated/article/create-one-article.args.ts +++ b/@generated/article/create-one-article.args.ts @@ -4,6 +4,6 @@ import { ArticleCreateInput } from './article-create.input'; @ArgsType() export class CreateOneArticleArgs { - @Field(() => ArticleCreateInput, { nullable: false }) - data!: ArticleCreateInput; + @Field(() => ArticleCreateInput, { nullable: false }) + data!: ArticleCreateInput; } diff --git a/@generated/article/delete-many-article.args.ts b/@generated/article/delete-many-article.args.ts index e129227c..b7d05a1d 100644 --- a/@generated/article/delete-many-article.args.ts +++ b/@generated/article/delete-many-article.args.ts @@ -4,6 +4,6 @@ import { ArticleWhereInput } from './article-where.input'; @ArgsType() export class DeleteManyArticleArgs { - @Field(() => ArticleWhereInput, { nullable: true }) - where?: ArticleWhereInput; + @Field(() => ArticleWhereInput, { nullable: true }) + where?: ArticleWhereInput; } diff --git a/@generated/article/delete-one-article.args.ts b/@generated/article/delete-one-article.args.ts index 18ae0fbd..65633942 100644 --- a/@generated/article/delete-one-article.args.ts +++ b/@generated/article/delete-one-article.args.ts @@ -4,6 +4,6 @@ import { ArticleWhereUniqueInput } from './article-where-unique.input'; @ArgsType() export class DeleteOneArticleArgs { - @Field(() => ArticleWhereUniqueInput, { nullable: false }) - where!: ArticleWhereUniqueInput; + @Field(() => ArticleWhereUniqueInput, { nullable: false }) + where!: ArticleWhereUniqueInput; } diff --git a/@generated/article/find-first-article.args.ts b/@generated/article/find-first-article.args.ts index 3f7a7f91..99cff33d 100644 --- a/@generated/article/find-first-article.args.ts +++ b/@generated/article/find-first-article.args.ts @@ -8,23 +8,23 @@ import { ArticleScalarFieldEnum } from './article-scalar-field.enum'; @ArgsType() export class FindFirstArticleArgs { - @Field(() => ArticleWhereInput, { nullable: true }) - where?: ArticleWhereInput; + @Field(() => ArticleWhereInput, { nullable: true }) + where?: ArticleWhereInput; - @Field(() => [ArticleOrderByWithRelationAndSearchRelevanceInput], { - nullable: true, - }) - orderBy?: Array; + @Field(() => [ArticleOrderByWithRelationAndSearchRelevanceInput], { + nullable: true, + }) + orderBy?: Array; - @Field(() => ArticleWhereUniqueInput, { nullable: true }) - cursor?: ArticleWhereUniqueInput; + @Field(() => ArticleWhereUniqueInput, { nullable: true }) + cursor?: ArticleWhereUniqueInput; - @Field(() => Int, { nullable: true }) - take?: number; + @Field(() => Int, { nullable: true }) + take?: number; - @Field(() => Int, { nullable: true }) - skip?: number; + @Field(() => Int, { nullable: true }) + skip?: number; - @Field(() => [ArticleScalarFieldEnum], { nullable: true }) - distinct?: Array; + @Field(() => [ArticleScalarFieldEnum], { nullable: true }) + distinct?: Array; } diff --git a/@generated/article/find-many-article.args.ts b/@generated/article/find-many-article.args.ts index 1b7b1632..3433bd2c 100644 --- a/@generated/article/find-many-article.args.ts +++ b/@generated/article/find-many-article.args.ts @@ -8,23 +8,23 @@ import { ArticleScalarFieldEnum } from './article-scalar-field.enum'; @ArgsType() export class FindManyArticleArgs { - @Field(() => ArticleWhereInput, { nullable: true }) - where?: ArticleWhereInput; + @Field(() => ArticleWhereInput, { nullable: true }) + where?: ArticleWhereInput; - @Field(() => [ArticleOrderByWithRelationAndSearchRelevanceInput], { - nullable: true, - }) - orderBy?: Array; + @Field(() => [ArticleOrderByWithRelationAndSearchRelevanceInput], { + nullable: true, + }) + orderBy?: Array; - @Field(() => ArticleWhereUniqueInput, { nullable: true }) - cursor?: ArticleWhereUniqueInput; + @Field(() => ArticleWhereUniqueInput, { nullable: true }) + cursor?: ArticleWhereUniqueInput; - @Field(() => Int, { nullable: true }) - take?: number; + @Field(() => Int, { nullable: true }) + take?: number; - @Field(() => Int, { nullable: true }) - skip?: number; + @Field(() => Int, { nullable: true }) + skip?: number; - @Field(() => [ArticleScalarFieldEnum], { nullable: true }) - distinct?: Array; + @Field(() => [ArticleScalarFieldEnum], { nullable: true }) + distinct?: Array; } diff --git a/@generated/article/find-unique-article.args.ts b/@generated/article/find-unique-article.args.ts index a0a327a6..37490165 100644 --- a/@generated/article/find-unique-article.args.ts +++ b/@generated/article/find-unique-article.args.ts @@ -4,6 +4,6 @@ import { ArticleWhereUniqueInput } from './article-where-unique.input'; @ArgsType() export class FindUniqueArticleArgs { - @Field(() => ArticleWhereUniqueInput, { nullable: false }) - where!: ArticleWhereUniqueInput; + @Field(() => ArticleWhereUniqueInput, { nullable: false }) + where!: ArticleWhereUniqueInput; } diff --git a/@generated/article/update-many-article.args.ts b/@generated/article/update-many-article.args.ts index 2503f071..c1293b9b 100644 --- a/@generated/article/update-many-article.args.ts +++ b/@generated/article/update-many-article.args.ts @@ -5,9 +5,9 @@ import { ArticleWhereInput } from './article-where.input'; @ArgsType() export class UpdateManyArticleArgs { - @Field(() => ArticleUpdateManyMutationInput, { nullable: false }) - data!: ArticleUpdateManyMutationInput; + @Field(() => ArticleUpdateManyMutationInput, { nullable: false }) + data!: ArticleUpdateManyMutationInput; - @Field(() => ArticleWhereInput, { nullable: true }) - where?: ArticleWhereInput; + @Field(() => ArticleWhereInput, { nullable: true }) + where?: ArticleWhereInput; } diff --git a/@generated/article/update-one-article.args.ts b/@generated/article/update-one-article.args.ts index 3086872a..4cdfa3ec 100644 --- a/@generated/article/update-one-article.args.ts +++ b/@generated/article/update-one-article.args.ts @@ -5,9 +5,9 @@ import { ArticleWhereUniqueInput } from './article-where-unique.input'; @ArgsType() export class UpdateOneArticleArgs { - @Field(() => ArticleUpdateInput, { nullable: false }) - data!: ArticleUpdateInput; + @Field(() => ArticleUpdateInput, { nullable: false }) + data!: ArticleUpdateInput; - @Field(() => ArticleWhereUniqueInput, { nullable: false }) - where!: ArticleWhereUniqueInput; + @Field(() => ArticleWhereUniqueInput, { nullable: false }) + where!: ArticleWhereUniqueInput; } diff --git a/@generated/article/upsert-one-article.args.ts b/@generated/article/upsert-one-article.args.ts index 94d00963..9c2690e9 100644 --- a/@generated/article/upsert-one-article.args.ts +++ b/@generated/article/upsert-one-article.args.ts @@ -6,12 +6,12 @@ import { ArticleUpdateInput } from './article-update.input'; @ArgsType() export class UpsertOneArticleArgs { - @Field(() => ArticleWhereUniqueInput, { nullable: false }) - where!: ArticleWhereUniqueInput; + @Field(() => ArticleWhereUniqueInput, { nullable: false }) + where!: ArticleWhereUniqueInput; - @Field(() => ArticleCreateInput, { nullable: false }) - create!: ArticleCreateInput; + @Field(() => ArticleCreateInput, { nullable: false }) + create!: ArticleCreateInput; - @Field(() => ArticleUpdateInput, { nullable: false }) - update!: ArticleUpdateInput; + @Field(() => ArticleUpdateInput, { nullable: false }) + update!: ArticleUpdateInput; } diff --git a/@generated/comment/aggregate-comment.output.ts b/@generated/comment/aggregate-comment.output.ts index f80a76c2..59c747eb 100644 --- a/@generated/comment/aggregate-comment.output.ts +++ b/@generated/comment/aggregate-comment.output.ts @@ -6,12 +6,12 @@ import { CommentMaxAggregate } from './comment-max-aggregate.output'; @ObjectType() export class AggregateComment { - @Field(() => CommentCountAggregate, { nullable: true }) - _count?: CommentCountAggregate; + @Field(() => CommentCountAggregate, { nullable: true }) + _count?: CommentCountAggregate; - @Field(() => CommentMinAggregate, { nullable: true }) - _min?: CommentMinAggregate; + @Field(() => CommentMinAggregate, { nullable: true }) + _min?: CommentMinAggregate; - @Field(() => CommentMaxAggregate, { nullable: true }) - _max?: CommentMaxAggregate; + @Field(() => CommentMaxAggregate, { nullable: true }) + _max?: CommentMaxAggregate; } diff --git a/@generated/comment/comment-aggregate.args.ts b/@generated/comment/comment-aggregate.args.ts index 6b6d7a02..6cf14f80 100644 --- a/@generated/comment/comment-aggregate.args.ts +++ b/@generated/comment/comment-aggregate.args.ts @@ -10,29 +10,29 @@ import { CommentMaxAggregateInput } from './comment-max-aggregate.input'; @ArgsType() export class CommentAggregateArgs { - @Field(() => CommentWhereInput, { nullable: true }) - where?: CommentWhereInput; + @Field(() => CommentWhereInput, { nullable: true }) + where?: CommentWhereInput; - @Field(() => [CommentOrderByWithRelationAndSearchRelevanceInput], { - nullable: true, - }) - orderBy?: Array; + @Field(() => [CommentOrderByWithRelationAndSearchRelevanceInput], { + nullable: true, + }) + orderBy?: Array; - @Field(() => CommentWhereUniqueInput, { nullable: true }) - cursor?: CommentWhereUniqueInput; + @Field(() => CommentWhereUniqueInput, { nullable: true }) + cursor?: CommentWhereUniqueInput; - @Field(() => Int, { nullable: true }) - take?: number; + @Field(() => Int, { nullable: true }) + take?: number; - @Field(() => Int, { nullable: true }) - skip?: number; + @Field(() => Int, { nullable: true }) + skip?: number; - @Field(() => CommentCountAggregateInput, { nullable: true }) - _count?: CommentCountAggregateInput; + @Field(() => CommentCountAggregateInput, { nullable: true }) + _count?: CommentCountAggregateInput; - @Field(() => CommentMinAggregateInput, { nullable: true }) - _min?: CommentMinAggregateInput; + @Field(() => CommentMinAggregateInput, { nullable: true }) + _min?: CommentMinAggregateInput; - @Field(() => CommentMaxAggregateInput, { nullable: true }) - _max?: CommentMaxAggregateInput; + @Field(() => CommentMaxAggregateInput, { nullable: true }) + _max?: CommentMaxAggregateInput; } diff --git a/@generated/comment/comment-count-aggregate.input.ts b/@generated/comment/comment-count-aggregate.input.ts index f36d9191..75d67faf 100644 --- a/@generated/comment/comment-count-aggregate.input.ts +++ b/@generated/comment/comment-count-aggregate.input.ts @@ -3,24 +3,24 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class CommentCountAggregateInput { - @Field(() => Boolean, { nullable: true }) - id?: true; + @Field(() => Boolean, { nullable: true }) + id?: true; - @Field(() => Boolean, { nullable: true }) - createdAt?: true; + @Field(() => Boolean, { nullable: true }) + createdAt?: true; - @Field(() => Boolean, { nullable: true }) - updatedAt?: true; + @Field(() => Boolean, { nullable: true }) + updatedAt?: true; - @Field(() => Boolean, { nullable: true }) - body?: true; + @Field(() => Boolean, { nullable: true }) + body?: true; - @Field(() => Boolean, { nullable: true }) - authorId?: true; + @Field(() => Boolean, { nullable: true }) + authorId?: true; - @Field(() => Boolean, { nullable: true }) - articleId?: true; + @Field(() => Boolean, { nullable: true }) + articleId?: true; - @Field(() => Boolean, { nullable: true }) - _all?: true; + @Field(() => Boolean, { nullable: true }) + _all?: true; } diff --git a/@generated/comment/comment-count-aggregate.output.ts b/@generated/comment/comment-count-aggregate.output.ts index 33d342a1..fd7bfc02 100644 --- a/@generated/comment/comment-count-aggregate.output.ts +++ b/@generated/comment/comment-count-aggregate.output.ts @@ -4,24 +4,24 @@ import { Int } from '@nestjs/graphql'; @ObjectType() export class CommentCountAggregate { - @Field(() => Int, { nullable: false }) - id!: number; + @Field(() => Int, { nullable: false }) + id!: number; - @Field(() => Int, { nullable: false }) - createdAt!: number; + @Field(() => Int, { nullable: false }) + createdAt!: number; - @Field(() => Int, { nullable: false }) - updatedAt!: number; + @Field(() => Int, { nullable: false }) + updatedAt!: number; - @Field(() => Int, { nullable: false }) - body!: number; + @Field(() => Int, { nullable: false }) + body!: number; - @Field(() => Int, { nullable: false }) - authorId!: number; + @Field(() => Int, { nullable: false }) + authorId!: number; - @Field(() => Int, { nullable: false }) - articleId!: number; + @Field(() => Int, { nullable: false }) + articleId!: number; - @Field(() => Int, { nullable: false }) - _all!: number; + @Field(() => Int, { nullable: false }) + _all!: number; } diff --git a/@generated/comment/comment-count-order-by-aggregate.input.ts b/@generated/comment/comment-count-order-by-aggregate.input.ts index e9f36658..fdb69b3a 100644 --- a/@generated/comment/comment-count-order-by-aggregate.input.ts +++ b/@generated/comment/comment-count-order-by-aggregate.input.ts @@ -4,21 +4,21 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class CommentCountOrderByAggregateInput { - @Field(() => SortOrder, { nullable: true }) - id?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + id?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - createdAt?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + createdAt?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - updatedAt?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + updatedAt?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - body?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + body?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - authorId?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + authorId?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - articleId?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + articleId?: keyof typeof SortOrder; } diff --git a/@generated/comment/comment-create-many-article-input-envelope.input.ts b/@generated/comment/comment-create-many-article-input-envelope.input.ts index 0ba7fb12..35682370 100644 --- a/@generated/comment/comment-create-many-article-input-envelope.input.ts +++ b/@generated/comment/comment-create-many-article-input-envelope.input.ts @@ -4,9 +4,9 @@ import { CommentCreateManyArticleInput } from './comment-create-many-article.inp @InputType() export class CommentCreateManyArticleInputEnvelope { - @Field(() => [CommentCreateManyArticleInput], { nullable: false }) - data!: Array; + @Field(() => [CommentCreateManyArticleInput], { nullable: false }) + data!: Array; - @Field(() => Boolean, { nullable: true }) - skipDuplicates?: boolean; + @Field(() => Boolean, { nullable: true }) + skipDuplicates?: boolean; } diff --git a/@generated/comment/comment-create-many-article.input.ts b/@generated/comment/comment-create-many-article.input.ts index f5b7b30c..85509527 100644 --- a/@generated/comment/comment-create-many-article.input.ts +++ b/@generated/comment/comment-create-many-article.input.ts @@ -3,18 +3,18 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class CommentCreateManyArticleInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => Date, { nullable: true }) - createdAt?: Date | string; + @Field(() => Date, { nullable: true }) + createdAt?: Date | string; - @Field(() => Date, { nullable: true }) - updatedAt?: Date | string; + @Field(() => Date, { nullable: true }) + updatedAt?: Date | string; - @Field(() => String, { nullable: false }) - body!: string; + @Field(() => String, { nullable: false }) + body!: string; - @Field(() => String, { nullable: false }) - authorId!: string; + @Field(() => String, { nullable: false }) + authorId!: string; } diff --git a/@generated/comment/comment-create-many-author-input-envelope.input.ts b/@generated/comment/comment-create-many-author-input-envelope.input.ts index d26b5f2c..bd5f97b9 100644 --- a/@generated/comment/comment-create-many-author-input-envelope.input.ts +++ b/@generated/comment/comment-create-many-author-input-envelope.input.ts @@ -4,9 +4,9 @@ import { CommentCreateManyAuthorInput } from './comment-create-many-author.input @InputType() export class CommentCreateManyAuthorInputEnvelope { - @Field(() => [CommentCreateManyAuthorInput], { nullable: false }) - data!: Array; + @Field(() => [CommentCreateManyAuthorInput], { nullable: false }) + data!: Array; - @Field(() => Boolean, { nullable: true }) - skipDuplicates?: boolean; + @Field(() => Boolean, { nullable: true }) + skipDuplicates?: boolean; } diff --git a/@generated/comment/comment-create-many-author.input.ts b/@generated/comment/comment-create-many-author.input.ts index 95f06806..7d5866c1 100644 --- a/@generated/comment/comment-create-many-author.input.ts +++ b/@generated/comment/comment-create-many-author.input.ts @@ -3,18 +3,18 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class CommentCreateManyAuthorInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => Date, { nullable: true }) - createdAt?: Date | string; + @Field(() => Date, { nullable: true }) + createdAt?: Date | string; - @Field(() => Date, { nullable: true }) - updatedAt?: Date | string; + @Field(() => Date, { nullable: true }) + updatedAt?: Date | string; - @Field(() => String, { nullable: false }) - body!: string; + @Field(() => String, { nullable: false }) + body!: string; - @Field(() => String, { nullable: true }) - articleId?: string; + @Field(() => String, { nullable: true }) + articleId?: string; } diff --git a/@generated/comment/comment-create-many.input.ts b/@generated/comment/comment-create-many.input.ts index 783efc4f..b636adba 100644 --- a/@generated/comment/comment-create-many.input.ts +++ b/@generated/comment/comment-create-many.input.ts @@ -3,21 +3,21 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class CommentCreateManyInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => Date, { nullable: true }) - createdAt?: Date | string; + @Field(() => Date, { nullable: true }) + createdAt?: Date | string; - @Field(() => Date, { nullable: true }) - updatedAt?: Date | string; + @Field(() => Date, { nullable: true }) + updatedAt?: Date | string; - @Field(() => String, { nullable: false }) - body!: string; + @Field(() => String, { nullable: false }) + body!: string; - @Field(() => String, { nullable: false }) - authorId!: string; + @Field(() => String, { nullable: false }) + authorId!: string; - @Field(() => String, { nullable: true }) - articleId?: string; + @Field(() => String, { nullable: true }) + articleId?: string; } diff --git a/@generated/comment/comment-create-nested-many-without-article.input.ts b/@generated/comment/comment-create-nested-many-without-article.input.ts index 8339147a..687c5060 100644 --- a/@generated/comment/comment-create-nested-many-without-article.input.ts +++ b/@generated/comment/comment-create-nested-many-without-article.input.ts @@ -7,15 +7,15 @@ import { CommentWhereUniqueInput } from './comment-where-unique.input'; @InputType() export class CommentCreateNestedManyWithoutArticleInput { - @Field(() => [CommentCreateWithoutArticleInput], { nullable: true }) - create?: Array; + @Field(() => [CommentCreateWithoutArticleInput], { nullable: true }) + create?: Array; - @Field(() => [CommentCreateOrConnectWithoutArticleInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [CommentCreateOrConnectWithoutArticleInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => CommentCreateManyArticleInputEnvelope, { nullable: true }) - createMany?: CommentCreateManyArticleInputEnvelope; + @Field(() => CommentCreateManyArticleInputEnvelope, { nullable: true }) + createMany?: CommentCreateManyArticleInputEnvelope; - @Field(() => [CommentWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [CommentWhereUniqueInput], { nullable: true }) + connect?: Array; } diff --git a/@generated/comment/comment-create-nested-many-without-author.input.ts b/@generated/comment/comment-create-nested-many-without-author.input.ts index 5aafd7da..963c43a8 100644 --- a/@generated/comment/comment-create-nested-many-without-author.input.ts +++ b/@generated/comment/comment-create-nested-many-without-author.input.ts @@ -7,15 +7,15 @@ import { CommentWhereUniqueInput } from './comment-where-unique.input'; @InputType() export class CommentCreateNestedManyWithoutAuthorInput { - @Field(() => [CommentCreateWithoutAuthorInput], { nullable: true }) - create?: Array; + @Field(() => [CommentCreateWithoutAuthorInput], { nullable: true }) + create?: Array; - @Field(() => [CommentCreateOrConnectWithoutAuthorInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [CommentCreateOrConnectWithoutAuthorInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => CommentCreateManyAuthorInputEnvelope, { nullable: true }) - createMany?: CommentCreateManyAuthorInputEnvelope; + @Field(() => CommentCreateManyAuthorInputEnvelope, { nullable: true }) + createMany?: CommentCreateManyAuthorInputEnvelope; - @Field(() => [CommentWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [CommentWhereUniqueInput], { nullable: true }) + connect?: Array; } diff --git a/@generated/comment/comment-create-or-connect-without-article.input.ts b/@generated/comment/comment-create-or-connect-without-article.input.ts index a929f670..2974ba98 100644 --- a/@generated/comment/comment-create-or-connect-without-article.input.ts +++ b/@generated/comment/comment-create-or-connect-without-article.input.ts @@ -5,9 +5,9 @@ import { CommentCreateWithoutArticleInput } from './comment-create-without-artic @InputType() export class CommentCreateOrConnectWithoutArticleInput { - @Field(() => CommentWhereUniqueInput, { nullable: false }) - where!: CommentWhereUniqueInput; + @Field(() => CommentWhereUniqueInput, { nullable: false }) + where!: CommentWhereUniqueInput; - @Field(() => CommentCreateWithoutArticleInput, { nullable: false }) - create!: CommentCreateWithoutArticleInput; + @Field(() => CommentCreateWithoutArticleInput, { nullable: false }) + create!: CommentCreateWithoutArticleInput; } diff --git a/@generated/comment/comment-create-or-connect-without-author.input.ts b/@generated/comment/comment-create-or-connect-without-author.input.ts index dd0ad8c9..917d1477 100644 --- a/@generated/comment/comment-create-or-connect-without-author.input.ts +++ b/@generated/comment/comment-create-or-connect-without-author.input.ts @@ -5,9 +5,9 @@ import { CommentCreateWithoutAuthorInput } from './comment-create-without-author @InputType() export class CommentCreateOrConnectWithoutAuthorInput { - @Field(() => CommentWhereUniqueInput, { nullable: false }) - where!: CommentWhereUniqueInput; + @Field(() => CommentWhereUniqueInput, { nullable: false }) + where!: CommentWhereUniqueInput; - @Field(() => CommentCreateWithoutAuthorInput, { nullable: false }) - create!: CommentCreateWithoutAuthorInput; + @Field(() => CommentCreateWithoutAuthorInput, { nullable: false }) + create!: CommentCreateWithoutAuthorInput; } diff --git a/@generated/comment/comment-create-without-article.input.ts b/@generated/comment/comment-create-without-article.input.ts index 4f7f78a7..70057c4d 100644 --- a/@generated/comment/comment-create-without-article.input.ts +++ b/@generated/comment/comment-create-without-article.input.ts @@ -4,18 +4,18 @@ import { UserCreateNestedOneWithoutCommentsInput } from '../user/user-create-nes @InputType() export class CommentCreateWithoutArticleInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => Date, { nullable: true }) - createdAt?: Date | string; + @Field(() => Date, { nullable: true }) + createdAt?: Date | string; - @Field(() => Date, { nullable: true }) - updatedAt?: Date | string; + @Field(() => Date, { nullable: true }) + updatedAt?: Date | string; - @Field(() => String, { nullable: false }) - body!: string; + @Field(() => String, { nullable: false }) + body!: string; - @Field(() => UserCreateNestedOneWithoutCommentsInput, { nullable: false }) - author!: UserCreateNestedOneWithoutCommentsInput; + @Field(() => UserCreateNestedOneWithoutCommentsInput, { nullable: false }) + author!: UserCreateNestedOneWithoutCommentsInput; } diff --git a/@generated/comment/comment-create-without-author.input.ts b/@generated/comment/comment-create-without-author.input.ts index a7a9e22f..d0cfff83 100644 --- a/@generated/comment/comment-create-without-author.input.ts +++ b/@generated/comment/comment-create-without-author.input.ts @@ -4,18 +4,18 @@ import { ArticleCreateNestedOneWithoutCommentsInput } from '../article/article-c @InputType() export class CommentCreateWithoutAuthorInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => Date, { nullable: true }) - createdAt?: Date | string; + @Field(() => Date, { nullable: true }) + createdAt?: Date | string; - @Field(() => Date, { nullable: true }) - updatedAt?: Date | string; + @Field(() => Date, { nullable: true }) + updatedAt?: Date | string; - @Field(() => String, { nullable: false }) - body!: string; + @Field(() => String, { nullable: false }) + body!: string; - @Field(() => ArticleCreateNestedOneWithoutCommentsInput, { nullable: true }) - article?: ArticleCreateNestedOneWithoutCommentsInput; + @Field(() => ArticleCreateNestedOneWithoutCommentsInput, { nullable: true }) + article?: ArticleCreateNestedOneWithoutCommentsInput; } diff --git a/@generated/comment/comment-create.input.ts b/@generated/comment/comment-create.input.ts index 077160c7..90d60d9e 100644 --- a/@generated/comment/comment-create.input.ts +++ b/@generated/comment/comment-create.input.ts @@ -5,21 +5,21 @@ import { ArticleCreateNestedOneWithoutCommentsInput } from '../article/article-c @InputType() export class CommentCreateInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => Date, { nullable: true }) - createdAt?: Date | string; + @Field(() => Date, { nullable: true }) + createdAt?: Date | string; - @Field(() => Date, { nullable: true }) - updatedAt?: Date | string; + @Field(() => Date, { nullable: true }) + updatedAt?: Date | string; - @Field(() => String, { nullable: false }) - body!: string; + @Field(() => String, { nullable: false }) + body!: string; - @Field(() => UserCreateNestedOneWithoutCommentsInput, { nullable: false }) - author!: UserCreateNestedOneWithoutCommentsInput; + @Field(() => UserCreateNestedOneWithoutCommentsInput, { nullable: false }) + author!: UserCreateNestedOneWithoutCommentsInput; - @Field(() => ArticleCreateNestedOneWithoutCommentsInput, { nullable: true }) - article?: ArticleCreateNestedOneWithoutCommentsInput; + @Field(() => ArticleCreateNestedOneWithoutCommentsInput, { nullable: true }) + article?: ArticleCreateNestedOneWithoutCommentsInput; } diff --git a/@generated/comment/comment-group-by.args.ts b/@generated/comment/comment-group-by.args.ts index b27cc741..9c7a6590 100644 --- a/@generated/comment/comment-group-by.args.ts +++ b/@generated/comment/comment-group-by.args.ts @@ -11,30 +11,30 @@ import { CommentMaxAggregateInput } from './comment-max-aggregate.input'; @ArgsType() export class CommentGroupByArgs { - @Field(() => CommentWhereInput, { nullable: true }) - where?: CommentWhereInput; + @Field(() => CommentWhereInput, { nullable: true }) + where?: CommentWhereInput; - @Field(() => [CommentOrderByWithAggregationInput], { nullable: true }) - orderBy?: Array; + @Field(() => [CommentOrderByWithAggregationInput], { nullable: true }) + orderBy?: Array; - @Field(() => [CommentScalarFieldEnum], { nullable: false }) - by!: Array; + @Field(() => [CommentScalarFieldEnum], { nullable: false }) + by!: Array; - @Field(() => CommentScalarWhereWithAggregatesInput, { nullable: true }) - having?: CommentScalarWhereWithAggregatesInput; + @Field(() => CommentScalarWhereWithAggregatesInput, { nullable: true }) + having?: CommentScalarWhereWithAggregatesInput; - @Field(() => Int, { nullable: true }) - take?: number; + @Field(() => Int, { nullable: true }) + take?: number; - @Field(() => Int, { nullable: true }) - skip?: number; + @Field(() => Int, { nullable: true }) + skip?: number; - @Field(() => CommentCountAggregateInput, { nullable: true }) - _count?: CommentCountAggregateInput; + @Field(() => CommentCountAggregateInput, { nullable: true }) + _count?: CommentCountAggregateInput; - @Field(() => CommentMinAggregateInput, { nullable: true }) - _min?: CommentMinAggregateInput; + @Field(() => CommentMinAggregateInput, { nullable: true }) + _min?: CommentMinAggregateInput; - @Field(() => CommentMaxAggregateInput, { nullable: true }) - _max?: CommentMaxAggregateInput; + @Field(() => CommentMaxAggregateInput, { nullable: true }) + _max?: CommentMaxAggregateInput; } diff --git a/@generated/comment/comment-group-by.output.ts b/@generated/comment/comment-group-by.output.ts index 540c16ca..0969c04e 100644 --- a/@generated/comment/comment-group-by.output.ts +++ b/@generated/comment/comment-group-by.output.ts @@ -6,30 +6,30 @@ import { CommentMaxAggregate } from './comment-max-aggregate.output'; @ObjectType() export class CommentGroupBy { - @Field(() => String, { nullable: false }) - id!: string; + @Field(() => String, { nullable: false }) + id!: string; - @Field(() => Date, { nullable: false }) - createdAt!: Date | string; + @Field(() => Date, { nullable: false }) + createdAt!: Date | string; - @Field(() => Date, { nullable: false }) - updatedAt!: Date | string; + @Field(() => Date, { nullable: false }) + updatedAt!: Date | string; - @Field(() => String, { nullable: false }) - body!: string; + @Field(() => String, { nullable: false }) + body!: string; - @Field(() => String, { nullable: false }) - authorId!: string; + @Field(() => String, { nullable: false }) + authorId!: string; - @Field(() => String, { nullable: true }) - articleId?: string; + @Field(() => String, { nullable: true }) + articleId?: string; - @Field(() => CommentCountAggregate, { nullable: true }) - _count?: CommentCountAggregate; + @Field(() => CommentCountAggregate, { nullable: true }) + _count?: CommentCountAggregate; - @Field(() => CommentMinAggregate, { nullable: true }) - _min?: CommentMinAggregate; + @Field(() => CommentMinAggregate, { nullable: true }) + _min?: CommentMinAggregate; - @Field(() => CommentMaxAggregate, { nullable: true }) - _max?: CommentMaxAggregate; + @Field(() => CommentMaxAggregate, { nullable: true }) + _max?: CommentMaxAggregate; } diff --git a/@generated/comment/comment-list-relation-filter.input.ts b/@generated/comment/comment-list-relation-filter.input.ts index beb6836c..7e058603 100644 --- a/@generated/comment/comment-list-relation-filter.input.ts +++ b/@generated/comment/comment-list-relation-filter.input.ts @@ -4,12 +4,12 @@ import { CommentWhereInput } from './comment-where.input'; @InputType() export class CommentListRelationFilter { - @Field(() => CommentWhereInput, { nullable: true }) - every?: CommentWhereInput; + @Field(() => CommentWhereInput, { nullable: true }) + every?: CommentWhereInput; - @Field(() => CommentWhereInput, { nullable: true }) - some?: CommentWhereInput; + @Field(() => CommentWhereInput, { nullable: true }) + some?: CommentWhereInput; - @Field(() => CommentWhereInput, { nullable: true }) - none?: CommentWhereInput; + @Field(() => CommentWhereInput, { nullable: true }) + none?: CommentWhereInput; } diff --git a/@generated/comment/comment-max-aggregate.input.ts b/@generated/comment/comment-max-aggregate.input.ts index 506f362a..fdeb0b9d 100644 --- a/@generated/comment/comment-max-aggregate.input.ts +++ b/@generated/comment/comment-max-aggregate.input.ts @@ -3,21 +3,21 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class CommentMaxAggregateInput { - @Field(() => Boolean, { nullable: true }) - id?: true; + @Field(() => Boolean, { nullable: true }) + id?: true; - @Field(() => Boolean, { nullable: true }) - createdAt?: true; + @Field(() => Boolean, { nullable: true }) + createdAt?: true; - @Field(() => Boolean, { nullable: true }) - updatedAt?: true; + @Field(() => Boolean, { nullable: true }) + updatedAt?: true; - @Field(() => Boolean, { nullable: true }) - body?: true; + @Field(() => Boolean, { nullable: true }) + body?: true; - @Field(() => Boolean, { nullable: true }) - authorId?: true; + @Field(() => Boolean, { nullable: true }) + authorId?: true; - @Field(() => Boolean, { nullable: true }) - articleId?: true; + @Field(() => Boolean, { nullable: true }) + articleId?: true; } diff --git a/@generated/comment/comment-max-aggregate.output.ts b/@generated/comment/comment-max-aggregate.output.ts index d8e45461..ab979fb7 100644 --- a/@generated/comment/comment-max-aggregate.output.ts +++ b/@generated/comment/comment-max-aggregate.output.ts @@ -3,21 +3,21 @@ import { ObjectType } from '@nestjs/graphql'; @ObjectType() export class CommentMaxAggregate { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => Date, { nullable: true }) - createdAt?: Date | string; + @Field(() => Date, { nullable: true }) + createdAt?: Date | string; - @Field(() => Date, { nullable: true }) - updatedAt?: Date | string; + @Field(() => Date, { nullable: true }) + updatedAt?: Date | string; - @Field(() => String, { nullable: true }) - body?: string; + @Field(() => String, { nullable: true }) + body?: string; - @Field(() => String, { nullable: true }) - authorId?: string; + @Field(() => String, { nullable: true }) + authorId?: string; - @Field(() => String, { nullable: true }) - articleId?: string; + @Field(() => String, { nullable: true }) + articleId?: string; } diff --git a/@generated/comment/comment-max-order-by-aggregate.input.ts b/@generated/comment/comment-max-order-by-aggregate.input.ts index 4f1966d9..faf5254f 100644 --- a/@generated/comment/comment-max-order-by-aggregate.input.ts +++ b/@generated/comment/comment-max-order-by-aggregate.input.ts @@ -4,21 +4,21 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class CommentMaxOrderByAggregateInput { - @Field(() => SortOrder, { nullable: true }) - id?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + id?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - createdAt?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + createdAt?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - updatedAt?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + updatedAt?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - body?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + body?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - authorId?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + authorId?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - articleId?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + articleId?: keyof typeof SortOrder; } diff --git a/@generated/comment/comment-min-aggregate.input.ts b/@generated/comment/comment-min-aggregate.input.ts index 9907a1ce..44330cad 100644 --- a/@generated/comment/comment-min-aggregate.input.ts +++ b/@generated/comment/comment-min-aggregate.input.ts @@ -3,21 +3,21 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class CommentMinAggregateInput { - @Field(() => Boolean, { nullable: true }) - id?: true; + @Field(() => Boolean, { nullable: true }) + id?: true; - @Field(() => Boolean, { nullable: true }) - createdAt?: true; + @Field(() => Boolean, { nullable: true }) + createdAt?: true; - @Field(() => Boolean, { nullable: true }) - updatedAt?: true; + @Field(() => Boolean, { nullable: true }) + updatedAt?: true; - @Field(() => Boolean, { nullable: true }) - body?: true; + @Field(() => Boolean, { nullable: true }) + body?: true; - @Field(() => Boolean, { nullable: true }) - authorId?: true; + @Field(() => Boolean, { nullable: true }) + authorId?: true; - @Field(() => Boolean, { nullable: true }) - articleId?: true; + @Field(() => Boolean, { nullable: true }) + articleId?: true; } diff --git a/@generated/comment/comment-min-aggregate.output.ts b/@generated/comment/comment-min-aggregate.output.ts index a966a761..90824433 100644 --- a/@generated/comment/comment-min-aggregate.output.ts +++ b/@generated/comment/comment-min-aggregate.output.ts @@ -3,21 +3,21 @@ import { ObjectType } from '@nestjs/graphql'; @ObjectType() export class CommentMinAggregate { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => Date, { nullable: true }) - createdAt?: Date | string; + @Field(() => Date, { nullable: true }) + createdAt?: Date | string; - @Field(() => Date, { nullable: true }) - updatedAt?: Date | string; + @Field(() => Date, { nullable: true }) + updatedAt?: Date | string; - @Field(() => String, { nullable: true }) - body?: string; + @Field(() => String, { nullable: true }) + body?: string; - @Field(() => String, { nullable: true }) - authorId?: string; + @Field(() => String, { nullable: true }) + authorId?: string; - @Field(() => String, { nullable: true }) - articleId?: string; + @Field(() => String, { nullable: true }) + articleId?: string; } diff --git a/@generated/comment/comment-min-order-by-aggregate.input.ts b/@generated/comment/comment-min-order-by-aggregate.input.ts index 9ffd0d22..d4910358 100644 --- a/@generated/comment/comment-min-order-by-aggregate.input.ts +++ b/@generated/comment/comment-min-order-by-aggregate.input.ts @@ -4,21 +4,21 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class CommentMinOrderByAggregateInput { - @Field(() => SortOrder, { nullable: true }) - id?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + id?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - createdAt?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + createdAt?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - updatedAt?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + updatedAt?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - body?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + body?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - authorId?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + authorId?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - articleId?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + articleId?: keyof typeof SortOrder; } diff --git a/@generated/comment/comment-order-by-relation-aggregate.input.ts b/@generated/comment/comment-order-by-relation-aggregate.input.ts index cdb95006..8124b8ab 100644 --- a/@generated/comment/comment-order-by-relation-aggregate.input.ts +++ b/@generated/comment/comment-order-by-relation-aggregate.input.ts @@ -4,6 +4,6 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class CommentOrderByRelationAggregateInput { - @Field(() => SortOrder, { nullable: true }) - _count?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + _count?: keyof typeof SortOrder; } diff --git a/@generated/comment/comment-order-by-relevance-field.enum.ts b/@generated/comment/comment-order-by-relevance-field.enum.ts index e16bbf4b..9e0adcd2 100644 --- a/@generated/comment/comment-order-by-relevance-field.enum.ts +++ b/@generated/comment/comment-order-by-relevance-field.enum.ts @@ -1,13 +1,13 @@ import { registerEnumType } from '@nestjs/graphql'; export enum CommentOrderByRelevanceFieldEnum { - id = 'id', - body = 'body', - authorId = 'authorId', - articleId = 'articleId', + id = 'id', + body = 'body', + authorId = 'authorId', + articleId = 'articleId', } registerEnumType(CommentOrderByRelevanceFieldEnum, { - name: 'CommentOrderByRelevanceFieldEnum', - description: undefined, + name: 'CommentOrderByRelevanceFieldEnum', + description: undefined, }); diff --git a/@generated/comment/comment-order-by-relevance.input.ts b/@generated/comment/comment-order-by-relevance.input.ts index f4fa0359..7ec03576 100644 --- a/@generated/comment/comment-order-by-relevance.input.ts +++ b/@generated/comment/comment-order-by-relevance.input.ts @@ -5,12 +5,12 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class CommentOrderByRelevanceInput { - @Field(() => [CommentOrderByRelevanceFieldEnum], { nullable: false }) - fields!: Array; + @Field(() => [CommentOrderByRelevanceFieldEnum], { nullable: false }) + fields!: Array; - @Field(() => SortOrder, { nullable: false }) - sort!: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: false }) + sort!: keyof typeof SortOrder; - @Field(() => String, { nullable: false }) - search!: string; + @Field(() => String, { nullable: false }) + search!: string; } diff --git a/@generated/comment/comment-order-by-with-aggregation.input.ts b/@generated/comment/comment-order-by-with-aggregation.input.ts index 5e31a04b..cef6f466 100644 --- a/@generated/comment/comment-order-by-with-aggregation.input.ts +++ b/@generated/comment/comment-order-by-with-aggregation.input.ts @@ -7,30 +7,30 @@ import { CommentMinOrderByAggregateInput } from './comment-min-order-by-aggregat @InputType() export class CommentOrderByWithAggregationInput { - @Field(() => SortOrder, { nullable: true }) - id?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + id?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - createdAt?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + createdAt?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - updatedAt?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + updatedAt?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - body?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + body?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - authorId?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + authorId?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - articleId?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + articleId?: keyof typeof SortOrder; - @Field(() => CommentCountOrderByAggregateInput, { nullable: true }) - _count?: CommentCountOrderByAggregateInput; + @Field(() => CommentCountOrderByAggregateInput, { nullable: true }) + _count?: CommentCountOrderByAggregateInput; - @Field(() => CommentMaxOrderByAggregateInput, { nullable: true }) - _max?: CommentMaxOrderByAggregateInput; + @Field(() => CommentMaxOrderByAggregateInput, { nullable: true }) + _max?: CommentMaxOrderByAggregateInput; - @Field(() => CommentMinOrderByAggregateInput, { nullable: true }) - _min?: CommentMinOrderByAggregateInput; + @Field(() => CommentMinOrderByAggregateInput, { nullable: true }) + _min?: CommentMinOrderByAggregateInput; } diff --git a/@generated/comment/comment-order-by-with-relation-and-search-relevance.input.ts b/@generated/comment/comment-order-by-with-relation-and-search-relevance.input.ts index bf018c25..ad1ac134 100644 --- a/@generated/comment/comment-order-by-with-relation-and-search-relevance.input.ts +++ b/@generated/comment/comment-order-by-with-relation-and-search-relevance.input.ts @@ -7,30 +7,30 @@ import { CommentOrderByRelevanceInput } from './comment-order-by-relevance.input @InputType() export class CommentOrderByWithRelationAndSearchRelevanceInput { - @Field(() => SortOrder, { nullable: true }) - id?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + id?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - createdAt?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + createdAt?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - updatedAt?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + updatedAt?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - body?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + body?: keyof typeof SortOrder; - @Field(() => UserOrderByWithRelationAndSearchRelevanceInput, { nullable: true }) - author?: UserOrderByWithRelationAndSearchRelevanceInput; + @Field(() => UserOrderByWithRelationAndSearchRelevanceInput, { nullable: true }) + author?: UserOrderByWithRelationAndSearchRelevanceInput; - @Field(() => SortOrder, { nullable: true }) - authorId?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + authorId?: keyof typeof SortOrder; - @Field(() => ArticleOrderByWithRelationAndSearchRelevanceInput, { nullable: true }) - article?: ArticleOrderByWithRelationAndSearchRelevanceInput; + @Field(() => ArticleOrderByWithRelationAndSearchRelevanceInput, { nullable: true }) + article?: ArticleOrderByWithRelationAndSearchRelevanceInput; - @Field(() => SortOrder, { nullable: true }) - articleId?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + articleId?: keyof typeof SortOrder; - @Field(() => CommentOrderByRelevanceInput, { nullable: true }) - _relevance?: CommentOrderByRelevanceInput; + @Field(() => CommentOrderByRelevanceInput, { nullable: true }) + _relevance?: CommentOrderByRelevanceInput; } diff --git a/@generated/comment/comment-scalar-field.enum.ts b/@generated/comment/comment-scalar-field.enum.ts index f14fde1f..075d0872 100644 --- a/@generated/comment/comment-scalar-field.enum.ts +++ b/@generated/comment/comment-scalar-field.enum.ts @@ -1,15 +1,15 @@ import { registerEnumType } from '@nestjs/graphql'; export enum CommentScalarFieldEnum { - id = 'id', - createdAt = 'createdAt', - updatedAt = 'updatedAt', - body = 'body', - authorId = 'authorId', - articleId = 'articleId', + id = 'id', + createdAt = 'createdAt', + updatedAt = 'updatedAt', + body = 'body', + authorId = 'authorId', + articleId = 'articleId', } registerEnumType(CommentScalarFieldEnum, { - name: 'CommentScalarFieldEnum', - description: undefined, + name: 'CommentScalarFieldEnum', + description: undefined, }); diff --git a/@generated/comment/comment-scalar-where-with-aggregates.input.ts b/@generated/comment/comment-scalar-where-with-aggregates.input.ts index 79f75bc5..8d613335 100644 --- a/@generated/comment/comment-scalar-where-with-aggregates.input.ts +++ b/@generated/comment/comment-scalar-where-with-aggregates.input.ts @@ -6,30 +6,30 @@ import { StringNullableWithAggregatesFilter } from '../prisma/string-nullable-wi @InputType() export class CommentScalarWhereWithAggregatesInput { - @Field(() => [CommentScalarWhereWithAggregatesInput], { nullable: true }) - AND?: Array; + @Field(() => [CommentScalarWhereWithAggregatesInput], { nullable: true }) + AND?: Array; - @Field(() => [CommentScalarWhereWithAggregatesInput], { nullable: true }) - OR?: Array; + @Field(() => [CommentScalarWhereWithAggregatesInput], { nullable: true }) + OR?: Array; - @Field(() => [CommentScalarWhereWithAggregatesInput], { nullable: true }) - NOT?: Array; + @Field(() => [CommentScalarWhereWithAggregatesInput], { nullable: true }) + NOT?: Array; - @Field(() => StringWithAggregatesFilter, { nullable: true }) - id?: StringWithAggregatesFilter; + @Field(() => StringWithAggregatesFilter, { nullable: true }) + id?: StringWithAggregatesFilter; - @Field(() => DateTimeWithAggregatesFilter, { nullable: true }) - createdAt?: DateTimeWithAggregatesFilter; + @Field(() => DateTimeWithAggregatesFilter, { nullable: true }) + createdAt?: DateTimeWithAggregatesFilter; - @Field(() => DateTimeWithAggregatesFilter, { nullable: true }) - updatedAt?: DateTimeWithAggregatesFilter; + @Field(() => DateTimeWithAggregatesFilter, { nullable: true }) + updatedAt?: DateTimeWithAggregatesFilter; - @Field(() => StringWithAggregatesFilter, { nullable: true }) - body?: StringWithAggregatesFilter; + @Field(() => StringWithAggregatesFilter, { nullable: true }) + body?: StringWithAggregatesFilter; - @Field(() => StringWithAggregatesFilter, { nullable: true }) - authorId?: StringWithAggregatesFilter; + @Field(() => StringWithAggregatesFilter, { nullable: true }) + authorId?: StringWithAggregatesFilter; - @Field(() => StringNullableWithAggregatesFilter, { nullable: true }) - articleId?: StringNullableWithAggregatesFilter; + @Field(() => StringNullableWithAggregatesFilter, { nullable: true }) + articleId?: StringNullableWithAggregatesFilter; } diff --git a/@generated/comment/comment-scalar-where.input.ts b/@generated/comment/comment-scalar-where.input.ts index b9aba238..2df79cb9 100644 --- a/@generated/comment/comment-scalar-where.input.ts +++ b/@generated/comment/comment-scalar-where.input.ts @@ -6,30 +6,30 @@ import { StringNullableFilter } from '../prisma/string-nullable-filter.input'; @InputType() export class CommentScalarWhereInput { - @Field(() => [CommentScalarWhereInput], { nullable: true }) - AND?: Array; + @Field(() => [CommentScalarWhereInput], { nullable: true }) + AND?: Array; - @Field(() => [CommentScalarWhereInput], { nullable: true }) - OR?: Array; + @Field(() => [CommentScalarWhereInput], { nullable: true }) + OR?: Array; - @Field(() => [CommentScalarWhereInput], { nullable: true }) - NOT?: Array; + @Field(() => [CommentScalarWhereInput], { nullable: true }) + NOT?: Array; - @Field(() => StringFilter, { nullable: true }) - id?: StringFilter; + @Field(() => StringFilter, { nullable: true }) + id?: StringFilter; - @Field(() => DateTimeFilter, { nullable: true }) - createdAt?: DateTimeFilter; + @Field(() => DateTimeFilter, { nullable: true }) + createdAt?: DateTimeFilter; - @Field(() => DateTimeFilter, { nullable: true }) - updatedAt?: DateTimeFilter; + @Field(() => DateTimeFilter, { nullable: true }) + updatedAt?: DateTimeFilter; - @Field(() => StringFilter, { nullable: true }) - body?: StringFilter; + @Field(() => StringFilter, { nullable: true }) + body?: StringFilter; - @Field(() => StringFilter, { nullable: true }) - authorId?: StringFilter; + @Field(() => StringFilter, { nullable: true }) + authorId?: StringFilter; - @Field(() => StringNullableFilter, { nullable: true }) - articleId?: StringNullableFilter; + @Field(() => StringNullableFilter, { nullable: true }) + articleId?: StringNullableFilter; } diff --git a/@generated/comment/comment-unchecked-create-nested-many-without-article.input.ts b/@generated/comment/comment-unchecked-create-nested-many-without-article.input.ts index 9118f996..5bfebc48 100644 --- a/@generated/comment/comment-unchecked-create-nested-many-without-article.input.ts +++ b/@generated/comment/comment-unchecked-create-nested-many-without-article.input.ts @@ -7,15 +7,15 @@ import { CommentWhereUniqueInput } from './comment-where-unique.input'; @InputType() export class CommentUncheckedCreateNestedManyWithoutArticleInput { - @Field(() => [CommentCreateWithoutArticleInput], { nullable: true }) - create?: Array; + @Field(() => [CommentCreateWithoutArticleInput], { nullable: true }) + create?: Array; - @Field(() => [CommentCreateOrConnectWithoutArticleInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [CommentCreateOrConnectWithoutArticleInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => CommentCreateManyArticleInputEnvelope, { nullable: true }) - createMany?: CommentCreateManyArticleInputEnvelope; + @Field(() => CommentCreateManyArticleInputEnvelope, { nullable: true }) + createMany?: CommentCreateManyArticleInputEnvelope; - @Field(() => [CommentWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [CommentWhereUniqueInput], { nullable: true }) + connect?: Array; } diff --git a/@generated/comment/comment-unchecked-create-nested-many-without-author.input.ts b/@generated/comment/comment-unchecked-create-nested-many-without-author.input.ts index 0b503197..0b2cd227 100644 --- a/@generated/comment/comment-unchecked-create-nested-many-without-author.input.ts +++ b/@generated/comment/comment-unchecked-create-nested-many-without-author.input.ts @@ -7,15 +7,15 @@ import { CommentWhereUniqueInput } from './comment-where-unique.input'; @InputType() export class CommentUncheckedCreateNestedManyWithoutAuthorInput { - @Field(() => [CommentCreateWithoutAuthorInput], { nullable: true }) - create?: Array; + @Field(() => [CommentCreateWithoutAuthorInput], { nullable: true }) + create?: Array; - @Field(() => [CommentCreateOrConnectWithoutAuthorInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [CommentCreateOrConnectWithoutAuthorInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => CommentCreateManyAuthorInputEnvelope, { nullable: true }) - createMany?: CommentCreateManyAuthorInputEnvelope; + @Field(() => CommentCreateManyAuthorInputEnvelope, { nullable: true }) + createMany?: CommentCreateManyAuthorInputEnvelope; - @Field(() => [CommentWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [CommentWhereUniqueInput], { nullable: true }) + connect?: Array; } diff --git a/@generated/comment/comment-unchecked-create-without-article.input.ts b/@generated/comment/comment-unchecked-create-without-article.input.ts index 1a514718..7a7fc62e 100644 --- a/@generated/comment/comment-unchecked-create-without-article.input.ts +++ b/@generated/comment/comment-unchecked-create-without-article.input.ts @@ -3,18 +3,18 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class CommentUncheckedCreateWithoutArticleInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => Date, { nullable: true }) - createdAt?: Date | string; + @Field(() => Date, { nullable: true }) + createdAt?: Date | string; - @Field(() => Date, { nullable: true }) - updatedAt?: Date | string; + @Field(() => Date, { nullable: true }) + updatedAt?: Date | string; - @Field(() => String, { nullable: false }) - body!: string; + @Field(() => String, { nullable: false }) + body!: string; - @Field(() => String, { nullable: false }) - authorId!: string; + @Field(() => String, { nullable: false }) + authorId!: string; } diff --git a/@generated/comment/comment-unchecked-create-without-author.input.ts b/@generated/comment/comment-unchecked-create-without-author.input.ts index 40d36d89..e1e5c600 100644 --- a/@generated/comment/comment-unchecked-create-without-author.input.ts +++ b/@generated/comment/comment-unchecked-create-without-author.input.ts @@ -3,18 +3,18 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class CommentUncheckedCreateWithoutAuthorInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => Date, { nullable: true }) - createdAt?: Date | string; + @Field(() => Date, { nullable: true }) + createdAt?: Date | string; - @Field(() => Date, { nullable: true }) - updatedAt?: Date | string; + @Field(() => Date, { nullable: true }) + updatedAt?: Date | string; - @Field(() => String, { nullable: false }) - body!: string; + @Field(() => String, { nullable: false }) + body!: string; - @Field(() => String, { nullable: true }) - articleId?: string; + @Field(() => String, { nullable: true }) + articleId?: string; } diff --git a/@generated/comment/comment-unchecked-create.input.ts b/@generated/comment/comment-unchecked-create.input.ts index 8ddf2a91..f1b76c78 100644 --- a/@generated/comment/comment-unchecked-create.input.ts +++ b/@generated/comment/comment-unchecked-create.input.ts @@ -3,21 +3,21 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class CommentUncheckedCreateInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => Date, { nullable: true }) - createdAt?: Date | string; + @Field(() => Date, { nullable: true }) + createdAt?: Date | string; - @Field(() => Date, { nullable: true }) - updatedAt?: Date | string; + @Field(() => Date, { nullable: true }) + updatedAt?: Date | string; - @Field(() => String, { nullable: false }) - body!: string; + @Field(() => String, { nullable: false }) + body!: string; - @Field(() => String, { nullable: false }) - authorId!: string; + @Field(() => String, { nullable: false }) + authorId!: string; - @Field(() => String, { nullable: true }) - articleId?: string; + @Field(() => String, { nullable: true }) + articleId?: string; } diff --git a/@generated/comment/comment-unchecked-update-many-without-article.input.ts b/@generated/comment/comment-unchecked-update-many-without-article.input.ts index 89336225..b983b8e0 100644 --- a/@generated/comment/comment-unchecked-update-many-without-article.input.ts +++ b/@generated/comment/comment-unchecked-update-many-without-article.input.ts @@ -11,36 +11,36 @@ import { CommentScalarWhereInput } from './comment-scalar-where.input'; @InputType() export class CommentUncheckedUpdateManyWithoutArticleInput { - @Field(() => [CommentCreateWithoutArticleInput], { nullable: true }) - create?: Array; + @Field(() => [CommentCreateWithoutArticleInput], { nullable: true }) + create?: Array; - @Field(() => [CommentCreateOrConnectWithoutArticleInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [CommentCreateOrConnectWithoutArticleInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => [CommentUpsertWithWhereUniqueWithoutArticleInput], { nullable: true }) - upsert?: Array; + @Field(() => [CommentUpsertWithWhereUniqueWithoutArticleInput], { nullable: true }) + upsert?: Array; - @Field(() => CommentCreateManyArticleInputEnvelope, { nullable: true }) - createMany?: CommentCreateManyArticleInputEnvelope; + @Field(() => CommentCreateManyArticleInputEnvelope, { nullable: true }) + createMany?: CommentCreateManyArticleInputEnvelope; - @Field(() => [CommentWhereUniqueInput], { nullable: true }) - set?: Array; + @Field(() => [CommentWhereUniqueInput], { nullable: true }) + set?: Array; - @Field(() => [CommentWhereUniqueInput], { nullable: true }) - disconnect?: Array; + @Field(() => [CommentWhereUniqueInput], { nullable: true }) + disconnect?: Array; - @Field(() => [CommentWhereUniqueInput], { nullable: true }) - delete?: Array; + @Field(() => [CommentWhereUniqueInput], { nullable: true }) + delete?: Array; - @Field(() => [CommentWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [CommentWhereUniqueInput], { nullable: true }) + connect?: Array; - @Field(() => [CommentUpdateWithWhereUniqueWithoutArticleInput], { nullable: true }) - update?: Array; + @Field(() => [CommentUpdateWithWhereUniqueWithoutArticleInput], { nullable: true }) + update?: Array; - @Field(() => [CommentUpdateManyWithWhereWithoutArticleInput], { nullable: true }) - updateMany?: Array; + @Field(() => [CommentUpdateManyWithWhereWithoutArticleInput], { nullable: true }) + updateMany?: Array; - @Field(() => [CommentScalarWhereInput], { nullable: true }) - deleteMany?: Array; + @Field(() => [CommentScalarWhereInput], { nullable: true }) + deleteMany?: Array; } diff --git a/@generated/comment/comment-unchecked-update-many-without-author.input.ts b/@generated/comment/comment-unchecked-update-many-without-author.input.ts index 85de02fe..92d97a7e 100644 --- a/@generated/comment/comment-unchecked-update-many-without-author.input.ts +++ b/@generated/comment/comment-unchecked-update-many-without-author.input.ts @@ -11,36 +11,36 @@ import { CommentScalarWhereInput } from './comment-scalar-where.input'; @InputType() export class CommentUncheckedUpdateManyWithoutAuthorInput { - @Field(() => [CommentCreateWithoutAuthorInput], { nullable: true }) - create?: Array; + @Field(() => [CommentCreateWithoutAuthorInput], { nullable: true }) + create?: Array; - @Field(() => [CommentCreateOrConnectWithoutAuthorInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [CommentCreateOrConnectWithoutAuthorInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => [CommentUpsertWithWhereUniqueWithoutAuthorInput], { nullable: true }) - upsert?: Array; + @Field(() => [CommentUpsertWithWhereUniqueWithoutAuthorInput], { nullable: true }) + upsert?: Array; - @Field(() => CommentCreateManyAuthorInputEnvelope, { nullable: true }) - createMany?: CommentCreateManyAuthorInputEnvelope; + @Field(() => CommentCreateManyAuthorInputEnvelope, { nullable: true }) + createMany?: CommentCreateManyAuthorInputEnvelope; - @Field(() => [CommentWhereUniqueInput], { nullable: true }) - set?: Array; + @Field(() => [CommentWhereUniqueInput], { nullable: true }) + set?: Array; - @Field(() => [CommentWhereUniqueInput], { nullable: true }) - disconnect?: Array; + @Field(() => [CommentWhereUniqueInput], { nullable: true }) + disconnect?: Array; - @Field(() => [CommentWhereUniqueInput], { nullable: true }) - delete?: Array; + @Field(() => [CommentWhereUniqueInput], { nullable: true }) + delete?: Array; - @Field(() => [CommentWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [CommentWhereUniqueInput], { nullable: true }) + connect?: Array; - @Field(() => [CommentUpdateWithWhereUniqueWithoutAuthorInput], { nullable: true }) - update?: Array; + @Field(() => [CommentUpdateWithWhereUniqueWithoutAuthorInput], { nullable: true }) + update?: Array; - @Field(() => [CommentUpdateManyWithWhereWithoutAuthorInput], { nullable: true }) - updateMany?: Array; + @Field(() => [CommentUpdateManyWithWhereWithoutAuthorInput], { nullable: true }) + updateMany?: Array; - @Field(() => [CommentScalarWhereInput], { nullable: true }) - deleteMany?: Array; + @Field(() => [CommentScalarWhereInput], { nullable: true }) + deleteMany?: Array; } diff --git a/@generated/comment/comment-unchecked-update-many-without-comments.input.ts b/@generated/comment/comment-unchecked-update-many-without-comments.input.ts index 867d8427..5569faa9 100644 --- a/@generated/comment/comment-unchecked-update-many-without-comments.input.ts +++ b/@generated/comment/comment-unchecked-update-many-without-comments.input.ts @@ -7,18 +7,18 @@ import { NullableStringFieldUpdateOperationsInput } from '../prisma/nullable-str @InputType() export class CommentUncheckedUpdateManyWithoutCommentsInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - createdAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + createdAt?: DateTimeFieldUpdateOperationsInput; - @HideField() - updatedAt?: DateTimeFieldUpdateOperationsInput; + @HideField() + updatedAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - body?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + body?: StringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - articleId?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + articleId?: NullableStringFieldUpdateOperationsInput; } diff --git a/@generated/comment/comment-unchecked-update-many.input.ts b/@generated/comment/comment-unchecked-update-many.input.ts index 9bc29f03..5aef42a4 100644 --- a/@generated/comment/comment-unchecked-update-many.input.ts +++ b/@generated/comment/comment-unchecked-update-many.input.ts @@ -7,21 +7,21 @@ import { NullableStringFieldUpdateOperationsInput } from '../prisma/nullable-str @InputType() export class CommentUncheckedUpdateManyInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - createdAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + createdAt?: DateTimeFieldUpdateOperationsInput; - @HideField() - updatedAt?: DateTimeFieldUpdateOperationsInput; + @HideField() + updatedAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - body?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + body?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - authorId?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + authorId?: StringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - articleId?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + articleId?: NullableStringFieldUpdateOperationsInput; } diff --git a/@generated/comment/comment-unchecked-update-without-article.input.ts b/@generated/comment/comment-unchecked-update-without-article.input.ts index 926f904e..642fe026 100644 --- a/@generated/comment/comment-unchecked-update-without-article.input.ts +++ b/@generated/comment/comment-unchecked-update-without-article.input.ts @@ -6,18 +6,18 @@ import { HideField } from '@nestjs/graphql'; @InputType() export class CommentUncheckedUpdateWithoutArticleInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - createdAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + createdAt?: DateTimeFieldUpdateOperationsInput; - @HideField() - updatedAt?: DateTimeFieldUpdateOperationsInput; + @HideField() + updatedAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - body?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + body?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - authorId?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + authorId?: StringFieldUpdateOperationsInput; } diff --git a/@generated/comment/comment-unchecked-update-without-author.input.ts b/@generated/comment/comment-unchecked-update-without-author.input.ts index 114ab8b5..5973f8ba 100644 --- a/@generated/comment/comment-unchecked-update-without-author.input.ts +++ b/@generated/comment/comment-unchecked-update-without-author.input.ts @@ -7,18 +7,18 @@ import { NullableStringFieldUpdateOperationsInput } from '../prisma/nullable-str @InputType() export class CommentUncheckedUpdateWithoutAuthorInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - createdAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + createdAt?: DateTimeFieldUpdateOperationsInput; - @HideField() - updatedAt?: DateTimeFieldUpdateOperationsInput; + @HideField() + updatedAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - body?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + body?: StringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - articleId?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + articleId?: NullableStringFieldUpdateOperationsInput; } diff --git a/@generated/comment/comment-unchecked-update.input.ts b/@generated/comment/comment-unchecked-update.input.ts index 8dff5b21..3cb75246 100644 --- a/@generated/comment/comment-unchecked-update.input.ts +++ b/@generated/comment/comment-unchecked-update.input.ts @@ -7,21 +7,21 @@ import { NullableStringFieldUpdateOperationsInput } from '../prisma/nullable-str @InputType() export class CommentUncheckedUpdateInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - createdAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + createdAt?: DateTimeFieldUpdateOperationsInput; - @HideField() - updatedAt?: DateTimeFieldUpdateOperationsInput; + @HideField() + updatedAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - body?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + body?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - authorId?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + authorId?: StringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - articleId?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + articleId?: NullableStringFieldUpdateOperationsInput; } diff --git a/@generated/comment/comment-update-many-mutation.input.ts b/@generated/comment/comment-update-many-mutation.input.ts index 695fc40a..702eae50 100644 --- a/@generated/comment/comment-update-many-mutation.input.ts +++ b/@generated/comment/comment-update-many-mutation.input.ts @@ -6,15 +6,15 @@ import { HideField } from '@nestjs/graphql'; @InputType() export class CommentUpdateManyMutationInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - createdAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + createdAt?: DateTimeFieldUpdateOperationsInput; - @HideField() - updatedAt?: DateTimeFieldUpdateOperationsInput; + @HideField() + updatedAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - body?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + body?: StringFieldUpdateOperationsInput; } diff --git a/@generated/comment/comment-update-many-with-where-without-article.input.ts b/@generated/comment/comment-update-many-with-where-without-article.input.ts index c1e6a4af..6d81a84f 100644 --- a/@generated/comment/comment-update-many-with-where-without-article.input.ts +++ b/@generated/comment/comment-update-many-with-where-without-article.input.ts @@ -5,9 +5,9 @@ import { CommentUpdateManyMutationInput } from './comment-update-many-mutation.i @InputType() export class CommentUpdateManyWithWhereWithoutArticleInput { - @Field(() => CommentScalarWhereInput, { nullable: false }) - where!: CommentScalarWhereInput; + @Field(() => CommentScalarWhereInput, { nullable: false }) + where!: CommentScalarWhereInput; - @Field(() => CommentUpdateManyMutationInput, { nullable: false }) - data!: CommentUpdateManyMutationInput; + @Field(() => CommentUpdateManyMutationInput, { nullable: false }) + data!: CommentUpdateManyMutationInput; } diff --git a/@generated/comment/comment-update-many-with-where-without-author.input.ts b/@generated/comment/comment-update-many-with-where-without-author.input.ts index 9e8c7546..c316eea8 100644 --- a/@generated/comment/comment-update-many-with-where-without-author.input.ts +++ b/@generated/comment/comment-update-many-with-where-without-author.input.ts @@ -5,9 +5,9 @@ import { CommentUpdateManyMutationInput } from './comment-update-many-mutation.i @InputType() export class CommentUpdateManyWithWhereWithoutAuthorInput { - @Field(() => CommentScalarWhereInput, { nullable: false }) - where!: CommentScalarWhereInput; + @Field(() => CommentScalarWhereInput, { nullable: false }) + where!: CommentScalarWhereInput; - @Field(() => CommentUpdateManyMutationInput, { nullable: false }) - data!: CommentUpdateManyMutationInput; + @Field(() => CommentUpdateManyMutationInput, { nullable: false }) + data!: CommentUpdateManyMutationInput; } diff --git a/@generated/comment/comment-update-many-without-article.input.ts b/@generated/comment/comment-update-many-without-article.input.ts index 9df7b08a..669f70a3 100644 --- a/@generated/comment/comment-update-many-without-article.input.ts +++ b/@generated/comment/comment-update-many-without-article.input.ts @@ -11,36 +11,36 @@ import { CommentScalarWhereInput } from './comment-scalar-where.input'; @InputType() export class CommentUpdateManyWithoutArticleInput { - @Field(() => [CommentCreateWithoutArticleInput], { nullable: true }) - create?: Array; + @Field(() => [CommentCreateWithoutArticleInput], { nullable: true }) + create?: Array; - @Field(() => [CommentCreateOrConnectWithoutArticleInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [CommentCreateOrConnectWithoutArticleInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => [CommentUpsertWithWhereUniqueWithoutArticleInput], { nullable: true }) - upsert?: Array; + @Field(() => [CommentUpsertWithWhereUniqueWithoutArticleInput], { nullable: true }) + upsert?: Array; - @Field(() => CommentCreateManyArticleInputEnvelope, { nullable: true }) - createMany?: CommentCreateManyArticleInputEnvelope; + @Field(() => CommentCreateManyArticleInputEnvelope, { nullable: true }) + createMany?: CommentCreateManyArticleInputEnvelope; - @Field(() => [CommentWhereUniqueInput], { nullable: true }) - set?: Array; + @Field(() => [CommentWhereUniqueInput], { nullable: true }) + set?: Array; - @Field(() => [CommentWhereUniqueInput], { nullable: true }) - disconnect?: Array; + @Field(() => [CommentWhereUniqueInput], { nullable: true }) + disconnect?: Array; - @Field(() => [CommentWhereUniqueInput], { nullable: true }) - delete?: Array; + @Field(() => [CommentWhereUniqueInput], { nullable: true }) + delete?: Array; - @Field(() => [CommentWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [CommentWhereUniqueInput], { nullable: true }) + connect?: Array; - @Field(() => [CommentUpdateWithWhereUniqueWithoutArticleInput], { nullable: true }) - update?: Array; + @Field(() => [CommentUpdateWithWhereUniqueWithoutArticleInput], { nullable: true }) + update?: Array; - @Field(() => [CommentUpdateManyWithWhereWithoutArticleInput], { nullable: true }) - updateMany?: Array; + @Field(() => [CommentUpdateManyWithWhereWithoutArticleInput], { nullable: true }) + updateMany?: Array; - @Field(() => [CommentScalarWhereInput], { nullable: true }) - deleteMany?: Array; + @Field(() => [CommentScalarWhereInput], { nullable: true }) + deleteMany?: Array; } diff --git a/@generated/comment/comment-update-many-without-author.input.ts b/@generated/comment/comment-update-many-without-author.input.ts index 962568d8..10de85e3 100644 --- a/@generated/comment/comment-update-many-without-author.input.ts +++ b/@generated/comment/comment-update-many-without-author.input.ts @@ -11,36 +11,36 @@ import { CommentScalarWhereInput } from './comment-scalar-where.input'; @InputType() export class CommentUpdateManyWithoutAuthorInput { - @Field(() => [CommentCreateWithoutAuthorInput], { nullable: true }) - create?: Array; + @Field(() => [CommentCreateWithoutAuthorInput], { nullable: true }) + create?: Array; - @Field(() => [CommentCreateOrConnectWithoutAuthorInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [CommentCreateOrConnectWithoutAuthorInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => [CommentUpsertWithWhereUniqueWithoutAuthorInput], { nullable: true }) - upsert?: Array; + @Field(() => [CommentUpsertWithWhereUniqueWithoutAuthorInput], { nullable: true }) + upsert?: Array; - @Field(() => CommentCreateManyAuthorInputEnvelope, { nullable: true }) - createMany?: CommentCreateManyAuthorInputEnvelope; + @Field(() => CommentCreateManyAuthorInputEnvelope, { nullable: true }) + createMany?: CommentCreateManyAuthorInputEnvelope; - @Field(() => [CommentWhereUniqueInput], { nullable: true }) - set?: Array; + @Field(() => [CommentWhereUniqueInput], { nullable: true }) + set?: Array; - @Field(() => [CommentWhereUniqueInput], { nullable: true }) - disconnect?: Array; + @Field(() => [CommentWhereUniqueInput], { nullable: true }) + disconnect?: Array; - @Field(() => [CommentWhereUniqueInput], { nullable: true }) - delete?: Array; + @Field(() => [CommentWhereUniqueInput], { nullable: true }) + delete?: Array; - @Field(() => [CommentWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [CommentWhereUniqueInput], { nullable: true }) + connect?: Array; - @Field(() => [CommentUpdateWithWhereUniqueWithoutAuthorInput], { nullable: true }) - update?: Array; + @Field(() => [CommentUpdateWithWhereUniqueWithoutAuthorInput], { nullable: true }) + update?: Array; - @Field(() => [CommentUpdateManyWithWhereWithoutAuthorInput], { nullable: true }) - updateMany?: Array; + @Field(() => [CommentUpdateManyWithWhereWithoutAuthorInput], { nullable: true }) + updateMany?: Array; - @Field(() => [CommentScalarWhereInput], { nullable: true }) - deleteMany?: Array; + @Field(() => [CommentScalarWhereInput], { nullable: true }) + deleteMany?: Array; } diff --git a/@generated/comment/comment-update-with-where-unique-without-article.input.ts b/@generated/comment/comment-update-with-where-unique-without-article.input.ts index 10478e71..9be53d6f 100644 --- a/@generated/comment/comment-update-with-where-unique-without-article.input.ts +++ b/@generated/comment/comment-update-with-where-unique-without-article.input.ts @@ -5,9 +5,9 @@ import { CommentUpdateWithoutArticleInput } from './comment-update-without-artic @InputType() export class CommentUpdateWithWhereUniqueWithoutArticleInput { - @Field(() => CommentWhereUniqueInput, { nullable: false }) - where!: CommentWhereUniqueInput; + @Field(() => CommentWhereUniqueInput, { nullable: false }) + where!: CommentWhereUniqueInput; - @Field(() => CommentUpdateWithoutArticleInput, { nullable: false }) - data!: CommentUpdateWithoutArticleInput; + @Field(() => CommentUpdateWithoutArticleInput, { nullable: false }) + data!: CommentUpdateWithoutArticleInput; } diff --git a/@generated/comment/comment-update-with-where-unique-without-author.input.ts b/@generated/comment/comment-update-with-where-unique-without-author.input.ts index 6f28e27a..015ee69a 100644 --- a/@generated/comment/comment-update-with-where-unique-without-author.input.ts +++ b/@generated/comment/comment-update-with-where-unique-without-author.input.ts @@ -5,9 +5,9 @@ import { CommentUpdateWithoutAuthorInput } from './comment-update-without-author @InputType() export class CommentUpdateWithWhereUniqueWithoutAuthorInput { - @Field(() => CommentWhereUniqueInput, { nullable: false }) - where!: CommentWhereUniqueInput; + @Field(() => CommentWhereUniqueInput, { nullable: false }) + where!: CommentWhereUniqueInput; - @Field(() => CommentUpdateWithoutAuthorInput, { nullable: false }) - data!: CommentUpdateWithoutAuthorInput; + @Field(() => CommentUpdateWithoutAuthorInput, { nullable: false }) + data!: CommentUpdateWithoutAuthorInput; } diff --git a/@generated/comment/comment-update-without-article.input.ts b/@generated/comment/comment-update-without-article.input.ts index 944a0d1b..22cbcc63 100644 --- a/@generated/comment/comment-update-without-article.input.ts +++ b/@generated/comment/comment-update-without-article.input.ts @@ -7,18 +7,18 @@ import { UserUpdateOneRequiredWithoutCommentsInput } from '../user/user-update-o @InputType() export class CommentUpdateWithoutArticleInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - createdAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + createdAt?: DateTimeFieldUpdateOperationsInput; - @HideField() - updatedAt?: DateTimeFieldUpdateOperationsInput; + @HideField() + updatedAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - body?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + body?: StringFieldUpdateOperationsInput; - @Field(() => UserUpdateOneRequiredWithoutCommentsInput, { nullable: true }) - author?: UserUpdateOneRequiredWithoutCommentsInput; + @Field(() => UserUpdateOneRequiredWithoutCommentsInput, { nullable: true }) + author?: UserUpdateOneRequiredWithoutCommentsInput; } diff --git a/@generated/comment/comment-update-without-author.input.ts b/@generated/comment/comment-update-without-author.input.ts index efee9f02..3a9f8e87 100644 --- a/@generated/comment/comment-update-without-author.input.ts +++ b/@generated/comment/comment-update-without-author.input.ts @@ -7,18 +7,18 @@ import { ArticleUpdateOneWithoutCommentsInput } from '../article/article-update- @InputType() export class CommentUpdateWithoutAuthorInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - createdAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + createdAt?: DateTimeFieldUpdateOperationsInput; - @HideField() - updatedAt?: DateTimeFieldUpdateOperationsInput; + @HideField() + updatedAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - body?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + body?: StringFieldUpdateOperationsInput; - @Field(() => ArticleUpdateOneWithoutCommentsInput, { nullable: true }) - article?: ArticleUpdateOneWithoutCommentsInput; + @Field(() => ArticleUpdateOneWithoutCommentsInput, { nullable: true }) + article?: ArticleUpdateOneWithoutCommentsInput; } diff --git a/@generated/comment/comment-update.input.ts b/@generated/comment/comment-update.input.ts index b6d27055..923ff667 100644 --- a/@generated/comment/comment-update.input.ts +++ b/@generated/comment/comment-update.input.ts @@ -8,21 +8,21 @@ import { ArticleUpdateOneWithoutCommentsInput } from '../article/article-update- @InputType() export class CommentUpdateInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - createdAt?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + createdAt?: DateTimeFieldUpdateOperationsInput; - @HideField() - updatedAt?: DateTimeFieldUpdateOperationsInput; + @HideField() + updatedAt?: DateTimeFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - body?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + body?: StringFieldUpdateOperationsInput; - @Field(() => UserUpdateOneRequiredWithoutCommentsInput, { nullable: true }) - author?: UserUpdateOneRequiredWithoutCommentsInput; + @Field(() => UserUpdateOneRequiredWithoutCommentsInput, { nullable: true }) + author?: UserUpdateOneRequiredWithoutCommentsInput; - @Field(() => ArticleUpdateOneWithoutCommentsInput, { nullable: true }) - article?: ArticleUpdateOneWithoutCommentsInput; + @Field(() => ArticleUpdateOneWithoutCommentsInput, { nullable: true }) + article?: ArticleUpdateOneWithoutCommentsInput; } diff --git a/@generated/comment/comment-upsert-with-where-unique-without-article.input.ts b/@generated/comment/comment-upsert-with-where-unique-without-article.input.ts index 12461290..a4dc013d 100644 --- a/@generated/comment/comment-upsert-with-where-unique-without-article.input.ts +++ b/@generated/comment/comment-upsert-with-where-unique-without-article.input.ts @@ -6,12 +6,12 @@ import { CommentCreateWithoutArticleInput } from './comment-create-without-artic @InputType() export class CommentUpsertWithWhereUniqueWithoutArticleInput { - @Field(() => CommentWhereUniqueInput, { nullable: false }) - where!: CommentWhereUniqueInput; + @Field(() => CommentWhereUniqueInput, { nullable: false }) + where!: CommentWhereUniqueInput; - @Field(() => CommentUpdateWithoutArticleInput, { nullable: false }) - update!: CommentUpdateWithoutArticleInput; + @Field(() => CommentUpdateWithoutArticleInput, { nullable: false }) + update!: CommentUpdateWithoutArticleInput; - @Field(() => CommentCreateWithoutArticleInput, { nullable: false }) - create!: CommentCreateWithoutArticleInput; + @Field(() => CommentCreateWithoutArticleInput, { nullable: false }) + create!: CommentCreateWithoutArticleInput; } diff --git a/@generated/comment/comment-upsert-with-where-unique-without-author.input.ts b/@generated/comment/comment-upsert-with-where-unique-without-author.input.ts index 8bedce5f..b45b3563 100644 --- a/@generated/comment/comment-upsert-with-where-unique-without-author.input.ts +++ b/@generated/comment/comment-upsert-with-where-unique-without-author.input.ts @@ -6,12 +6,12 @@ import { CommentCreateWithoutAuthorInput } from './comment-create-without-author @InputType() export class CommentUpsertWithWhereUniqueWithoutAuthorInput { - @Field(() => CommentWhereUniqueInput, { nullable: false }) - where!: CommentWhereUniqueInput; + @Field(() => CommentWhereUniqueInput, { nullable: false }) + where!: CommentWhereUniqueInput; - @Field(() => CommentUpdateWithoutAuthorInput, { nullable: false }) - update!: CommentUpdateWithoutAuthorInput; + @Field(() => CommentUpdateWithoutAuthorInput, { nullable: false }) + update!: CommentUpdateWithoutAuthorInput; - @Field(() => CommentCreateWithoutAuthorInput, { nullable: false }) - create!: CommentCreateWithoutAuthorInput; + @Field(() => CommentCreateWithoutAuthorInput, { nullable: false }) + create!: CommentCreateWithoutAuthorInput; } diff --git a/@generated/comment/comment-where-unique.input.ts b/@generated/comment/comment-where-unique.input.ts index c82343d0..ed23c5bb 100644 --- a/@generated/comment/comment-where-unique.input.ts +++ b/@generated/comment/comment-where-unique.input.ts @@ -3,6 +3,6 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class CommentWhereUniqueInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; } diff --git a/@generated/comment/comment-where.input.ts b/@generated/comment/comment-where.input.ts index d88cea21..2146137c 100644 --- a/@generated/comment/comment-where.input.ts +++ b/@generated/comment/comment-where.input.ts @@ -8,36 +8,36 @@ import { StringNullableFilter } from '../prisma/string-nullable-filter.input'; @InputType() export class CommentWhereInput { - @Field(() => [CommentWhereInput], { nullable: true }) - AND?: Array; + @Field(() => [CommentWhereInput], { nullable: true }) + AND?: Array; - @Field(() => [CommentWhereInput], { nullable: true }) - OR?: Array; + @Field(() => [CommentWhereInput], { nullable: true }) + OR?: Array; - @Field(() => [CommentWhereInput], { nullable: true }) - NOT?: Array; + @Field(() => [CommentWhereInput], { nullable: true }) + NOT?: Array; - @Field(() => StringFilter, { nullable: true }) - id?: StringFilter; + @Field(() => StringFilter, { nullable: true }) + id?: StringFilter; - @Field(() => DateTimeFilter, { nullable: true }) - createdAt?: DateTimeFilter; + @Field(() => DateTimeFilter, { nullable: true }) + createdAt?: DateTimeFilter; - @Field(() => DateTimeFilter, { nullable: true }) - updatedAt?: DateTimeFilter; + @Field(() => DateTimeFilter, { nullable: true }) + updatedAt?: DateTimeFilter; - @Field(() => StringFilter, { nullable: true }) - body?: StringFilter; + @Field(() => StringFilter, { nullable: true }) + body?: StringFilter; - @Field(() => UserWhereInput, { nullable: true }) - author?: UserWhereInput; + @Field(() => UserWhereInput, { nullable: true }) + author?: UserWhereInput; - @Field(() => StringFilter, { nullable: true }) - authorId?: StringFilter; + @Field(() => StringFilter, { nullable: true }) + authorId?: StringFilter; - @Field(() => ArticleWhereInput, { nullable: true }) - article?: ArticleWhereInput; + @Field(() => ArticleWhereInput, { nullable: true }) + article?: ArticleWhereInput; - @Field(() => StringNullableFilter, { nullable: true }) - articleId?: StringNullableFilter; + @Field(() => StringNullableFilter, { nullable: true }) + articleId?: StringNullableFilter; } diff --git a/@generated/comment/comment.model.ts b/@generated/comment/comment.model.ts index 51996de3..80b3b41a 100644 --- a/@generated/comment/comment.model.ts +++ b/@generated/comment/comment.model.ts @@ -6,27 +6,27 @@ import { Article } from '../article/article.model'; @ObjectType() export class Comment { - @Field(() => ID, { nullable: false }) - id!: string; + @Field(() => ID, { nullable: false }) + id!: string; - @Field(() => Date, { nullable: false }) - createdAt!: Date; + @Field(() => Date, { nullable: false }) + createdAt!: Date; - @Field(() => Date, { nullable: false }) - updatedAt!: Date; + @Field(() => Date, { nullable: false }) + updatedAt!: Date; - @Field(() => String, { nullable: false }) - body!: string; + @Field(() => String, { nullable: false }) + body!: string; - @Field(() => User, { nullable: false }) - author?: User; + @Field(() => User, { nullable: false }) + author?: User; - @Field(() => String, { nullable: false }) - authorId!: string; + @Field(() => String, { nullable: false }) + authorId!: string; - @Field(() => Article, { nullable: true }) - article?: Article | null; + @Field(() => Article, { nullable: true }) + article?: Article | null; - @Field(() => String, { nullable: true }) - articleId!: string | null; + @Field(() => String, { nullable: true }) + articleId!: string | null; } diff --git a/@generated/comment/create-many-comment.args.ts b/@generated/comment/create-many-comment.args.ts index 300f3f10..6aae1da5 100644 --- a/@generated/comment/create-many-comment.args.ts +++ b/@generated/comment/create-many-comment.args.ts @@ -4,9 +4,9 @@ import { CommentCreateManyInput } from './comment-create-many.input'; @ArgsType() export class CreateManyCommentArgs { - @Field(() => [CommentCreateManyInput], { nullable: false }) - data!: Array; + @Field(() => [CommentCreateManyInput], { nullable: false }) + data!: Array; - @Field(() => Boolean, { nullable: true }) - skipDuplicates?: boolean; + @Field(() => Boolean, { nullable: true }) + skipDuplicates?: boolean; } diff --git a/@generated/comment/create-one-comment.args.ts b/@generated/comment/create-one-comment.args.ts index e018b270..9f236611 100644 --- a/@generated/comment/create-one-comment.args.ts +++ b/@generated/comment/create-one-comment.args.ts @@ -4,6 +4,6 @@ import { CommentCreateInput } from './comment-create.input'; @ArgsType() export class CreateOneCommentArgs { - @Field(() => CommentCreateInput, { nullable: false }) - data!: CommentCreateInput; + @Field(() => CommentCreateInput, { nullable: false }) + data!: CommentCreateInput; } diff --git a/@generated/comment/delete-many-comment.args.ts b/@generated/comment/delete-many-comment.args.ts index 060abade..b365bd2e 100644 --- a/@generated/comment/delete-many-comment.args.ts +++ b/@generated/comment/delete-many-comment.args.ts @@ -4,6 +4,6 @@ import { CommentWhereInput } from './comment-where.input'; @ArgsType() export class DeleteManyCommentArgs { - @Field(() => CommentWhereInput, { nullable: true }) - where?: CommentWhereInput; + @Field(() => CommentWhereInput, { nullable: true }) + where?: CommentWhereInput; } diff --git a/@generated/comment/delete-one-comment.args.ts b/@generated/comment/delete-one-comment.args.ts index 95624ba2..0e465a30 100644 --- a/@generated/comment/delete-one-comment.args.ts +++ b/@generated/comment/delete-one-comment.args.ts @@ -4,6 +4,6 @@ import { CommentWhereUniqueInput } from './comment-where-unique.input'; @ArgsType() export class DeleteOneCommentArgs { - @Field(() => CommentWhereUniqueInput, { nullable: false }) - where!: CommentWhereUniqueInput; + @Field(() => CommentWhereUniqueInput, { nullable: false }) + where!: CommentWhereUniqueInput; } diff --git a/@generated/comment/find-first-comment.args.ts b/@generated/comment/find-first-comment.args.ts index 4ee0052b..fea15f0b 100644 --- a/@generated/comment/find-first-comment.args.ts +++ b/@generated/comment/find-first-comment.args.ts @@ -8,23 +8,23 @@ import { CommentScalarFieldEnum } from './comment-scalar-field.enum'; @ArgsType() export class FindFirstCommentArgs { - @Field(() => CommentWhereInput, { nullable: true }) - where?: CommentWhereInput; + @Field(() => CommentWhereInput, { nullable: true }) + where?: CommentWhereInput; - @Field(() => [CommentOrderByWithRelationAndSearchRelevanceInput], { - nullable: true, - }) - orderBy?: Array; + @Field(() => [CommentOrderByWithRelationAndSearchRelevanceInput], { + nullable: true, + }) + orderBy?: Array; - @Field(() => CommentWhereUniqueInput, { nullable: true }) - cursor?: CommentWhereUniqueInput; + @Field(() => CommentWhereUniqueInput, { nullable: true }) + cursor?: CommentWhereUniqueInput; - @Field(() => Int, { nullable: true }) - take?: number; + @Field(() => Int, { nullable: true }) + take?: number; - @Field(() => Int, { nullable: true }) - skip?: number; + @Field(() => Int, { nullable: true }) + skip?: number; - @Field(() => [CommentScalarFieldEnum], { nullable: true }) - distinct?: Array; + @Field(() => [CommentScalarFieldEnum], { nullable: true }) + distinct?: Array; } diff --git a/@generated/comment/find-many-comment.args.ts b/@generated/comment/find-many-comment.args.ts index 90accd27..0043f50c 100644 --- a/@generated/comment/find-many-comment.args.ts +++ b/@generated/comment/find-many-comment.args.ts @@ -8,23 +8,23 @@ import { CommentScalarFieldEnum } from './comment-scalar-field.enum'; @ArgsType() export class FindManyCommentArgs { - @Field(() => CommentWhereInput, { nullable: true }) - where?: CommentWhereInput; + @Field(() => CommentWhereInput, { nullable: true }) + where?: CommentWhereInput; - @Field(() => [CommentOrderByWithRelationAndSearchRelevanceInput], { - nullable: true, - }) - orderBy?: Array; + @Field(() => [CommentOrderByWithRelationAndSearchRelevanceInput], { + nullable: true, + }) + orderBy?: Array; - @Field(() => CommentWhereUniqueInput, { nullable: true }) - cursor?: CommentWhereUniqueInput; + @Field(() => CommentWhereUniqueInput, { nullable: true }) + cursor?: CommentWhereUniqueInput; - @Field(() => Int, { nullable: true }) - take?: number; + @Field(() => Int, { nullable: true }) + take?: number; - @Field(() => Int, { nullable: true }) - skip?: number; + @Field(() => Int, { nullable: true }) + skip?: number; - @Field(() => [CommentScalarFieldEnum], { nullable: true }) - distinct?: Array; + @Field(() => [CommentScalarFieldEnum], { nullable: true }) + distinct?: Array; } diff --git a/@generated/comment/find-unique-comment.args.ts b/@generated/comment/find-unique-comment.args.ts index bc041763..aeb48068 100644 --- a/@generated/comment/find-unique-comment.args.ts +++ b/@generated/comment/find-unique-comment.args.ts @@ -4,6 +4,6 @@ import { CommentWhereUniqueInput } from './comment-where-unique.input'; @ArgsType() export class FindUniqueCommentArgs { - @Field(() => CommentWhereUniqueInput, { nullable: false }) - where!: CommentWhereUniqueInput; + @Field(() => CommentWhereUniqueInput, { nullable: false }) + where!: CommentWhereUniqueInput; } diff --git a/@generated/comment/update-many-comment.args.ts b/@generated/comment/update-many-comment.args.ts index b1d51fae..ce8d7d7b 100644 --- a/@generated/comment/update-many-comment.args.ts +++ b/@generated/comment/update-many-comment.args.ts @@ -5,9 +5,9 @@ import { CommentWhereInput } from './comment-where.input'; @ArgsType() export class UpdateManyCommentArgs { - @Field(() => CommentUpdateManyMutationInput, { nullable: false }) - data!: CommentUpdateManyMutationInput; + @Field(() => CommentUpdateManyMutationInput, { nullable: false }) + data!: CommentUpdateManyMutationInput; - @Field(() => CommentWhereInput, { nullable: true }) - where?: CommentWhereInput; + @Field(() => CommentWhereInput, { nullable: true }) + where?: CommentWhereInput; } diff --git a/@generated/comment/update-one-comment.args.ts b/@generated/comment/update-one-comment.args.ts index 256f3d61..52fb964a 100644 --- a/@generated/comment/update-one-comment.args.ts +++ b/@generated/comment/update-one-comment.args.ts @@ -5,9 +5,9 @@ import { CommentWhereUniqueInput } from './comment-where-unique.input'; @ArgsType() export class UpdateOneCommentArgs { - @Field(() => CommentUpdateInput, { nullable: false }) - data!: CommentUpdateInput; + @Field(() => CommentUpdateInput, { nullable: false }) + data!: CommentUpdateInput; - @Field(() => CommentWhereUniqueInput, { nullable: false }) - where!: CommentWhereUniqueInput; + @Field(() => CommentWhereUniqueInput, { nullable: false }) + where!: CommentWhereUniqueInput; } diff --git a/@generated/comment/upsert-one-comment.args.ts b/@generated/comment/upsert-one-comment.args.ts index c6051566..1f513c9f 100644 --- a/@generated/comment/upsert-one-comment.args.ts +++ b/@generated/comment/upsert-one-comment.args.ts @@ -6,12 +6,12 @@ import { CommentUpdateInput } from './comment-update.input'; @ArgsType() export class UpsertOneCommentArgs { - @Field(() => CommentWhereUniqueInput, { nullable: false }) - where!: CommentWhereUniqueInput; + @Field(() => CommentWhereUniqueInput, { nullable: false }) + where!: CommentWhereUniqueInput; - @Field(() => CommentCreateInput, { nullable: false }) - create!: CommentCreateInput; + @Field(() => CommentCreateInput, { nullable: false }) + create!: CommentCreateInput; - @Field(() => CommentUpdateInput, { nullable: false }) - update!: CommentUpdateInput; + @Field(() => CommentUpdateInput, { nullable: false }) + update!: CommentUpdateInput; } diff --git a/@generated/dummy/aggregate-dummy.output.ts b/@generated/dummy/aggregate-dummy.output.ts index 94548756..7e8da3a8 100644 --- a/@generated/dummy/aggregate-dummy.output.ts +++ b/@generated/dummy/aggregate-dummy.output.ts @@ -8,18 +8,18 @@ import { DummyMaxAggregate } from './dummy-max-aggregate.output'; @ObjectType() export class AggregateDummy { - @Field(() => DummyCountAggregate, { nullable: true }) - _count?: DummyCountAggregate; + @Field(() => DummyCountAggregate, { nullable: true }) + _count?: DummyCountAggregate; - @Field(() => DummyAvgAggregate, { nullable: true }) - _avg?: DummyAvgAggregate; + @Field(() => DummyAvgAggregate, { nullable: true }) + _avg?: DummyAvgAggregate; - @Field(() => DummySumAggregate, { nullable: true }) - _sum?: DummySumAggregate; + @Field(() => DummySumAggregate, { nullable: true }) + _sum?: DummySumAggregate; - @Field(() => DummyMinAggregate, { nullable: true }) - _min?: DummyMinAggregate; + @Field(() => DummyMinAggregate, { nullable: true }) + _min?: DummyMinAggregate; - @Field(() => DummyMaxAggregate, { nullable: true }) - _max?: DummyMaxAggregate; + @Field(() => DummyMaxAggregate, { nullable: true }) + _max?: DummyMaxAggregate; } diff --git a/@generated/dummy/create-many-dummy.args.ts b/@generated/dummy/create-many-dummy.args.ts index 90a417cc..94219c0b 100644 --- a/@generated/dummy/create-many-dummy.args.ts +++ b/@generated/dummy/create-many-dummy.args.ts @@ -4,9 +4,9 @@ import { DummyCreateManyInput } from './dummy-create-many.input'; @ArgsType() export class CreateManyDummyArgs { - @Field(() => [DummyCreateManyInput], { nullable: false }) - data!: Array; + @Field(() => [DummyCreateManyInput], { nullable: false }) + data!: Array; - @Field(() => Boolean, { nullable: true }) - skipDuplicates?: boolean; + @Field(() => Boolean, { nullable: true }) + skipDuplicates?: boolean; } diff --git a/@generated/dummy/create-one-dummy.args.ts b/@generated/dummy/create-one-dummy.args.ts index 1e77daa1..b8d7dc94 100644 --- a/@generated/dummy/create-one-dummy.args.ts +++ b/@generated/dummy/create-one-dummy.args.ts @@ -4,6 +4,6 @@ import { DummyCreateInput } from './dummy-create.input'; @ArgsType() export class CreateOneDummyArgs { - @Field(() => DummyCreateInput, { nullable: false }) - data!: DummyCreateInput; + @Field(() => DummyCreateInput, { nullable: false }) + data!: DummyCreateInput; } diff --git a/@generated/dummy/delete-many-dummy.args.ts b/@generated/dummy/delete-many-dummy.args.ts index d4e6fdb9..6d974a78 100644 --- a/@generated/dummy/delete-many-dummy.args.ts +++ b/@generated/dummy/delete-many-dummy.args.ts @@ -4,6 +4,6 @@ import { DummyWhereInput } from './dummy-where.input'; @ArgsType() export class DeleteManyDummyArgs { - @Field(() => DummyWhereInput, { nullable: true }) - where?: DummyWhereInput; + @Field(() => DummyWhereInput, { nullable: true }) + where?: DummyWhereInput; } diff --git a/@generated/dummy/delete-one-dummy.args.ts b/@generated/dummy/delete-one-dummy.args.ts index bfcfedb1..84c1d7b3 100644 --- a/@generated/dummy/delete-one-dummy.args.ts +++ b/@generated/dummy/delete-one-dummy.args.ts @@ -4,6 +4,6 @@ import { DummyWhereUniqueInput } from './dummy-where-unique.input'; @ArgsType() export class DeleteOneDummyArgs { - @Field(() => DummyWhereUniqueInput, { nullable: false }) - where!: DummyWhereUniqueInput; + @Field(() => DummyWhereUniqueInput, { nullable: false }) + where!: DummyWhereUniqueInput; } diff --git a/@generated/dummy/dummy-aggregate.args.ts b/@generated/dummy/dummy-aggregate.args.ts index ee28386e..e04bc1dd 100644 --- a/@generated/dummy/dummy-aggregate.args.ts +++ b/@generated/dummy/dummy-aggregate.args.ts @@ -12,33 +12,33 @@ import { DummyMaxAggregateInput } from './dummy-max-aggregate.input'; @ArgsType() export class DummyAggregateArgs { - @Field(() => DummyWhereInput, { nullable: true }) - where?: DummyWhereInput; + @Field(() => DummyWhereInput, { nullable: true }) + where?: DummyWhereInput; - @Field(() => [DummyOrderByWithRelationAndSearchRelevanceInput], { nullable: true }) - orderBy?: Array; + @Field(() => [DummyOrderByWithRelationAndSearchRelevanceInput], { nullable: true }) + orderBy?: Array; - @Field(() => DummyWhereUniqueInput, { nullable: true }) - cursor?: DummyWhereUniqueInput; + @Field(() => DummyWhereUniqueInput, { nullable: true }) + cursor?: DummyWhereUniqueInput; - @Field(() => Int, { nullable: true }) - take?: number; + @Field(() => Int, { nullable: true }) + take?: number; - @Field(() => Int, { nullable: true }) - skip?: number; + @Field(() => Int, { nullable: true }) + skip?: number; - @Field(() => DummyCountAggregateInput, { nullable: true }) - _count?: DummyCountAggregateInput; + @Field(() => DummyCountAggregateInput, { nullable: true }) + _count?: DummyCountAggregateInput; - @Field(() => DummyAvgAggregateInput, { nullable: true }) - _avg?: DummyAvgAggregateInput; + @Field(() => DummyAvgAggregateInput, { nullable: true }) + _avg?: DummyAvgAggregateInput; - @Field(() => DummySumAggregateInput, { nullable: true }) - _sum?: DummySumAggregateInput; + @Field(() => DummySumAggregateInput, { nullable: true }) + _sum?: DummySumAggregateInput; - @Field(() => DummyMinAggregateInput, { nullable: true }) - _min?: DummyMinAggregateInput; + @Field(() => DummyMinAggregateInput, { nullable: true }) + _min?: DummyMinAggregateInput; - @Field(() => DummyMaxAggregateInput, { nullable: true }) - _max?: DummyMaxAggregateInput; + @Field(() => DummyMaxAggregateInput, { nullable: true }) + _max?: DummyMaxAggregateInput; } diff --git a/@generated/dummy/dummy-avg-aggregate.input.ts b/@generated/dummy/dummy-avg-aggregate.input.ts index 0181b7ff..2e2fdfa0 100644 --- a/@generated/dummy/dummy-avg-aggregate.input.ts +++ b/@generated/dummy/dummy-avg-aggregate.input.ts @@ -3,18 +3,18 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class DummyAvgAggregateInput { - @Field(() => Boolean, { nullable: true }) - floaty?: true; + @Field(() => Boolean, { nullable: true }) + floaty?: true; - @Field(() => Boolean, { nullable: true }) - int?: true; + @Field(() => Boolean, { nullable: true }) + int?: true; - @Field(() => Boolean, { nullable: true }) - float?: true; + @Field(() => Boolean, { nullable: true }) + float?: true; - @Field(() => Boolean, { nullable: true }) - decimal?: true; + @Field(() => Boolean, { nullable: true }) + decimal?: true; - @Field(() => Boolean, { nullable: true }) - bigInt?: true; + @Field(() => Boolean, { nullable: true }) + bigInt?: true; } diff --git a/@generated/dummy/dummy-avg-aggregate.output.ts b/@generated/dummy/dummy-avg-aggregate.output.ts index cad2c4f6..66cbf931 100644 --- a/@generated/dummy/dummy-avg-aggregate.output.ts +++ b/@generated/dummy/dummy-avg-aggregate.output.ts @@ -6,18 +6,18 @@ import { GraphQLDecimal } from 'prisma-graphql-type-decimal'; @ObjectType() export class DummyAvgAggregate { - @Field(() => Float, { nullable: true }) - floaty?: number; + @Field(() => Float, { nullable: true }) + floaty?: number; - @Field(() => Float, { nullable: true }) - int?: number; + @Field(() => Float, { nullable: true }) + int?: number; - @Field(() => Float, { nullable: true }) - float?: number; + @Field(() => Float, { nullable: true }) + float?: number; - @Field(() => GraphQLDecimal, { nullable: true }) - decimal?: Decimal; + @Field(() => GraphQLDecimal, { nullable: true }) + decimal?: Decimal; - @Field(() => Float, { nullable: true }) - bigInt?: number; + @Field(() => Float, { nullable: true }) + bigInt?: number; } diff --git a/@generated/dummy/dummy-avg-order-by-aggregate.input.ts b/@generated/dummy/dummy-avg-order-by-aggregate.input.ts index 49699aab..1054ec43 100644 --- a/@generated/dummy/dummy-avg-order-by-aggregate.input.ts +++ b/@generated/dummy/dummy-avg-order-by-aggregate.input.ts @@ -4,18 +4,18 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class DummyAvgOrderByAggregateInput { - @Field(() => SortOrder, { nullable: true }) - floaty?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + floaty?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - int?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + int?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - float?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + float?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - decimal?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + decimal?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - bigInt?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + bigInt?: keyof typeof SortOrder; } diff --git a/@generated/dummy/dummy-count-aggregate.input.ts b/@generated/dummy/dummy-count-aggregate.input.ts index 95065fed..5d394459 100644 --- a/@generated/dummy/dummy-count-aggregate.input.ts +++ b/@generated/dummy/dummy-count-aggregate.input.ts @@ -3,36 +3,36 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class DummyCountAggregateInput { - @Field(() => Boolean, { nullable: true }) - id?: true; + @Field(() => Boolean, { nullable: true }) + id?: true; - @Field(() => Boolean, { nullable: true }) - created?: true; + @Field(() => Boolean, { nullable: true }) + created?: true; - @Field(() => Boolean, { nullable: true }) - floaty?: true; + @Field(() => Boolean, { nullable: true }) + floaty?: true; - @Field(() => Boolean, { nullable: true }) - int?: true; + @Field(() => Boolean, { nullable: true }) + int?: true; - @Field(() => Boolean, { nullable: true }) - float?: true; + @Field(() => Boolean, { nullable: true }) + float?: true; - @Field(() => Boolean, { nullable: true }) - bytes?: true; + @Field(() => Boolean, { nullable: true }) + bytes?: true; - @Field(() => Boolean, { nullable: true }) - decimal?: true; + @Field(() => Boolean, { nullable: true }) + decimal?: true; - @Field(() => Boolean, { nullable: true }) - bigInt?: true; + @Field(() => Boolean, { nullable: true }) + bigInt?: true; - @Field(() => Boolean, { nullable: true }) - json?: true; + @Field(() => Boolean, { nullable: true }) + json?: true; - @Field(() => Boolean, { nullable: true }) - friends?: true; + @Field(() => Boolean, { nullable: true }) + friends?: true; - @Field(() => Boolean, { nullable: true }) - _all?: true; + @Field(() => Boolean, { nullable: true }) + _all?: true; } diff --git a/@generated/dummy/dummy-count-aggregate.output.ts b/@generated/dummy/dummy-count-aggregate.output.ts index de8ddf7c..77478682 100644 --- a/@generated/dummy/dummy-count-aggregate.output.ts +++ b/@generated/dummy/dummy-count-aggregate.output.ts @@ -4,36 +4,36 @@ import { Int } from '@nestjs/graphql'; @ObjectType() export class DummyCountAggregate { - @Field(() => Int, { nullable: false }) - id!: number; + @Field(() => Int, { nullable: false }) + id!: number; - @Field(() => Int, { nullable: false }) - created!: number; + @Field(() => Int, { nullable: false }) + created!: number; - @Field(() => Int, { nullable: false }) - floaty!: number; + @Field(() => Int, { nullable: false }) + floaty!: number; - @Field(() => Int, { nullable: false }) - int!: number; + @Field(() => Int, { nullable: false }) + int!: number; - @Field(() => Int, { nullable: false }) - float!: number; + @Field(() => Int, { nullable: false }) + float!: number; - @Field(() => Int, { nullable: false }) - bytes!: number; + @Field(() => Int, { nullable: false }) + bytes!: number; - @Field(() => Int, { nullable: false }) - decimal!: number; + @Field(() => Int, { nullable: false }) + decimal!: number; - @Field(() => Int, { nullable: false }) - bigInt!: number; + @Field(() => Int, { nullable: false }) + bigInt!: number; - @Field(() => Int, { nullable: false }) - json!: number; + @Field(() => Int, { nullable: false }) + json!: number; - @Field(() => Int, { nullable: false }) - friends!: number; + @Field(() => Int, { nullable: false }) + friends!: number; - @Field(() => Int, { nullable: false }) - _all!: number; + @Field(() => Int, { nullable: false }) + _all!: number; } diff --git a/@generated/dummy/dummy-count-order-by-aggregate.input.ts b/@generated/dummy/dummy-count-order-by-aggregate.input.ts index 62873947..01e68ead 100644 --- a/@generated/dummy/dummy-count-order-by-aggregate.input.ts +++ b/@generated/dummy/dummy-count-order-by-aggregate.input.ts @@ -4,33 +4,33 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class DummyCountOrderByAggregateInput { - @Field(() => SortOrder, { nullable: true }) - id?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + id?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - created?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + created?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - floaty?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + floaty?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - int?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + int?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - float?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + float?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - bytes?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + bytes?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - decimal?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + decimal?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - bigInt?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + bigInt?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - json?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + json?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - friends?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + friends?: keyof typeof SortOrder; } diff --git a/@generated/dummy/dummy-create-many.input.ts b/@generated/dummy/dummy-create-many.input.ts index 8bba081a..002904c1 100644 --- a/@generated/dummy/dummy-create-many.input.ts +++ b/@generated/dummy/dummy-create-many.input.ts @@ -9,33 +9,33 @@ import { DummyCreatefriendsInput } from '../prisma/dummy-createfriends.input'; @InputType() export class DummyCreateManyInput { - @Field(() => String, { nullable: false }) - id!: string; + @Field(() => String, { nullable: false }) + id!: string; - @Field(() => Date, { nullable: true }) - created?: Date | string; + @Field(() => Date, { nullable: true }) + created?: Date | string; - @Field(() => Float, { nullable: false }) - floaty!: number; + @Field(() => Float, { nullable: false }) + floaty!: number; - @Field(() => Int, { nullable: true }) - int?: number; + @Field(() => Int, { nullable: true }) + int?: number; - @Field(() => Float, { nullable: true }) - float?: number; + @Field(() => Float, { nullable: true }) + float?: number; - @Field(() => String, { nullable: true }) - bytes?: Buffer; + @Field(() => String, { nullable: true }) + bytes?: Buffer; - @Field(() => GraphQLDecimal, { nullable: true }) - decimal?: Decimal; + @Field(() => GraphQLDecimal, { nullable: true }) + decimal?: Decimal; - @Field(() => String, { nullable: true }) - bigInt?: bigint | number; + @Field(() => String, { nullable: true }) + bigInt?: bigint | number; - @Field(() => GraphQLJSON, { nullable: true }) - json?: any; + @Field(() => GraphQLJSON, { nullable: true }) + json?: any; - @Field(() => DummyCreatefriendsInput, { nullable: true }) - friends?: DummyCreatefriendsInput; + @Field(() => DummyCreatefriendsInput, { nullable: true }) + friends?: DummyCreatefriendsInput; } diff --git a/@generated/dummy/dummy-create.input.ts b/@generated/dummy/dummy-create.input.ts index 18f02c64..3065f25f 100644 --- a/@generated/dummy/dummy-create.input.ts +++ b/@generated/dummy/dummy-create.input.ts @@ -9,33 +9,33 @@ import { DummyCreatefriendsInput } from '../prisma/dummy-createfriends.input'; @InputType() export class DummyCreateInput { - @Field(() => String, { nullable: false }) - id!: string; + @Field(() => String, { nullable: false }) + id!: string; - @Field(() => Date, { nullable: true }) - created?: Date | string; + @Field(() => Date, { nullable: true }) + created?: Date | string; - @Field(() => Float, { nullable: false }) - floaty!: number; + @Field(() => Float, { nullable: false }) + floaty!: number; - @Field(() => Int, { nullable: true }) - int?: number; + @Field(() => Int, { nullable: true }) + int?: number; - @Field(() => Float, { nullable: true }) - float?: number; + @Field(() => Float, { nullable: true }) + float?: number; - @Field(() => String, { nullable: true }) - bytes?: Buffer; + @Field(() => String, { nullable: true }) + bytes?: Buffer; - @Field(() => GraphQLDecimal, { nullable: true }) - decimal?: Decimal; + @Field(() => GraphQLDecimal, { nullable: true }) + decimal?: Decimal; - @Field(() => String, { nullable: true }) - bigInt?: bigint | number; + @Field(() => String, { nullable: true }) + bigInt?: bigint | number; - @Field(() => GraphQLJSON, { nullable: true }) - json?: any; + @Field(() => GraphQLJSON, { nullable: true }) + json?: any; - @Field(() => DummyCreatefriendsInput, { nullable: true }) - friends?: DummyCreatefriendsInput; + @Field(() => DummyCreatefriendsInput, { nullable: true }) + friends?: DummyCreatefriendsInput; } diff --git a/@generated/dummy/dummy-group-by.args.ts b/@generated/dummy/dummy-group-by.args.ts index 9f8314eb..3e870074 100644 --- a/@generated/dummy/dummy-group-by.args.ts +++ b/@generated/dummy/dummy-group-by.args.ts @@ -13,36 +13,36 @@ import { DummyMaxAggregateInput } from './dummy-max-aggregate.input'; @ArgsType() export class DummyGroupByArgs { - @Field(() => DummyWhereInput, { nullable: true }) - where?: DummyWhereInput; + @Field(() => DummyWhereInput, { nullable: true }) + where?: DummyWhereInput; - @Field(() => [DummyOrderByWithAggregationInput], { nullable: true }) - orderBy?: Array; + @Field(() => [DummyOrderByWithAggregationInput], { nullable: true }) + orderBy?: Array; - @Field(() => [DummyScalarFieldEnum], { nullable: false }) - by!: Array; + @Field(() => [DummyScalarFieldEnum], { nullable: false }) + by!: Array; - @Field(() => DummyScalarWhereWithAggregatesInput, { nullable: true }) - having?: DummyScalarWhereWithAggregatesInput; + @Field(() => DummyScalarWhereWithAggregatesInput, { nullable: true }) + having?: DummyScalarWhereWithAggregatesInput; - @Field(() => Int, { nullable: true }) - take?: number; + @Field(() => Int, { nullable: true }) + take?: number; - @Field(() => Int, { nullable: true }) - skip?: number; + @Field(() => Int, { nullable: true }) + skip?: number; - @Field(() => DummyCountAggregateInput, { nullable: true }) - _count?: DummyCountAggregateInput; + @Field(() => DummyCountAggregateInput, { nullable: true }) + _count?: DummyCountAggregateInput; - @Field(() => DummyAvgAggregateInput, { nullable: true }) - _avg?: DummyAvgAggregateInput; + @Field(() => DummyAvgAggregateInput, { nullable: true }) + _avg?: DummyAvgAggregateInput; - @Field(() => DummySumAggregateInput, { nullable: true }) - _sum?: DummySumAggregateInput; + @Field(() => DummySumAggregateInput, { nullable: true }) + _sum?: DummySumAggregateInput; - @Field(() => DummyMinAggregateInput, { nullable: true }) - _min?: DummyMinAggregateInput; + @Field(() => DummyMinAggregateInput, { nullable: true }) + _min?: DummyMinAggregateInput; - @Field(() => DummyMaxAggregateInput, { nullable: true }) - _max?: DummyMaxAggregateInput; + @Field(() => DummyMaxAggregateInput, { nullable: true }) + _max?: DummyMaxAggregateInput; } diff --git a/@generated/dummy/dummy-group-by.output.ts b/@generated/dummy/dummy-group-by.output.ts index bbdcbd5d..2719da5f 100644 --- a/@generated/dummy/dummy-group-by.output.ts +++ b/@generated/dummy/dummy-group-by.output.ts @@ -13,48 +13,48 @@ import { DummyMaxAggregate } from './dummy-max-aggregate.output'; @ObjectType() export class DummyGroupBy { - @Field(() => String, { nullable: false }) - id!: string; + @Field(() => String, { nullable: false }) + id!: string; - @Field(() => Date, { nullable: false }) - created!: Date | string; + @Field(() => Date, { nullable: false }) + created!: Date | string; - @Field(() => Float, { nullable: false }) - floaty!: number; + @Field(() => Float, { nullable: false }) + floaty!: number; - @Field(() => Int, { nullable: true }) - int?: number; + @Field(() => Int, { nullable: true }) + int?: number; - @Field(() => Float, { nullable: true }) - float?: number; + @Field(() => Float, { nullable: true }) + float?: number; - @Field(() => String, { nullable: true }) - bytes?: Buffer; + @Field(() => String, { nullable: true }) + bytes?: Buffer; - @Field(() => GraphQLDecimal, { nullable: true }) - decimal?: Decimal; + @Field(() => GraphQLDecimal, { nullable: true }) + decimal?: Decimal; - @Field(() => String, { nullable: true }) - bigInt?: bigint | number; + @Field(() => String, { nullable: true }) + bigInt?: bigint | number; - @Field(() => GraphQLJSON, { nullable: true }) - json?: any; + @Field(() => GraphQLJSON, { nullable: true }) + json?: any; - @Field(() => [String], { nullable: true }) - friends?: Array; + @Field(() => [String], { nullable: true }) + friends?: Array; - @Field(() => DummyCountAggregate, { nullable: true }) - _count?: DummyCountAggregate; + @Field(() => DummyCountAggregate, { nullable: true }) + _count?: DummyCountAggregate; - @Field(() => DummyAvgAggregate, { nullable: true }) - _avg?: DummyAvgAggregate; + @Field(() => DummyAvgAggregate, { nullable: true }) + _avg?: DummyAvgAggregate; - @Field(() => DummySumAggregate, { nullable: true }) - _sum?: DummySumAggregate; + @Field(() => DummySumAggregate, { nullable: true }) + _sum?: DummySumAggregate; - @Field(() => DummyMinAggregate, { nullable: true }) - _min?: DummyMinAggregate; + @Field(() => DummyMinAggregate, { nullable: true }) + _min?: DummyMinAggregate; - @Field(() => DummyMaxAggregate, { nullable: true }) - _max?: DummyMaxAggregate; + @Field(() => DummyMaxAggregate, { nullable: true }) + _max?: DummyMaxAggregate; } diff --git a/@generated/dummy/dummy-max-aggregate.input.ts b/@generated/dummy/dummy-max-aggregate.input.ts index 9d8dc5b6..38cb2f1b 100644 --- a/@generated/dummy/dummy-max-aggregate.input.ts +++ b/@generated/dummy/dummy-max-aggregate.input.ts @@ -3,27 +3,27 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class DummyMaxAggregateInput { - @Field(() => Boolean, { nullable: true }) - id?: true; + @Field(() => Boolean, { nullable: true }) + id?: true; - @Field(() => Boolean, { nullable: true }) - created?: true; + @Field(() => Boolean, { nullable: true }) + created?: true; - @Field(() => Boolean, { nullable: true }) - floaty?: true; + @Field(() => Boolean, { nullable: true }) + floaty?: true; - @Field(() => Boolean, { nullable: true }) - int?: true; + @Field(() => Boolean, { nullable: true }) + int?: true; - @Field(() => Boolean, { nullable: true }) - float?: true; + @Field(() => Boolean, { nullable: true }) + float?: true; - @Field(() => Boolean, { nullable: true }) - bytes?: true; + @Field(() => Boolean, { nullable: true }) + bytes?: true; - @Field(() => Boolean, { nullable: true }) - decimal?: true; + @Field(() => Boolean, { nullable: true }) + decimal?: true; - @Field(() => Boolean, { nullable: true }) - bigInt?: true; + @Field(() => Boolean, { nullable: true }) + bigInt?: true; } diff --git a/@generated/dummy/dummy-max-aggregate.output.ts b/@generated/dummy/dummy-max-aggregate.output.ts index 59a87e82..e3ef091b 100644 --- a/@generated/dummy/dummy-max-aggregate.output.ts +++ b/@generated/dummy/dummy-max-aggregate.output.ts @@ -7,27 +7,27 @@ import { GraphQLDecimal } from 'prisma-graphql-type-decimal'; @ObjectType() export class DummyMaxAggregate { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => Date, { nullable: true }) - created?: Date | string; + @Field(() => Date, { nullable: true }) + created?: Date | string; - @Field(() => Float, { nullable: true }) - floaty?: number; + @Field(() => Float, { nullable: true }) + floaty?: number; - @Field(() => Int, { nullable: true }) - int?: number; + @Field(() => Int, { nullable: true }) + int?: number; - @Field(() => Float, { nullable: true }) - float?: number; + @Field(() => Float, { nullable: true }) + float?: number; - @Field(() => String, { nullable: true }) - bytes?: Buffer; + @Field(() => String, { nullable: true }) + bytes?: Buffer; - @Field(() => GraphQLDecimal, { nullable: true }) - decimal?: Decimal; + @Field(() => GraphQLDecimal, { nullable: true }) + decimal?: Decimal; - @Field(() => String, { nullable: true }) - bigInt?: bigint | number; + @Field(() => String, { nullable: true }) + bigInt?: bigint | number; } diff --git a/@generated/dummy/dummy-max-order-by-aggregate.input.ts b/@generated/dummy/dummy-max-order-by-aggregate.input.ts index 35c7675b..670aa364 100644 --- a/@generated/dummy/dummy-max-order-by-aggregate.input.ts +++ b/@generated/dummy/dummy-max-order-by-aggregate.input.ts @@ -4,27 +4,27 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class DummyMaxOrderByAggregateInput { - @Field(() => SortOrder, { nullable: true }) - id?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + id?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - created?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + created?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - floaty?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + floaty?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - int?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + int?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - float?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + float?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - bytes?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + bytes?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - decimal?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + decimal?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - bigInt?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + bigInt?: keyof typeof SortOrder; } diff --git a/@generated/dummy/dummy-min-aggregate.input.ts b/@generated/dummy/dummy-min-aggregate.input.ts index 9e162e4d..176f0fc4 100644 --- a/@generated/dummy/dummy-min-aggregate.input.ts +++ b/@generated/dummy/dummy-min-aggregate.input.ts @@ -3,27 +3,27 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class DummyMinAggregateInput { - @Field(() => Boolean, { nullable: true }) - id?: true; + @Field(() => Boolean, { nullable: true }) + id?: true; - @Field(() => Boolean, { nullable: true }) - created?: true; + @Field(() => Boolean, { nullable: true }) + created?: true; - @Field(() => Boolean, { nullable: true }) - floaty?: true; + @Field(() => Boolean, { nullable: true }) + floaty?: true; - @Field(() => Boolean, { nullable: true }) - int?: true; + @Field(() => Boolean, { nullable: true }) + int?: true; - @Field(() => Boolean, { nullable: true }) - float?: true; + @Field(() => Boolean, { nullable: true }) + float?: true; - @Field(() => Boolean, { nullable: true }) - bytes?: true; + @Field(() => Boolean, { nullable: true }) + bytes?: true; - @Field(() => Boolean, { nullable: true }) - decimal?: true; + @Field(() => Boolean, { nullable: true }) + decimal?: true; - @Field(() => Boolean, { nullable: true }) - bigInt?: true; + @Field(() => Boolean, { nullable: true }) + bigInt?: true; } diff --git a/@generated/dummy/dummy-min-aggregate.output.ts b/@generated/dummy/dummy-min-aggregate.output.ts index 71aebc9e..26b37f13 100644 --- a/@generated/dummy/dummy-min-aggregate.output.ts +++ b/@generated/dummy/dummy-min-aggregate.output.ts @@ -7,27 +7,27 @@ import { GraphQLDecimal } from 'prisma-graphql-type-decimal'; @ObjectType() export class DummyMinAggregate { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => Date, { nullable: true }) - created?: Date | string; + @Field(() => Date, { nullable: true }) + created?: Date | string; - @Field(() => Float, { nullable: true }) - floaty?: number; + @Field(() => Float, { nullable: true }) + floaty?: number; - @Field(() => Int, { nullable: true }) - int?: number; + @Field(() => Int, { nullable: true }) + int?: number; - @Field(() => Float, { nullable: true }) - float?: number; + @Field(() => Float, { nullable: true }) + float?: number; - @Field(() => String, { nullable: true }) - bytes?: Buffer; + @Field(() => String, { nullable: true }) + bytes?: Buffer; - @Field(() => GraphQLDecimal, { nullable: true }) - decimal?: Decimal; + @Field(() => GraphQLDecimal, { nullable: true }) + decimal?: Decimal; - @Field(() => String, { nullable: true }) - bigInt?: bigint | number; + @Field(() => String, { nullable: true }) + bigInt?: bigint | number; } diff --git a/@generated/dummy/dummy-min-order-by-aggregate.input.ts b/@generated/dummy/dummy-min-order-by-aggregate.input.ts index fc0510e0..41618cac 100644 --- a/@generated/dummy/dummy-min-order-by-aggregate.input.ts +++ b/@generated/dummy/dummy-min-order-by-aggregate.input.ts @@ -4,27 +4,27 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class DummyMinOrderByAggregateInput { - @Field(() => SortOrder, { nullable: true }) - id?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + id?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - created?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + created?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - floaty?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + floaty?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - int?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + int?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - float?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + float?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - bytes?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + bytes?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - decimal?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + decimal?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - bigInt?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + bigInt?: keyof typeof SortOrder; } diff --git a/@generated/dummy/dummy-order-by-relevance-field.enum.ts b/@generated/dummy/dummy-order-by-relevance-field.enum.ts index fb29cc32..534e7081 100644 --- a/@generated/dummy/dummy-order-by-relevance-field.enum.ts +++ b/@generated/dummy/dummy-order-by-relevance-field.enum.ts @@ -1,11 +1,11 @@ import { registerEnumType } from '@nestjs/graphql'; export enum DummyOrderByRelevanceFieldEnum { - id = 'id', - friends = 'friends', + id = 'id', + friends = 'friends', } registerEnumType(DummyOrderByRelevanceFieldEnum, { - name: 'DummyOrderByRelevanceFieldEnum', - description: undefined, + name: 'DummyOrderByRelevanceFieldEnum', + description: undefined, }); diff --git a/@generated/dummy/dummy-order-by-relevance.input.ts b/@generated/dummy/dummy-order-by-relevance.input.ts index 8c59ea55..d3bf234d 100644 --- a/@generated/dummy/dummy-order-by-relevance.input.ts +++ b/@generated/dummy/dummy-order-by-relevance.input.ts @@ -5,12 +5,12 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class DummyOrderByRelevanceInput { - @Field(() => [DummyOrderByRelevanceFieldEnum], { nullable: false }) - fields!: Array; + @Field(() => [DummyOrderByRelevanceFieldEnum], { nullable: false }) + fields!: Array; - @Field(() => SortOrder, { nullable: false }) - sort!: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: false }) + sort!: keyof typeof SortOrder; - @Field(() => String, { nullable: false }) - search!: string; + @Field(() => String, { nullable: false }) + search!: string; } diff --git a/@generated/dummy/dummy-order-by-with-aggregation.input.ts b/@generated/dummy/dummy-order-by-with-aggregation.input.ts index 53c7cbc8..730cce91 100644 --- a/@generated/dummy/dummy-order-by-with-aggregation.input.ts +++ b/@generated/dummy/dummy-order-by-with-aggregation.input.ts @@ -9,48 +9,48 @@ import { DummySumOrderByAggregateInput } from './dummy-sum-order-by-aggregate.in @InputType() export class DummyOrderByWithAggregationInput { - @Field(() => SortOrder, { nullable: true }) - id?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + id?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - created?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + created?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - floaty?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + floaty?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - int?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + int?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - float?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + float?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - bytes?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + bytes?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - decimal?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + decimal?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - bigInt?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + bigInt?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - json?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + json?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - friends?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + friends?: keyof typeof SortOrder; - @Field(() => DummyCountOrderByAggregateInput, { nullable: true }) - _count?: DummyCountOrderByAggregateInput; + @Field(() => DummyCountOrderByAggregateInput, { nullable: true }) + _count?: DummyCountOrderByAggregateInput; - @Field(() => DummyAvgOrderByAggregateInput, { nullable: true }) - _avg?: DummyAvgOrderByAggregateInput; + @Field(() => DummyAvgOrderByAggregateInput, { nullable: true }) + _avg?: DummyAvgOrderByAggregateInput; - @Field(() => DummyMaxOrderByAggregateInput, { nullable: true }) - _max?: DummyMaxOrderByAggregateInput; + @Field(() => DummyMaxOrderByAggregateInput, { nullable: true }) + _max?: DummyMaxOrderByAggregateInput; - @Field(() => DummyMinOrderByAggregateInput, { nullable: true }) - _min?: DummyMinOrderByAggregateInput; + @Field(() => DummyMinOrderByAggregateInput, { nullable: true }) + _min?: DummyMinOrderByAggregateInput; - @Field(() => DummySumOrderByAggregateInput, { nullable: true }) - _sum?: DummySumOrderByAggregateInput; + @Field(() => DummySumOrderByAggregateInput, { nullable: true }) + _sum?: DummySumOrderByAggregateInput; } diff --git a/@generated/dummy/dummy-order-by-with-relation-and-search-relevance.input.ts b/@generated/dummy/dummy-order-by-with-relation-and-search-relevance.input.ts index 0fdf13cc..8e6db7c3 100644 --- a/@generated/dummy/dummy-order-by-with-relation-and-search-relevance.input.ts +++ b/@generated/dummy/dummy-order-by-with-relation-and-search-relevance.input.ts @@ -5,36 +5,36 @@ import { DummyOrderByRelevanceInput } from './dummy-order-by-relevance.input'; @InputType() export class DummyOrderByWithRelationAndSearchRelevanceInput { - @Field(() => SortOrder, { nullable: true }) - id?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + id?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - created?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + created?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - floaty?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + floaty?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - int?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + int?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - float?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + float?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - bytes?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + bytes?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - decimal?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + decimal?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - bigInt?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + bigInt?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - json?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + json?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - friends?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + friends?: keyof typeof SortOrder; - @Field(() => DummyOrderByRelevanceInput, { nullable: true }) - _relevance?: DummyOrderByRelevanceInput; + @Field(() => DummyOrderByRelevanceInput, { nullable: true }) + _relevance?: DummyOrderByRelevanceInput; } diff --git a/@generated/dummy/dummy-scalar-field.enum.ts b/@generated/dummy/dummy-scalar-field.enum.ts index 028cee67..3392813a 100644 --- a/@generated/dummy/dummy-scalar-field.enum.ts +++ b/@generated/dummy/dummy-scalar-field.enum.ts @@ -1,19 +1,19 @@ import { registerEnumType } from '@nestjs/graphql'; export enum DummyScalarFieldEnum { - id = 'id', - created = 'created', - floaty = 'floaty', - int = 'int', - float = 'float', - bytes = 'bytes', - decimal = 'decimal', - bigInt = 'bigInt', - json = 'json', - friends = 'friends', + id = 'id', + created = 'created', + floaty = 'floaty', + int = 'int', + float = 'float', + bytes = 'bytes', + decimal = 'decimal', + bigInt = 'bigInt', + json = 'json', + friends = 'friends', } registerEnumType(DummyScalarFieldEnum, { - name: 'DummyScalarFieldEnum', - description: undefined, + name: 'DummyScalarFieldEnum', + description: undefined, }); diff --git a/@generated/dummy/dummy-scalar-where-with-aggregates.input.ts b/@generated/dummy/dummy-scalar-where-with-aggregates.input.ts index 2bda4735..b198425e 100644 --- a/@generated/dummy/dummy-scalar-where-with-aggregates.input.ts +++ b/@generated/dummy/dummy-scalar-where-with-aggregates.input.ts @@ -13,42 +13,42 @@ import { StringNullableListFilter } from '../prisma/string-nullable-list-filter. @InputType() export class DummyScalarWhereWithAggregatesInput { - @Field(() => [DummyScalarWhereWithAggregatesInput], { nullable: true }) - AND?: Array; + @Field(() => [DummyScalarWhereWithAggregatesInput], { nullable: true }) + AND?: Array; - @Field(() => [DummyScalarWhereWithAggregatesInput], { nullable: true }) - OR?: Array; + @Field(() => [DummyScalarWhereWithAggregatesInput], { nullable: true }) + OR?: Array; - @Field(() => [DummyScalarWhereWithAggregatesInput], { nullable: true }) - NOT?: Array; + @Field(() => [DummyScalarWhereWithAggregatesInput], { nullable: true }) + NOT?: Array; - @Field(() => StringWithAggregatesFilter, { nullable: true }) - id?: StringWithAggregatesFilter; + @Field(() => StringWithAggregatesFilter, { nullable: true }) + id?: StringWithAggregatesFilter; - @Field(() => DateTimeWithAggregatesFilter, { nullable: true }) - created?: DateTimeWithAggregatesFilter; + @Field(() => DateTimeWithAggregatesFilter, { nullable: true }) + created?: DateTimeWithAggregatesFilter; - @Field(() => FloatWithAggregatesFilter, { nullable: true }) - floaty?: FloatWithAggregatesFilter; + @Field(() => FloatWithAggregatesFilter, { nullable: true }) + floaty?: FloatWithAggregatesFilter; - @Field(() => IntNullableWithAggregatesFilter, { nullable: true }) - int?: IntNullableWithAggregatesFilter; + @Field(() => IntNullableWithAggregatesFilter, { nullable: true }) + int?: IntNullableWithAggregatesFilter; - @Field(() => FloatNullableWithAggregatesFilter, { nullable: true }) - float?: FloatNullableWithAggregatesFilter; + @Field(() => FloatNullableWithAggregatesFilter, { nullable: true }) + float?: FloatNullableWithAggregatesFilter; - @Field(() => BytesNullableWithAggregatesFilter, { nullable: true }) - bytes?: BytesNullableWithAggregatesFilter; + @Field(() => BytesNullableWithAggregatesFilter, { nullable: true }) + bytes?: BytesNullableWithAggregatesFilter; - @Field(() => DecimalNullableWithAggregatesFilter, { nullable: true }) - decimal?: DecimalNullableWithAggregatesFilter; + @Field(() => DecimalNullableWithAggregatesFilter, { nullable: true }) + decimal?: DecimalNullableWithAggregatesFilter; - @Field(() => BigIntNullableWithAggregatesFilter, { nullable: true }) - bigInt?: BigIntNullableWithAggregatesFilter; + @Field(() => BigIntNullableWithAggregatesFilter, { nullable: true }) + bigInt?: BigIntNullableWithAggregatesFilter; - @Field(() => JsonNullableWithAggregatesFilter, { nullable: true }) - json?: JsonNullableWithAggregatesFilter; + @Field(() => JsonNullableWithAggregatesFilter, { nullable: true }) + json?: JsonNullableWithAggregatesFilter; - @Field(() => StringNullableListFilter, { nullable: true }) - friends?: StringNullableListFilter; + @Field(() => StringNullableListFilter, { nullable: true }) + friends?: StringNullableListFilter; } diff --git a/@generated/dummy/dummy-sum-aggregate.input.ts b/@generated/dummy/dummy-sum-aggregate.input.ts index a92a592a..400962cc 100644 --- a/@generated/dummy/dummy-sum-aggregate.input.ts +++ b/@generated/dummy/dummy-sum-aggregate.input.ts @@ -3,18 +3,18 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class DummySumAggregateInput { - @Field(() => Boolean, { nullable: true }) - floaty?: true; + @Field(() => Boolean, { nullable: true }) + floaty?: true; - @Field(() => Boolean, { nullable: true }) - int?: true; + @Field(() => Boolean, { nullable: true }) + int?: true; - @Field(() => Boolean, { nullable: true }) - float?: true; + @Field(() => Boolean, { nullable: true }) + float?: true; - @Field(() => Boolean, { nullable: true }) - decimal?: true; + @Field(() => Boolean, { nullable: true }) + decimal?: true; - @Field(() => Boolean, { nullable: true }) - bigInt?: true; + @Field(() => Boolean, { nullable: true }) + bigInt?: true; } diff --git a/@generated/dummy/dummy-sum-aggregate.output.ts b/@generated/dummy/dummy-sum-aggregate.output.ts index 00891e24..e39d4f7c 100644 --- a/@generated/dummy/dummy-sum-aggregate.output.ts +++ b/@generated/dummy/dummy-sum-aggregate.output.ts @@ -7,18 +7,18 @@ import { GraphQLDecimal } from 'prisma-graphql-type-decimal'; @ObjectType() export class DummySumAggregate { - @Field(() => Float, { nullable: true }) - floaty?: number; + @Field(() => Float, { nullable: true }) + floaty?: number; - @Field(() => Int, { nullable: true }) - int?: number; + @Field(() => Int, { nullable: true }) + int?: number; - @Field(() => Float, { nullable: true }) - float?: number; + @Field(() => Float, { nullable: true }) + float?: number; - @Field(() => GraphQLDecimal, { nullable: true }) - decimal?: Decimal; + @Field(() => GraphQLDecimal, { nullable: true }) + decimal?: Decimal; - @Field(() => String, { nullable: true }) - bigInt?: bigint | number; + @Field(() => String, { nullable: true }) + bigInt?: bigint | number; } diff --git a/@generated/dummy/dummy-sum-order-by-aggregate.input.ts b/@generated/dummy/dummy-sum-order-by-aggregate.input.ts index b4a80aaf..458f295f 100644 --- a/@generated/dummy/dummy-sum-order-by-aggregate.input.ts +++ b/@generated/dummy/dummy-sum-order-by-aggregate.input.ts @@ -4,18 +4,18 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class DummySumOrderByAggregateInput { - @Field(() => SortOrder, { nullable: true }) - floaty?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + floaty?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - int?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + int?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - float?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + float?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - decimal?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + decimal?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - bigInt?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + bigInt?: keyof typeof SortOrder; } diff --git a/@generated/dummy/dummy-unchecked-create.input.ts b/@generated/dummy/dummy-unchecked-create.input.ts index 648c60a8..305b6096 100644 --- a/@generated/dummy/dummy-unchecked-create.input.ts +++ b/@generated/dummy/dummy-unchecked-create.input.ts @@ -9,33 +9,33 @@ import { DummyCreatefriendsInput } from '../prisma/dummy-createfriends.input'; @InputType() export class DummyUncheckedCreateInput { - @Field(() => String, { nullable: false }) - id!: string; + @Field(() => String, { nullable: false }) + id!: string; - @Field(() => Date, { nullable: true }) - created?: Date | string; + @Field(() => Date, { nullable: true }) + created?: Date | string; - @Field(() => Float, { nullable: false }) - floaty!: number; + @Field(() => Float, { nullable: false }) + floaty!: number; - @Field(() => Int, { nullable: true }) - int?: number; + @Field(() => Int, { nullable: true }) + int?: number; - @Field(() => Float, { nullable: true }) - float?: number; + @Field(() => Float, { nullable: true }) + float?: number; - @Field(() => String, { nullable: true }) - bytes?: Buffer; + @Field(() => String, { nullable: true }) + bytes?: Buffer; - @Field(() => GraphQLDecimal, { nullable: true }) - decimal?: Decimal; + @Field(() => GraphQLDecimal, { nullable: true }) + decimal?: Decimal; - @Field(() => String, { nullable: true }) - bigInt?: bigint | number; + @Field(() => String, { nullable: true }) + bigInt?: bigint | number; - @Field(() => GraphQLJSON, { nullable: true }) - json?: any; + @Field(() => GraphQLJSON, { nullable: true }) + json?: any; - @Field(() => DummyCreatefriendsInput, { nullable: true }) - friends?: DummyCreatefriendsInput; + @Field(() => DummyCreatefriendsInput, { nullable: true }) + friends?: DummyCreatefriendsInput; } diff --git a/@generated/dummy/dummy-unchecked-update-many.input.ts b/@generated/dummy/dummy-unchecked-update-many.input.ts index 6475e692..f7e513e3 100644 --- a/@generated/dummy/dummy-unchecked-update-many.input.ts +++ b/@generated/dummy/dummy-unchecked-update-many.input.ts @@ -13,33 +13,33 @@ import { DummyUpdatefriendsInput } from '../prisma/dummy-updatefriends.input'; @InputType() export class DummyUncheckedUpdateManyInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - created?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + created?: DateTimeFieldUpdateOperationsInput; - @Field(() => FloatFieldUpdateOperationsInput, { nullable: true }) - floaty?: FloatFieldUpdateOperationsInput; + @Field(() => FloatFieldUpdateOperationsInput, { nullable: true }) + floaty?: FloatFieldUpdateOperationsInput; - @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) - int?: NullableIntFieldUpdateOperationsInput; + @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) + int?: NullableIntFieldUpdateOperationsInput; - @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) - float?: NullableFloatFieldUpdateOperationsInput; + @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) + float?: NullableFloatFieldUpdateOperationsInput; - @Field(() => NullableBytesFieldUpdateOperationsInput, { nullable: true }) - bytes?: NullableBytesFieldUpdateOperationsInput; + @Field(() => NullableBytesFieldUpdateOperationsInput, { nullable: true }) + bytes?: NullableBytesFieldUpdateOperationsInput; - @Field(() => NullableDecimalFieldUpdateOperationsInput, { nullable: true }) - decimal?: NullableDecimalFieldUpdateOperationsInput; + @Field(() => NullableDecimalFieldUpdateOperationsInput, { nullable: true }) + decimal?: NullableDecimalFieldUpdateOperationsInput; - @Field(() => NullableBigIntFieldUpdateOperationsInput, { nullable: true }) - bigInt?: NullableBigIntFieldUpdateOperationsInput; + @Field(() => NullableBigIntFieldUpdateOperationsInput, { nullable: true }) + bigInt?: NullableBigIntFieldUpdateOperationsInput; - @Field(() => GraphQLJSON, { nullable: true }) - json?: any; + @Field(() => GraphQLJSON, { nullable: true }) + json?: any; - @Field(() => DummyUpdatefriendsInput, { nullable: true }) - friends?: DummyUpdatefriendsInput; + @Field(() => DummyUpdatefriendsInput, { nullable: true }) + friends?: DummyUpdatefriendsInput; } diff --git a/@generated/dummy/dummy-unchecked-update.input.ts b/@generated/dummy/dummy-unchecked-update.input.ts index 541ed9d5..a7f49a1f 100644 --- a/@generated/dummy/dummy-unchecked-update.input.ts +++ b/@generated/dummy/dummy-unchecked-update.input.ts @@ -13,33 +13,33 @@ import { DummyUpdatefriendsInput } from '../prisma/dummy-updatefriends.input'; @InputType() export class DummyUncheckedUpdateInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - created?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + created?: DateTimeFieldUpdateOperationsInput; - @Field(() => FloatFieldUpdateOperationsInput, { nullable: true }) - floaty?: FloatFieldUpdateOperationsInput; + @Field(() => FloatFieldUpdateOperationsInput, { nullable: true }) + floaty?: FloatFieldUpdateOperationsInput; - @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) - int?: NullableIntFieldUpdateOperationsInput; + @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) + int?: NullableIntFieldUpdateOperationsInput; - @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) - float?: NullableFloatFieldUpdateOperationsInput; + @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) + float?: NullableFloatFieldUpdateOperationsInput; - @Field(() => NullableBytesFieldUpdateOperationsInput, { nullable: true }) - bytes?: NullableBytesFieldUpdateOperationsInput; + @Field(() => NullableBytesFieldUpdateOperationsInput, { nullable: true }) + bytes?: NullableBytesFieldUpdateOperationsInput; - @Field(() => NullableDecimalFieldUpdateOperationsInput, { nullable: true }) - decimal?: NullableDecimalFieldUpdateOperationsInput; + @Field(() => NullableDecimalFieldUpdateOperationsInput, { nullable: true }) + decimal?: NullableDecimalFieldUpdateOperationsInput; - @Field(() => NullableBigIntFieldUpdateOperationsInput, { nullable: true }) - bigInt?: NullableBigIntFieldUpdateOperationsInput; + @Field(() => NullableBigIntFieldUpdateOperationsInput, { nullable: true }) + bigInt?: NullableBigIntFieldUpdateOperationsInput; - @Field(() => GraphQLJSON, { nullable: true }) - json?: any; + @Field(() => GraphQLJSON, { nullable: true }) + json?: any; - @Field(() => DummyUpdatefriendsInput, { nullable: true }) - friends?: DummyUpdatefriendsInput; + @Field(() => DummyUpdatefriendsInput, { nullable: true }) + friends?: DummyUpdatefriendsInput; } diff --git a/@generated/dummy/dummy-update-many-mutation.input.ts b/@generated/dummy/dummy-update-many-mutation.input.ts index affc1d1c..86df0fb3 100644 --- a/@generated/dummy/dummy-update-many-mutation.input.ts +++ b/@generated/dummy/dummy-update-many-mutation.input.ts @@ -13,33 +13,33 @@ import { DummyUpdatefriendsInput } from '../prisma/dummy-updatefriends.input'; @InputType() export class DummyUpdateManyMutationInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - created?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + created?: DateTimeFieldUpdateOperationsInput; - @Field(() => FloatFieldUpdateOperationsInput, { nullable: true }) - floaty?: FloatFieldUpdateOperationsInput; + @Field(() => FloatFieldUpdateOperationsInput, { nullable: true }) + floaty?: FloatFieldUpdateOperationsInput; - @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) - int?: NullableIntFieldUpdateOperationsInput; + @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) + int?: NullableIntFieldUpdateOperationsInput; - @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) - float?: NullableFloatFieldUpdateOperationsInput; + @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) + float?: NullableFloatFieldUpdateOperationsInput; - @Field(() => NullableBytesFieldUpdateOperationsInput, { nullable: true }) - bytes?: NullableBytesFieldUpdateOperationsInput; + @Field(() => NullableBytesFieldUpdateOperationsInput, { nullable: true }) + bytes?: NullableBytesFieldUpdateOperationsInput; - @Field(() => NullableDecimalFieldUpdateOperationsInput, { nullable: true }) - decimal?: NullableDecimalFieldUpdateOperationsInput; + @Field(() => NullableDecimalFieldUpdateOperationsInput, { nullable: true }) + decimal?: NullableDecimalFieldUpdateOperationsInput; - @Field(() => NullableBigIntFieldUpdateOperationsInput, { nullable: true }) - bigInt?: NullableBigIntFieldUpdateOperationsInput; + @Field(() => NullableBigIntFieldUpdateOperationsInput, { nullable: true }) + bigInt?: NullableBigIntFieldUpdateOperationsInput; - @Field(() => GraphQLJSON, { nullable: true }) - json?: any; + @Field(() => GraphQLJSON, { nullable: true }) + json?: any; - @Field(() => DummyUpdatefriendsInput, { nullable: true }) - friends?: DummyUpdatefriendsInput; + @Field(() => DummyUpdatefriendsInput, { nullable: true }) + friends?: DummyUpdatefriendsInput; } diff --git a/@generated/dummy/dummy-update.input.ts b/@generated/dummy/dummy-update.input.ts index 50b2e5cd..82d3eb64 100644 --- a/@generated/dummy/dummy-update.input.ts +++ b/@generated/dummy/dummy-update.input.ts @@ -13,33 +13,33 @@ import { DummyUpdatefriendsInput } from '../prisma/dummy-updatefriends.input'; @InputType() export class DummyUpdateInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) - created?: DateTimeFieldUpdateOperationsInput; + @Field(() => DateTimeFieldUpdateOperationsInput, { nullable: true }) + created?: DateTimeFieldUpdateOperationsInput; - @Field(() => FloatFieldUpdateOperationsInput, { nullable: true }) - floaty?: FloatFieldUpdateOperationsInput; + @Field(() => FloatFieldUpdateOperationsInput, { nullable: true }) + floaty?: FloatFieldUpdateOperationsInput; - @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) - int?: NullableIntFieldUpdateOperationsInput; + @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) + int?: NullableIntFieldUpdateOperationsInput; - @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) - float?: NullableFloatFieldUpdateOperationsInput; + @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) + float?: NullableFloatFieldUpdateOperationsInput; - @Field(() => NullableBytesFieldUpdateOperationsInput, { nullable: true }) - bytes?: NullableBytesFieldUpdateOperationsInput; + @Field(() => NullableBytesFieldUpdateOperationsInput, { nullable: true }) + bytes?: NullableBytesFieldUpdateOperationsInput; - @Field(() => NullableDecimalFieldUpdateOperationsInput, { nullable: true }) - decimal?: NullableDecimalFieldUpdateOperationsInput; + @Field(() => NullableDecimalFieldUpdateOperationsInput, { nullable: true }) + decimal?: NullableDecimalFieldUpdateOperationsInput; - @Field(() => NullableBigIntFieldUpdateOperationsInput, { nullable: true }) - bigInt?: NullableBigIntFieldUpdateOperationsInput; + @Field(() => NullableBigIntFieldUpdateOperationsInput, { nullable: true }) + bigInt?: NullableBigIntFieldUpdateOperationsInput; - @Field(() => GraphQLJSON, { nullable: true }) - json?: any; + @Field(() => GraphQLJSON, { nullable: true }) + json?: any; - @Field(() => DummyUpdatefriendsInput, { nullable: true }) - friends?: DummyUpdatefriendsInput; + @Field(() => DummyUpdatefriendsInput, { nullable: true }) + friends?: DummyUpdatefriendsInput; } diff --git a/@generated/dummy/dummy-where-unique.input.ts b/@generated/dummy/dummy-where-unique.input.ts index a5266642..4a0b0636 100644 --- a/@generated/dummy/dummy-where-unique.input.ts +++ b/@generated/dummy/dummy-where-unique.input.ts @@ -3,6 +3,6 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class DummyWhereUniqueInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; } diff --git a/@generated/dummy/dummy-where.input.ts b/@generated/dummy/dummy-where.input.ts index 5a7be785..4c78efb5 100644 --- a/@generated/dummy/dummy-where.input.ts +++ b/@generated/dummy/dummy-where.input.ts @@ -13,42 +13,42 @@ import { StringNullableListFilter } from '../prisma/string-nullable-list-filter. @InputType() export class DummyWhereInput { - @Field(() => [DummyWhereInput], { nullable: true }) - AND?: Array; + @Field(() => [DummyWhereInput], { nullable: true }) + AND?: Array; - @Field(() => [DummyWhereInput], { nullable: true }) - OR?: Array; + @Field(() => [DummyWhereInput], { nullable: true }) + OR?: Array; - @Field(() => [DummyWhereInput], { nullable: true }) - NOT?: Array; + @Field(() => [DummyWhereInput], { nullable: true }) + NOT?: Array; - @Field(() => StringFilter, { nullable: true }) - id?: StringFilter; + @Field(() => StringFilter, { nullable: true }) + id?: StringFilter; - @Field(() => DateTimeFilter, { nullable: true }) - created?: DateTimeFilter; + @Field(() => DateTimeFilter, { nullable: true }) + created?: DateTimeFilter; - @Field(() => FloatFilter, { nullable: true }) - floaty?: FloatFilter; + @Field(() => FloatFilter, { nullable: true }) + floaty?: FloatFilter; - @Field(() => IntNullableFilter, { nullable: true }) - int?: IntNullableFilter; + @Field(() => IntNullableFilter, { nullable: true }) + int?: IntNullableFilter; - @Field(() => FloatNullableFilter, { nullable: true }) - float?: FloatNullableFilter; + @Field(() => FloatNullableFilter, { nullable: true }) + float?: FloatNullableFilter; - @Field(() => BytesNullableFilter, { nullable: true }) - bytes?: BytesNullableFilter; + @Field(() => BytesNullableFilter, { nullable: true }) + bytes?: BytesNullableFilter; - @Field(() => DecimalNullableFilter, { nullable: true }) - decimal?: DecimalNullableFilter; + @Field(() => DecimalNullableFilter, { nullable: true }) + decimal?: DecimalNullableFilter; - @Field(() => BigIntNullableFilter, { nullable: true }) - bigInt?: BigIntNullableFilter; + @Field(() => BigIntNullableFilter, { nullable: true }) + bigInt?: BigIntNullableFilter; - @Field(() => JsonNullableFilter, { nullable: true }) - json?: JsonNullableFilter; + @Field(() => JsonNullableFilter, { nullable: true }) + json?: JsonNullableFilter; - @Field(() => StringNullableListFilter, { nullable: true }) - friends?: StringNullableListFilter; + @Field(() => StringNullableListFilter, { nullable: true }) + friends?: StringNullableListFilter; } diff --git a/@generated/dummy/dummy.model.ts b/@generated/dummy/dummy.model.ts index 6d472d9c..0e5d8aba 100644 --- a/@generated/dummy/dummy.model.ts +++ b/@generated/dummy/dummy.model.ts @@ -9,33 +9,33 @@ import { GraphQLJSON } from 'graphql-type-json'; @ObjectType() export class Dummy { - @Field(() => ID, { nullable: false }) - id!: string; + @Field(() => ID, { nullable: false }) + id!: string; - @Field(() => Date, { nullable: false }) - created!: Date; + @Field(() => Date, { nullable: false }) + created!: Date; - @Field(() => Float, { nullable: false }) - floaty!: number; + @Field(() => Float, { nullable: false }) + floaty!: number; - @Field(() => Int, { nullable: true }) - int!: number | null; + @Field(() => Int, { nullable: true }) + int!: number | null; - @Field(() => Float, { nullable: true }) - float!: number | null; + @Field(() => Float, { nullable: true }) + float!: number | null; - @Field(() => String, { nullable: true }) - bytes!: Buffer | null; + @Field(() => String, { nullable: true }) + bytes!: Buffer | null; - @Field(() => GraphQLDecimal, { nullable: true }) - decimal!: Decimal | null; + @Field(() => GraphQLDecimal, { nullable: true }) + decimal!: Decimal | null; - @Field(() => String, { nullable: true }) - bigInt!: bigint | null; + @Field(() => String, { nullable: true }) + bigInt!: bigint | null; - @Field(() => GraphQLJSON, { nullable: true }) - json!: any | null; + @Field(() => GraphQLJSON, { nullable: true }) + json!: any | null; - @Field(() => [String], { nullable: true }) - friends!: Array; + @Field(() => [String], { nullable: true }) + friends!: Array; } diff --git a/@generated/dummy/find-first-dummy.args.ts b/@generated/dummy/find-first-dummy.args.ts index 64b5d1fd..a4126fcc 100644 --- a/@generated/dummy/find-first-dummy.args.ts +++ b/@generated/dummy/find-first-dummy.args.ts @@ -8,21 +8,21 @@ import { DummyScalarFieldEnum } from './dummy-scalar-field.enum'; @ArgsType() export class FindFirstDummyArgs { - @Field(() => DummyWhereInput, { nullable: true }) - where?: DummyWhereInput; + @Field(() => DummyWhereInput, { nullable: true }) + where?: DummyWhereInput; - @Field(() => [DummyOrderByWithRelationAndSearchRelevanceInput], { nullable: true }) - orderBy?: Array; + @Field(() => [DummyOrderByWithRelationAndSearchRelevanceInput], { nullable: true }) + orderBy?: Array; - @Field(() => DummyWhereUniqueInput, { nullable: true }) - cursor?: DummyWhereUniqueInput; + @Field(() => DummyWhereUniqueInput, { nullable: true }) + cursor?: DummyWhereUniqueInput; - @Field(() => Int, { nullable: true }) - take?: number; + @Field(() => Int, { nullable: true }) + take?: number; - @Field(() => Int, { nullable: true }) - skip?: number; + @Field(() => Int, { nullable: true }) + skip?: number; - @Field(() => [DummyScalarFieldEnum], { nullable: true }) - distinct?: Array; + @Field(() => [DummyScalarFieldEnum], { nullable: true }) + distinct?: Array; } diff --git a/@generated/dummy/find-many-dummy.args.ts b/@generated/dummy/find-many-dummy.args.ts index dff34ef7..d595fe3b 100644 --- a/@generated/dummy/find-many-dummy.args.ts +++ b/@generated/dummy/find-many-dummy.args.ts @@ -8,21 +8,21 @@ import { DummyScalarFieldEnum } from './dummy-scalar-field.enum'; @ArgsType() export class FindManyDummyArgs { - @Field(() => DummyWhereInput, { nullable: true }) - where?: DummyWhereInput; + @Field(() => DummyWhereInput, { nullable: true }) + where?: DummyWhereInput; - @Field(() => [DummyOrderByWithRelationAndSearchRelevanceInput], { nullable: true }) - orderBy?: Array; + @Field(() => [DummyOrderByWithRelationAndSearchRelevanceInput], { nullable: true }) + orderBy?: Array; - @Field(() => DummyWhereUniqueInput, { nullable: true }) - cursor?: DummyWhereUniqueInput; + @Field(() => DummyWhereUniqueInput, { nullable: true }) + cursor?: DummyWhereUniqueInput; - @Field(() => Int, { nullable: true }) - take?: number; + @Field(() => Int, { nullable: true }) + take?: number; - @Field(() => Int, { nullable: true }) - skip?: number; + @Field(() => Int, { nullable: true }) + skip?: number; - @Field(() => [DummyScalarFieldEnum], { nullable: true }) - distinct?: Array; + @Field(() => [DummyScalarFieldEnum], { nullable: true }) + distinct?: Array; } diff --git a/@generated/dummy/find-unique-dummy.args.ts b/@generated/dummy/find-unique-dummy.args.ts index 38f4d08b..1782c320 100644 --- a/@generated/dummy/find-unique-dummy.args.ts +++ b/@generated/dummy/find-unique-dummy.args.ts @@ -4,6 +4,6 @@ import { DummyWhereUniqueInput } from './dummy-where-unique.input'; @ArgsType() export class FindUniqueDummyArgs { - @Field(() => DummyWhereUniqueInput, { nullable: false }) - where!: DummyWhereUniqueInput; + @Field(() => DummyWhereUniqueInput, { nullable: false }) + where!: DummyWhereUniqueInput; } diff --git a/@generated/dummy/update-many-dummy.args.ts b/@generated/dummy/update-many-dummy.args.ts index af84ecaf..08d76224 100644 --- a/@generated/dummy/update-many-dummy.args.ts +++ b/@generated/dummy/update-many-dummy.args.ts @@ -5,9 +5,9 @@ import { DummyWhereInput } from './dummy-where.input'; @ArgsType() export class UpdateManyDummyArgs { - @Field(() => DummyUpdateManyMutationInput, { nullable: false }) - data!: DummyUpdateManyMutationInput; + @Field(() => DummyUpdateManyMutationInput, { nullable: false }) + data!: DummyUpdateManyMutationInput; - @Field(() => DummyWhereInput, { nullable: true }) - where?: DummyWhereInput; + @Field(() => DummyWhereInput, { nullable: true }) + where?: DummyWhereInput; } diff --git a/@generated/dummy/update-one-dummy.args.ts b/@generated/dummy/update-one-dummy.args.ts index 06d68beb..9662e012 100644 --- a/@generated/dummy/update-one-dummy.args.ts +++ b/@generated/dummy/update-one-dummy.args.ts @@ -5,9 +5,9 @@ import { DummyWhereUniqueInput } from './dummy-where-unique.input'; @ArgsType() export class UpdateOneDummyArgs { - @Field(() => DummyUpdateInput, { nullable: false }) - data!: DummyUpdateInput; + @Field(() => DummyUpdateInput, { nullable: false }) + data!: DummyUpdateInput; - @Field(() => DummyWhereUniqueInput, { nullable: false }) - where!: DummyWhereUniqueInput; + @Field(() => DummyWhereUniqueInput, { nullable: false }) + where!: DummyWhereUniqueInput; } diff --git a/@generated/dummy/upsert-one-dummy.args.ts b/@generated/dummy/upsert-one-dummy.args.ts index 1800d764..eb6afe83 100644 --- a/@generated/dummy/upsert-one-dummy.args.ts +++ b/@generated/dummy/upsert-one-dummy.args.ts @@ -6,12 +6,12 @@ import { DummyUpdateInput } from './dummy-update.input'; @ArgsType() export class UpsertOneDummyArgs { - @Field(() => DummyWhereUniqueInput, { nullable: false }) - where!: DummyWhereUniqueInput; + @Field(() => DummyWhereUniqueInput, { nullable: false }) + where!: DummyWhereUniqueInput; - @Field(() => DummyCreateInput, { nullable: false }) - create!: DummyCreateInput; + @Field(() => DummyCreateInput, { nullable: false }) + create!: DummyCreateInput; - @Field(() => DummyUpdateInput, { nullable: false }) - update!: DummyUpdateInput; + @Field(() => DummyUpdateInput, { nullable: false }) + update!: DummyUpdateInput; } diff --git a/@generated/prisma/affected-rows.output.ts b/@generated/prisma/affected-rows.output.ts index b4b0153d..b43eddcc 100644 --- a/@generated/prisma/affected-rows.output.ts +++ b/@generated/prisma/affected-rows.output.ts @@ -4,6 +4,6 @@ import { Int } from '@nestjs/graphql'; @ObjectType() export class AffectedRows { - @Field(() => Int, { nullable: false }) - count!: number; + @Field(() => Int, { nullable: false }) + count!: number; } diff --git a/@generated/prisma/big-int-nullable-filter.input.ts b/@generated/prisma/big-int-nullable-filter.input.ts index 5e39d7e6..5d289c52 100644 --- a/@generated/prisma/big-int-nullable-filter.input.ts +++ b/@generated/prisma/big-int-nullable-filter.input.ts @@ -4,27 +4,27 @@ import { NestedBigIntNullableFilter } from './nested-big-int-nullable-filter.inp @InputType() export class BigIntNullableFilter { - @Field(() => String, { nullable: true }) - equals?: bigint | number; + @Field(() => String, { nullable: true }) + equals?: bigint | number; - @Field(() => [String], { nullable: true }) - in?: Array | Array; + @Field(() => [String], { nullable: true }) + in?: Array | Array; - @Field(() => [String], { nullable: true }) - notIn?: Array | Array; + @Field(() => [String], { nullable: true }) + notIn?: Array | Array; - @Field(() => String, { nullable: true }) - lt?: bigint | number; + @Field(() => String, { nullable: true }) + lt?: bigint | number; - @Field(() => String, { nullable: true }) - lte?: bigint | number; + @Field(() => String, { nullable: true }) + lte?: bigint | number; - @Field(() => String, { nullable: true }) - gt?: bigint | number; + @Field(() => String, { nullable: true }) + gt?: bigint | number; - @Field(() => String, { nullable: true }) - gte?: bigint | number; + @Field(() => String, { nullable: true }) + gte?: bigint | number; - @Field(() => NestedBigIntNullableFilter, { nullable: true }) - not?: NestedBigIntNullableFilter; + @Field(() => NestedBigIntNullableFilter, { nullable: true }) + not?: NestedBigIntNullableFilter; } diff --git a/@generated/prisma/big-int-nullable-with-aggregates-filter.input.ts b/@generated/prisma/big-int-nullable-with-aggregates-filter.input.ts index 1606c699..0fd6a394 100644 --- a/@generated/prisma/big-int-nullable-with-aggregates-filter.input.ts +++ b/@generated/prisma/big-int-nullable-with-aggregates-filter.input.ts @@ -7,42 +7,42 @@ import { NestedBigIntNullableFilter } from './nested-big-int-nullable-filter.inp @InputType() export class BigIntNullableWithAggregatesFilter { - @Field(() => String, { nullable: true }) - equals?: bigint | number; + @Field(() => String, { nullable: true }) + equals?: bigint | number; - @Field(() => [String], { nullable: true }) - in?: Array | Array; + @Field(() => [String], { nullable: true }) + in?: Array | Array; - @Field(() => [String], { nullable: true }) - notIn?: Array | Array; + @Field(() => [String], { nullable: true }) + notIn?: Array | Array; - @Field(() => String, { nullable: true }) - lt?: bigint | number; + @Field(() => String, { nullable: true }) + lt?: bigint | number; - @Field(() => String, { nullable: true }) - lte?: bigint | number; + @Field(() => String, { nullable: true }) + lte?: bigint | number; - @Field(() => String, { nullable: true }) - gt?: bigint | number; + @Field(() => String, { nullable: true }) + gt?: bigint | number; - @Field(() => String, { nullable: true }) - gte?: bigint | number; + @Field(() => String, { nullable: true }) + gte?: bigint | number; - @Field(() => NestedBigIntNullableWithAggregatesFilter, { nullable: true }) - not?: NestedBigIntNullableWithAggregatesFilter; + @Field(() => NestedBigIntNullableWithAggregatesFilter, { nullable: true }) + not?: NestedBigIntNullableWithAggregatesFilter; - @Field(() => NestedIntNullableFilter, { nullable: true }) - _count?: NestedIntNullableFilter; + @Field(() => NestedIntNullableFilter, { nullable: true }) + _count?: NestedIntNullableFilter; - @Field(() => NestedFloatNullableFilter, { nullable: true }) - _avg?: NestedFloatNullableFilter; + @Field(() => NestedFloatNullableFilter, { nullable: true }) + _avg?: NestedFloatNullableFilter; - @Field(() => NestedBigIntNullableFilter, { nullable: true }) - _sum?: NestedBigIntNullableFilter; + @Field(() => NestedBigIntNullableFilter, { nullable: true }) + _sum?: NestedBigIntNullableFilter; - @Field(() => NestedBigIntNullableFilter, { nullable: true }) - _min?: NestedBigIntNullableFilter; + @Field(() => NestedBigIntNullableFilter, { nullable: true }) + _min?: NestedBigIntNullableFilter; - @Field(() => NestedBigIntNullableFilter, { nullable: true }) - _max?: NestedBigIntNullableFilter; + @Field(() => NestedBigIntNullableFilter, { nullable: true }) + _max?: NestedBigIntNullableFilter; } diff --git a/@generated/prisma/bool-nullable-filter.input.ts b/@generated/prisma/bool-nullable-filter.input.ts index 038908af..9cfaa1ce 100644 --- a/@generated/prisma/bool-nullable-filter.input.ts +++ b/@generated/prisma/bool-nullable-filter.input.ts @@ -4,9 +4,9 @@ import { NestedBoolNullableFilter } from './nested-bool-nullable-filter.input'; @InputType() export class BoolNullableFilter { - @Field(() => Boolean, { nullable: true }) - equals?: boolean; + @Field(() => Boolean, { nullable: true }) + equals?: boolean; - @Field(() => NestedBoolNullableFilter, { nullable: true }) - not?: NestedBoolNullableFilter; + @Field(() => NestedBoolNullableFilter, { nullable: true }) + not?: NestedBoolNullableFilter; } diff --git a/@generated/prisma/bool-nullable-with-aggregates-filter.input.ts b/@generated/prisma/bool-nullable-with-aggregates-filter.input.ts index aeedfaea..52864619 100644 --- a/@generated/prisma/bool-nullable-with-aggregates-filter.input.ts +++ b/@generated/prisma/bool-nullable-with-aggregates-filter.input.ts @@ -6,18 +6,18 @@ import { NestedBoolNullableFilter } from './nested-bool-nullable-filter.input'; @InputType() export class BoolNullableWithAggregatesFilter { - @Field(() => Boolean, { nullable: true }) - equals?: boolean; + @Field(() => Boolean, { nullable: true }) + equals?: boolean; - @Field(() => NestedBoolNullableWithAggregatesFilter, { nullable: true }) - not?: NestedBoolNullableWithAggregatesFilter; + @Field(() => NestedBoolNullableWithAggregatesFilter, { nullable: true }) + not?: NestedBoolNullableWithAggregatesFilter; - @Field(() => NestedIntNullableFilter, { nullable: true }) - _count?: NestedIntNullableFilter; + @Field(() => NestedIntNullableFilter, { nullable: true }) + _count?: NestedIntNullableFilter; - @Field(() => NestedBoolNullableFilter, { nullable: true }) - _min?: NestedBoolNullableFilter; + @Field(() => NestedBoolNullableFilter, { nullable: true }) + _min?: NestedBoolNullableFilter; - @Field(() => NestedBoolNullableFilter, { nullable: true }) - _max?: NestedBoolNullableFilter; + @Field(() => NestedBoolNullableFilter, { nullable: true }) + _max?: NestedBoolNullableFilter; } diff --git a/@generated/prisma/bytes-nullable-filter.input.ts b/@generated/prisma/bytes-nullable-filter.input.ts index 59061817..cbc2acde 100644 --- a/@generated/prisma/bytes-nullable-filter.input.ts +++ b/@generated/prisma/bytes-nullable-filter.input.ts @@ -4,15 +4,15 @@ import { NestedBytesNullableFilter } from './nested-bytes-nullable-filter.input' @InputType() export class BytesNullableFilter { - @Field(() => String, { nullable: true }) - equals?: Buffer; + @Field(() => String, { nullable: true }) + equals?: Buffer; - @Field(() => [String], { nullable: true }) - in?: Array; + @Field(() => [String], { nullable: true }) + in?: Array; - @Field(() => [String], { nullable: true }) - notIn?: Array; + @Field(() => [String], { nullable: true }) + notIn?: Array; - @Field(() => NestedBytesNullableFilter, { nullable: true }) - not?: NestedBytesNullableFilter; + @Field(() => NestedBytesNullableFilter, { nullable: true }) + not?: NestedBytesNullableFilter; } diff --git a/@generated/prisma/bytes-nullable-with-aggregates-filter.input.ts b/@generated/prisma/bytes-nullable-with-aggregates-filter.input.ts index 20b00f35..a953d1a5 100644 --- a/@generated/prisma/bytes-nullable-with-aggregates-filter.input.ts +++ b/@generated/prisma/bytes-nullable-with-aggregates-filter.input.ts @@ -6,24 +6,24 @@ import { NestedBytesNullableFilter } from './nested-bytes-nullable-filter.input' @InputType() export class BytesNullableWithAggregatesFilter { - @Field(() => String, { nullable: true }) - equals?: Buffer; + @Field(() => String, { nullable: true }) + equals?: Buffer; - @Field(() => [String], { nullable: true }) - in?: Array; + @Field(() => [String], { nullable: true }) + in?: Array; - @Field(() => [String], { nullable: true }) - notIn?: Array; + @Field(() => [String], { nullable: true }) + notIn?: Array; - @Field(() => NestedBytesNullableWithAggregatesFilter, { nullable: true }) - not?: NestedBytesNullableWithAggregatesFilter; + @Field(() => NestedBytesNullableWithAggregatesFilter, { nullable: true }) + not?: NestedBytesNullableWithAggregatesFilter; - @Field(() => NestedIntNullableFilter, { nullable: true }) - _count?: NestedIntNullableFilter; + @Field(() => NestedIntNullableFilter, { nullable: true }) + _count?: NestedIntNullableFilter; - @Field(() => NestedBytesNullableFilter, { nullable: true }) - _min?: NestedBytesNullableFilter; + @Field(() => NestedBytesNullableFilter, { nullable: true }) + _min?: NestedBytesNullableFilter; - @Field(() => NestedBytesNullableFilter, { nullable: true }) - _max?: NestedBytesNullableFilter; + @Field(() => NestedBytesNullableFilter, { nullable: true }) + _max?: NestedBytesNullableFilter; } diff --git a/@generated/prisma/date-time-field-update-operations.input.ts b/@generated/prisma/date-time-field-update-operations.input.ts index 525b2dc5..98976cb5 100644 --- a/@generated/prisma/date-time-field-update-operations.input.ts +++ b/@generated/prisma/date-time-field-update-operations.input.ts @@ -3,6 +3,6 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class DateTimeFieldUpdateOperationsInput { - @Field(() => Date, { nullable: true }) - set?: Date | string; + @Field(() => Date, { nullable: true }) + set?: Date | string; } diff --git a/@generated/prisma/date-time-filter.input.ts b/@generated/prisma/date-time-filter.input.ts index 50e72907..c93b003c 100644 --- a/@generated/prisma/date-time-filter.input.ts +++ b/@generated/prisma/date-time-filter.input.ts @@ -4,27 +4,27 @@ import { NestedDateTimeFilter } from './nested-date-time-filter.input'; @InputType() export class DateTimeFilter { - @Field(() => Date, { nullable: true }) - equals?: Date | string; + @Field(() => Date, { nullable: true }) + equals?: Date | string; - @Field(() => [Date], { nullable: true }) - in?: Array | Array; + @Field(() => [Date], { nullable: true }) + in?: Array | Array; - @Field(() => [Date], { nullable: true }) - notIn?: Array | Array; + @Field(() => [Date], { nullable: true }) + notIn?: Array | Array; - @Field(() => Date, { nullable: true }) - lt?: Date | string; + @Field(() => Date, { nullable: true }) + lt?: Date | string; - @Field(() => Date, { nullable: true }) - lte?: Date | string; + @Field(() => Date, { nullable: true }) + lte?: Date | string; - @Field(() => Date, { nullable: true }) - gt?: Date | string; + @Field(() => Date, { nullable: true }) + gt?: Date | string; - @Field(() => Date, { nullable: true }) - gte?: Date | string; + @Field(() => Date, { nullable: true }) + gte?: Date | string; - @Field(() => NestedDateTimeFilter, { nullable: true }) - not?: NestedDateTimeFilter; + @Field(() => NestedDateTimeFilter, { nullable: true }) + not?: NestedDateTimeFilter; } diff --git a/@generated/prisma/date-time-with-aggregates-filter.input.ts b/@generated/prisma/date-time-with-aggregates-filter.input.ts index 0251a01f..47fba5e3 100644 --- a/@generated/prisma/date-time-with-aggregates-filter.input.ts +++ b/@generated/prisma/date-time-with-aggregates-filter.input.ts @@ -6,36 +6,36 @@ import { NestedDateTimeFilter } from './nested-date-time-filter.input'; @InputType() export class DateTimeWithAggregatesFilter { - @Field(() => Date, { nullable: true }) - equals?: Date | string; + @Field(() => Date, { nullable: true }) + equals?: Date | string; - @Field(() => [Date], { nullable: true }) - in?: Array | Array; + @Field(() => [Date], { nullable: true }) + in?: Array | Array; - @Field(() => [Date], { nullable: true }) - notIn?: Array | Array; + @Field(() => [Date], { nullable: true }) + notIn?: Array | Array; - @Field(() => Date, { nullable: true }) - lt?: Date | string; + @Field(() => Date, { nullable: true }) + lt?: Date | string; - @Field(() => Date, { nullable: true }) - lte?: Date | string; + @Field(() => Date, { nullable: true }) + lte?: Date | string; - @Field(() => Date, { nullable: true }) - gt?: Date | string; + @Field(() => Date, { nullable: true }) + gt?: Date | string; - @Field(() => Date, { nullable: true }) - gte?: Date | string; + @Field(() => Date, { nullable: true }) + gte?: Date | string; - @Field(() => NestedDateTimeWithAggregatesFilter, { nullable: true }) - not?: NestedDateTimeWithAggregatesFilter; + @Field(() => NestedDateTimeWithAggregatesFilter, { nullable: true }) + not?: NestedDateTimeWithAggregatesFilter; - @Field(() => NestedIntFilter, { nullable: true }) - _count?: NestedIntFilter; + @Field(() => NestedIntFilter, { nullable: true }) + _count?: NestedIntFilter; - @Field(() => NestedDateTimeFilter, { nullable: true }) - _min?: NestedDateTimeFilter; + @Field(() => NestedDateTimeFilter, { nullable: true }) + _min?: NestedDateTimeFilter; - @Field(() => NestedDateTimeFilter, { nullable: true }) - _max?: NestedDateTimeFilter; + @Field(() => NestedDateTimeFilter, { nullable: true }) + _max?: NestedDateTimeFilter; } diff --git a/@generated/prisma/decimal-nullable-filter.input.ts b/@generated/prisma/decimal-nullable-filter.input.ts index c6a48933..72647f64 100644 --- a/@generated/prisma/decimal-nullable-filter.input.ts +++ b/@generated/prisma/decimal-nullable-filter.input.ts @@ -6,27 +6,27 @@ import { NestedDecimalNullableFilter } from './nested-decimal-nullable-filter.in @InputType() export class DecimalNullableFilter { - @Field(() => GraphQLDecimal, { nullable: true }) - equals?: Decimal; + @Field(() => GraphQLDecimal, { nullable: true }) + equals?: Decimal; - @Field(() => [GraphQLDecimal], { nullable: true }) - in?: Array; + @Field(() => [GraphQLDecimal], { nullable: true }) + in?: Array; - @Field(() => [GraphQLDecimal], { nullable: true }) - notIn?: Array; + @Field(() => [GraphQLDecimal], { nullable: true }) + notIn?: Array; - @Field(() => GraphQLDecimal, { nullable: true }) - lt?: Decimal; + @Field(() => GraphQLDecimal, { nullable: true }) + lt?: Decimal; - @Field(() => GraphQLDecimal, { nullable: true }) - lte?: Decimal; + @Field(() => GraphQLDecimal, { nullable: true }) + lte?: Decimal; - @Field(() => GraphQLDecimal, { nullable: true }) - gt?: Decimal; + @Field(() => GraphQLDecimal, { nullable: true }) + gt?: Decimal; - @Field(() => GraphQLDecimal, { nullable: true }) - gte?: Decimal; + @Field(() => GraphQLDecimal, { nullable: true }) + gte?: Decimal; - @Field(() => NestedDecimalNullableFilter, { nullable: true }) - not?: NestedDecimalNullableFilter; + @Field(() => NestedDecimalNullableFilter, { nullable: true }) + not?: NestedDecimalNullableFilter; } diff --git a/@generated/prisma/decimal-nullable-with-aggregates-filter.input.ts b/@generated/prisma/decimal-nullable-with-aggregates-filter.input.ts index a8397e13..0490d726 100644 --- a/@generated/prisma/decimal-nullable-with-aggregates-filter.input.ts +++ b/@generated/prisma/decimal-nullable-with-aggregates-filter.input.ts @@ -8,42 +8,42 @@ import { NestedDecimalNullableFilter } from './nested-decimal-nullable-filter.in @InputType() export class DecimalNullableWithAggregatesFilter { - @Field(() => GraphQLDecimal, { nullable: true }) - equals?: Decimal; + @Field(() => GraphQLDecimal, { nullable: true }) + equals?: Decimal; - @Field(() => [GraphQLDecimal], { nullable: true }) - in?: Array; + @Field(() => [GraphQLDecimal], { nullable: true }) + in?: Array; - @Field(() => [GraphQLDecimal], { nullable: true }) - notIn?: Array; + @Field(() => [GraphQLDecimal], { nullable: true }) + notIn?: Array; - @Field(() => GraphQLDecimal, { nullable: true }) - lt?: Decimal; + @Field(() => GraphQLDecimal, { nullable: true }) + lt?: Decimal; - @Field(() => GraphQLDecimal, { nullable: true }) - lte?: Decimal; + @Field(() => GraphQLDecimal, { nullable: true }) + lte?: Decimal; - @Field(() => GraphQLDecimal, { nullable: true }) - gt?: Decimal; + @Field(() => GraphQLDecimal, { nullable: true }) + gt?: Decimal; - @Field(() => GraphQLDecimal, { nullable: true }) - gte?: Decimal; + @Field(() => GraphQLDecimal, { nullable: true }) + gte?: Decimal; - @Field(() => NestedDecimalNullableWithAggregatesFilter, { nullable: true }) - not?: NestedDecimalNullableWithAggregatesFilter; + @Field(() => NestedDecimalNullableWithAggregatesFilter, { nullable: true }) + not?: NestedDecimalNullableWithAggregatesFilter; - @Field(() => NestedIntNullableFilter, { nullable: true }) - _count?: NestedIntNullableFilter; + @Field(() => NestedIntNullableFilter, { nullable: true }) + _count?: NestedIntNullableFilter; - @Field(() => NestedDecimalNullableFilter, { nullable: true }) - _avg?: NestedDecimalNullableFilter; + @Field(() => NestedDecimalNullableFilter, { nullable: true }) + _avg?: NestedDecimalNullableFilter; - @Field(() => NestedDecimalNullableFilter, { nullable: true }) - _sum?: NestedDecimalNullableFilter; + @Field(() => NestedDecimalNullableFilter, { nullable: true }) + _sum?: NestedDecimalNullableFilter; - @Field(() => NestedDecimalNullableFilter, { nullable: true }) - _min?: NestedDecimalNullableFilter; + @Field(() => NestedDecimalNullableFilter, { nullable: true }) + _min?: NestedDecimalNullableFilter; - @Field(() => NestedDecimalNullableFilter, { nullable: true }) - _max?: NestedDecimalNullableFilter; + @Field(() => NestedDecimalNullableFilter, { nullable: true }) + _max?: NestedDecimalNullableFilter; } diff --git a/@generated/prisma/dummy-createfriends.input.ts b/@generated/prisma/dummy-createfriends.input.ts index 4210fb5f..a0c11969 100644 --- a/@generated/prisma/dummy-createfriends.input.ts +++ b/@generated/prisma/dummy-createfriends.input.ts @@ -3,6 +3,6 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class DummyCreatefriendsInput { - @Field(() => [String], { nullable: false }) - set!: Array; + @Field(() => [String], { nullable: false }) + set!: Array; } diff --git a/@generated/prisma/dummy-updatefriends.input.ts b/@generated/prisma/dummy-updatefriends.input.ts index e35c4a6d..9638210e 100644 --- a/@generated/prisma/dummy-updatefriends.input.ts +++ b/@generated/prisma/dummy-updatefriends.input.ts @@ -3,9 +3,9 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class DummyUpdatefriendsInput { - @Field(() => [String], { nullable: true }) - set?: Array; + @Field(() => [String], { nullable: true }) + set?: Array; - @Field(() => [String], { nullable: true }) - push?: Array; + @Field(() => [String], { nullable: true }) + push?: Array; } diff --git a/@generated/prisma/enum-role-nullable-filter.input.ts b/@generated/prisma/enum-role-nullable-filter.input.ts index 1476ae27..a302cd7a 100644 --- a/@generated/prisma/enum-role-nullable-filter.input.ts +++ b/@generated/prisma/enum-role-nullable-filter.input.ts @@ -5,15 +5,15 @@ import { NestedEnumRoleNullableFilter } from './nested-enum-role-nullable-filter @InputType() export class EnumRoleNullableFilter { - @Field(() => Role, { nullable: true }) - equals?: keyof typeof Role; + @Field(() => Role, { nullable: true }) + equals?: keyof typeof Role; - @Field(() => [Role], { nullable: true }) - in?: Array; + @Field(() => [Role], { nullable: true }) + in?: Array; - @Field(() => [Role], { nullable: true }) - notIn?: Array; + @Field(() => [Role], { nullable: true }) + notIn?: Array; - @Field(() => NestedEnumRoleNullableFilter, { nullable: true }) - not?: NestedEnumRoleNullableFilter; + @Field(() => NestedEnumRoleNullableFilter, { nullable: true }) + not?: NestedEnumRoleNullableFilter; } diff --git a/@generated/prisma/enum-role-nullable-with-aggregates-filter.input.ts b/@generated/prisma/enum-role-nullable-with-aggregates-filter.input.ts index 7329feaf..d953f201 100644 --- a/@generated/prisma/enum-role-nullable-with-aggregates-filter.input.ts +++ b/@generated/prisma/enum-role-nullable-with-aggregates-filter.input.ts @@ -7,24 +7,24 @@ import { NestedEnumRoleNullableFilter } from './nested-enum-role-nullable-filter @InputType() export class EnumRoleNullableWithAggregatesFilter { - @Field(() => Role, { nullable: true }) - equals?: keyof typeof Role; + @Field(() => Role, { nullable: true }) + equals?: keyof typeof Role; - @Field(() => [Role], { nullable: true }) - in?: Array; + @Field(() => [Role], { nullable: true }) + in?: Array; - @Field(() => [Role], { nullable: true }) - notIn?: Array; + @Field(() => [Role], { nullable: true }) + notIn?: Array; - @Field(() => NestedEnumRoleNullableWithAggregatesFilter, { nullable: true }) - not?: NestedEnumRoleNullableWithAggregatesFilter; + @Field(() => NestedEnumRoleNullableWithAggregatesFilter, { nullable: true }) + not?: NestedEnumRoleNullableWithAggregatesFilter; - @Field(() => NestedIntNullableFilter, { nullable: true }) - _count?: NestedIntNullableFilter; + @Field(() => NestedIntNullableFilter, { nullable: true }) + _count?: NestedIntNullableFilter; - @Field(() => NestedEnumRoleNullableFilter, { nullable: true }) - _min?: NestedEnumRoleNullableFilter; + @Field(() => NestedEnumRoleNullableFilter, { nullable: true }) + _min?: NestedEnumRoleNullableFilter; - @Field(() => NestedEnumRoleNullableFilter, { nullable: true }) - _max?: NestedEnumRoleNullableFilter; + @Field(() => NestedEnumRoleNullableFilter, { nullable: true }) + _max?: NestedEnumRoleNullableFilter; } diff --git a/@generated/prisma/float-field-update-operations.input.ts b/@generated/prisma/float-field-update-operations.input.ts index 05766a4d..963ca719 100644 --- a/@generated/prisma/float-field-update-operations.input.ts +++ b/@generated/prisma/float-field-update-operations.input.ts @@ -4,18 +4,18 @@ import { Float } from '@nestjs/graphql'; @InputType() export class FloatFieldUpdateOperationsInput { - @Field(() => Float, { nullable: true }) - set?: number; + @Field(() => Float, { nullable: true }) + set?: number; - @Field(() => Float, { nullable: true }) - increment?: number; + @Field(() => Float, { nullable: true }) + increment?: number; - @Field(() => Float, { nullable: true }) - decrement?: number; + @Field(() => Float, { nullable: true }) + decrement?: number; - @Field(() => Float, { nullable: true }) - multiply?: number; + @Field(() => Float, { nullable: true }) + multiply?: number; - @Field(() => Float, { nullable: true }) - divide?: number; + @Field(() => Float, { nullable: true }) + divide?: number; } diff --git a/@generated/prisma/float-filter.input.ts b/@generated/prisma/float-filter.input.ts index 273ba296..f103c4a1 100644 --- a/@generated/prisma/float-filter.input.ts +++ b/@generated/prisma/float-filter.input.ts @@ -5,27 +5,27 @@ import { NestedFloatFilter } from './nested-float-filter.input'; @InputType() export class FloatFilter { - @Field(() => Float, { nullable: true }) - equals?: number; + @Field(() => Float, { nullable: true }) + equals?: number; - @Field(() => [Float], { nullable: true }) - in?: Array; + @Field(() => [Float], { nullable: true }) + in?: Array; - @Field(() => [Float], { nullable: true }) - notIn?: Array; + @Field(() => [Float], { nullable: true }) + notIn?: Array; - @Field(() => Float, { nullable: true }) - lt?: number; + @Field(() => Float, { nullable: true }) + lt?: number; - @Field(() => Float, { nullable: true }) - lte?: number; + @Field(() => Float, { nullable: true }) + lte?: number; - @Field(() => Float, { nullable: true }) - gt?: number; + @Field(() => Float, { nullable: true }) + gt?: number; - @Field(() => Float, { nullable: true }) - gte?: number; + @Field(() => Float, { nullable: true }) + gte?: number; - @Field(() => NestedFloatFilter, { nullable: true }) - not?: NestedFloatFilter; + @Field(() => NestedFloatFilter, { nullable: true }) + not?: NestedFloatFilter; } diff --git a/@generated/prisma/float-nullable-filter.input.ts b/@generated/prisma/float-nullable-filter.input.ts index ec9cd873..1d343dd1 100644 --- a/@generated/prisma/float-nullable-filter.input.ts +++ b/@generated/prisma/float-nullable-filter.input.ts @@ -5,27 +5,27 @@ import { NestedFloatNullableFilter } from './nested-float-nullable-filter.input' @InputType() export class FloatNullableFilter { - @Field(() => Float, { nullable: true }) - equals?: number; + @Field(() => Float, { nullable: true }) + equals?: number; - @Field(() => [Float], { nullable: true }) - in?: Array; + @Field(() => [Float], { nullable: true }) + in?: Array; - @Field(() => [Float], { nullable: true }) - notIn?: Array; + @Field(() => [Float], { nullable: true }) + notIn?: Array; - @Field(() => Float, { nullable: true }) - lt?: number; + @Field(() => Float, { nullable: true }) + lt?: number; - @Field(() => Float, { nullable: true }) - lte?: number; + @Field(() => Float, { nullable: true }) + lte?: number; - @Field(() => Float, { nullable: true }) - gt?: number; + @Field(() => Float, { nullable: true }) + gt?: number; - @Field(() => Float, { nullable: true }) - gte?: number; + @Field(() => Float, { nullable: true }) + gte?: number; - @Field(() => NestedFloatNullableFilter, { nullable: true }) - not?: NestedFloatNullableFilter; + @Field(() => NestedFloatNullableFilter, { nullable: true }) + not?: NestedFloatNullableFilter; } diff --git a/@generated/prisma/float-nullable-with-aggregates-filter.input.ts b/@generated/prisma/float-nullable-with-aggregates-filter.input.ts index 4b11d9d1..9c6c327d 100644 --- a/@generated/prisma/float-nullable-with-aggregates-filter.input.ts +++ b/@generated/prisma/float-nullable-with-aggregates-filter.input.ts @@ -7,42 +7,42 @@ import { NestedFloatNullableFilter } from './nested-float-nullable-filter.input' @InputType() export class FloatNullableWithAggregatesFilter { - @Field(() => Float, { nullable: true }) - equals?: number; + @Field(() => Float, { nullable: true }) + equals?: number; - @Field(() => [Float], { nullable: true }) - in?: Array; + @Field(() => [Float], { nullable: true }) + in?: Array; - @Field(() => [Float], { nullable: true }) - notIn?: Array; + @Field(() => [Float], { nullable: true }) + notIn?: Array; - @Field(() => Float, { nullable: true }) - lt?: number; + @Field(() => Float, { nullable: true }) + lt?: number; - @Field(() => Float, { nullable: true }) - lte?: number; + @Field(() => Float, { nullable: true }) + lte?: number; - @Field(() => Float, { nullable: true }) - gt?: number; + @Field(() => Float, { nullable: true }) + gt?: number; - @Field(() => Float, { nullable: true }) - gte?: number; + @Field(() => Float, { nullable: true }) + gte?: number; - @Field(() => NestedFloatNullableWithAggregatesFilter, { nullable: true }) - not?: NestedFloatNullableWithAggregatesFilter; + @Field(() => NestedFloatNullableWithAggregatesFilter, { nullable: true }) + not?: NestedFloatNullableWithAggregatesFilter; - @Field(() => NestedIntNullableFilter, { nullable: true }) - _count?: NestedIntNullableFilter; + @Field(() => NestedIntNullableFilter, { nullable: true }) + _count?: NestedIntNullableFilter; - @Field(() => NestedFloatNullableFilter, { nullable: true }) - _avg?: NestedFloatNullableFilter; + @Field(() => NestedFloatNullableFilter, { nullable: true }) + _avg?: NestedFloatNullableFilter; - @Field(() => NestedFloatNullableFilter, { nullable: true }) - _sum?: NestedFloatNullableFilter; + @Field(() => NestedFloatNullableFilter, { nullable: true }) + _sum?: NestedFloatNullableFilter; - @Field(() => NestedFloatNullableFilter, { nullable: true }) - _min?: NestedFloatNullableFilter; + @Field(() => NestedFloatNullableFilter, { nullable: true }) + _min?: NestedFloatNullableFilter; - @Field(() => NestedFloatNullableFilter, { nullable: true }) - _max?: NestedFloatNullableFilter; + @Field(() => NestedFloatNullableFilter, { nullable: true }) + _max?: NestedFloatNullableFilter; } diff --git a/@generated/prisma/float-with-aggregates-filter.input.ts b/@generated/prisma/float-with-aggregates-filter.input.ts index 2d41aee0..50def8c8 100644 --- a/@generated/prisma/float-with-aggregates-filter.input.ts +++ b/@generated/prisma/float-with-aggregates-filter.input.ts @@ -7,42 +7,42 @@ import { NestedFloatFilter } from './nested-float-filter.input'; @InputType() export class FloatWithAggregatesFilter { - @Field(() => Float, { nullable: true }) - equals?: number; + @Field(() => Float, { nullable: true }) + equals?: number; - @Field(() => [Float], { nullable: true }) - in?: Array; + @Field(() => [Float], { nullable: true }) + in?: Array; - @Field(() => [Float], { nullable: true }) - notIn?: Array; + @Field(() => [Float], { nullable: true }) + notIn?: Array; - @Field(() => Float, { nullable: true }) - lt?: number; + @Field(() => Float, { nullable: true }) + lt?: number; - @Field(() => Float, { nullable: true }) - lte?: number; + @Field(() => Float, { nullable: true }) + lte?: number; - @Field(() => Float, { nullable: true }) - gt?: number; + @Field(() => Float, { nullable: true }) + gt?: number; - @Field(() => Float, { nullable: true }) - gte?: number; + @Field(() => Float, { nullable: true }) + gte?: number; - @Field(() => NestedFloatWithAggregatesFilter, { nullable: true }) - not?: NestedFloatWithAggregatesFilter; + @Field(() => NestedFloatWithAggregatesFilter, { nullable: true }) + not?: NestedFloatWithAggregatesFilter; - @Field(() => NestedIntFilter, { nullable: true }) - _count?: NestedIntFilter; + @Field(() => NestedIntFilter, { nullable: true }) + _count?: NestedIntFilter; - @Field(() => NestedFloatFilter, { nullable: true }) - _avg?: NestedFloatFilter; + @Field(() => NestedFloatFilter, { nullable: true }) + _avg?: NestedFloatFilter; - @Field(() => NestedFloatFilter, { nullable: true }) - _sum?: NestedFloatFilter; + @Field(() => NestedFloatFilter, { nullable: true }) + _sum?: NestedFloatFilter; - @Field(() => NestedFloatFilter, { nullable: true }) - _min?: NestedFloatFilter; + @Field(() => NestedFloatFilter, { nullable: true }) + _min?: NestedFloatFilter; - @Field(() => NestedFloatFilter, { nullable: true }) - _max?: NestedFloatFilter; + @Field(() => NestedFloatFilter, { nullable: true }) + _max?: NestedFloatFilter; } diff --git a/@generated/prisma/int-field-update-operations.input.ts b/@generated/prisma/int-field-update-operations.input.ts index 931913c9..335ffa09 100644 --- a/@generated/prisma/int-field-update-operations.input.ts +++ b/@generated/prisma/int-field-update-operations.input.ts @@ -4,18 +4,18 @@ import { Int } from '@nestjs/graphql'; @InputType() export class IntFieldUpdateOperationsInput { - @Field(() => Int, { nullable: true }) - set?: number; + @Field(() => Int, { nullable: true }) + set?: number; - @Field(() => Int, { nullable: true }) - increment?: number; + @Field(() => Int, { nullable: true }) + increment?: number; - @Field(() => Int, { nullable: true }) - decrement?: number; + @Field(() => Int, { nullable: true }) + decrement?: number; - @Field(() => Int, { nullable: true }) - multiply?: number; + @Field(() => Int, { nullable: true }) + multiply?: number; - @Field(() => Int, { nullable: true }) - divide?: number; + @Field(() => Int, { nullable: true }) + divide?: number; } diff --git a/@generated/prisma/int-filter.input.ts b/@generated/prisma/int-filter.input.ts index f8955686..3ed50be5 100644 --- a/@generated/prisma/int-filter.input.ts +++ b/@generated/prisma/int-filter.input.ts @@ -5,27 +5,27 @@ import { NestedIntFilter } from './nested-int-filter.input'; @InputType() export class IntFilter { - @Field(() => Int, { nullable: true }) - equals?: number; + @Field(() => Int, { nullable: true }) + equals?: number; - @Field(() => [Int], { nullable: true }) - in?: Array; + @Field(() => [Int], { nullable: true }) + in?: Array; - @Field(() => [Int], { nullable: true }) - notIn?: Array; + @Field(() => [Int], { nullable: true }) + notIn?: Array; - @Field(() => Int, { nullable: true }) - lt?: number; + @Field(() => Int, { nullable: true }) + lt?: number; - @Field(() => Int, { nullable: true }) - lte?: number; + @Field(() => Int, { nullable: true }) + lte?: number; - @Field(() => Int, { nullable: true }) - gt?: number; + @Field(() => Int, { nullable: true }) + gt?: number; - @Field(() => Int, { nullable: true }) - gte?: number; + @Field(() => Int, { nullable: true }) + gte?: number; - @Field(() => NestedIntFilter, { nullable: true }) - not?: NestedIntFilter; + @Field(() => NestedIntFilter, { nullable: true }) + not?: NestedIntFilter; } diff --git a/@generated/prisma/int-nullable-filter.input.ts b/@generated/prisma/int-nullable-filter.input.ts index ba3f6ca2..07d6ecaa 100644 --- a/@generated/prisma/int-nullable-filter.input.ts +++ b/@generated/prisma/int-nullable-filter.input.ts @@ -5,27 +5,27 @@ import { NestedIntNullableFilter } from './nested-int-nullable-filter.input'; @InputType() export class IntNullableFilter { - @Field(() => Int, { nullable: true }) - equals?: number; + @Field(() => Int, { nullable: true }) + equals?: number; - @Field(() => [Int], { nullable: true }) - in?: Array; + @Field(() => [Int], { nullable: true }) + in?: Array; - @Field(() => [Int], { nullable: true }) - notIn?: Array; + @Field(() => [Int], { nullable: true }) + notIn?: Array; - @Field(() => Int, { nullable: true }) - lt?: number; + @Field(() => Int, { nullable: true }) + lt?: number; - @Field(() => Int, { nullable: true }) - lte?: number; + @Field(() => Int, { nullable: true }) + lte?: number; - @Field(() => Int, { nullable: true }) - gt?: number; + @Field(() => Int, { nullable: true }) + gt?: number; - @Field(() => Int, { nullable: true }) - gte?: number; + @Field(() => Int, { nullable: true }) + gte?: number; - @Field(() => NestedIntNullableFilter, { nullable: true }) - not?: NestedIntNullableFilter; + @Field(() => NestedIntNullableFilter, { nullable: true }) + not?: NestedIntNullableFilter; } diff --git a/@generated/prisma/int-nullable-with-aggregates-filter.input.ts b/@generated/prisma/int-nullable-with-aggregates-filter.input.ts index 6448d42e..577ec31c 100644 --- a/@generated/prisma/int-nullable-with-aggregates-filter.input.ts +++ b/@generated/prisma/int-nullable-with-aggregates-filter.input.ts @@ -7,42 +7,42 @@ import { NestedFloatNullableFilter } from './nested-float-nullable-filter.input' @InputType() export class IntNullableWithAggregatesFilter { - @Field(() => Int, { nullable: true }) - equals?: number; + @Field(() => Int, { nullable: true }) + equals?: number; - @Field(() => [Int], { nullable: true }) - in?: Array; + @Field(() => [Int], { nullable: true }) + in?: Array; - @Field(() => [Int], { nullable: true }) - notIn?: Array; + @Field(() => [Int], { nullable: true }) + notIn?: Array; - @Field(() => Int, { nullable: true }) - lt?: number; + @Field(() => Int, { nullable: true }) + lt?: number; - @Field(() => Int, { nullable: true }) - lte?: number; + @Field(() => Int, { nullable: true }) + lte?: number; - @Field(() => Int, { nullable: true }) - gt?: number; + @Field(() => Int, { nullable: true }) + gt?: number; - @Field(() => Int, { nullable: true }) - gte?: number; + @Field(() => Int, { nullable: true }) + gte?: number; - @Field(() => NestedIntNullableWithAggregatesFilter, { nullable: true }) - not?: NestedIntNullableWithAggregatesFilter; + @Field(() => NestedIntNullableWithAggregatesFilter, { nullable: true }) + not?: NestedIntNullableWithAggregatesFilter; - @Field(() => NestedIntNullableFilter, { nullable: true }) - _count?: NestedIntNullableFilter; + @Field(() => NestedIntNullableFilter, { nullable: true }) + _count?: NestedIntNullableFilter; - @Field(() => NestedFloatNullableFilter, { nullable: true }) - _avg?: NestedFloatNullableFilter; + @Field(() => NestedFloatNullableFilter, { nullable: true }) + _avg?: NestedFloatNullableFilter; - @Field(() => NestedIntNullableFilter, { nullable: true }) - _sum?: NestedIntNullableFilter; + @Field(() => NestedIntNullableFilter, { nullable: true }) + _sum?: NestedIntNullableFilter; - @Field(() => NestedIntNullableFilter, { nullable: true }) - _min?: NestedIntNullableFilter; + @Field(() => NestedIntNullableFilter, { nullable: true }) + _min?: NestedIntNullableFilter; - @Field(() => NestedIntNullableFilter, { nullable: true }) - _max?: NestedIntNullableFilter; + @Field(() => NestedIntNullableFilter, { nullable: true }) + _max?: NestedIntNullableFilter; } diff --git a/@generated/prisma/int-with-aggregates-filter.input.ts b/@generated/prisma/int-with-aggregates-filter.input.ts index 68e24a8f..38eedc82 100644 --- a/@generated/prisma/int-with-aggregates-filter.input.ts +++ b/@generated/prisma/int-with-aggregates-filter.input.ts @@ -7,42 +7,42 @@ import { NestedFloatFilter } from './nested-float-filter.input'; @InputType() export class IntWithAggregatesFilter { - @Field(() => Int, { nullable: true }) - equals?: number; + @Field(() => Int, { nullable: true }) + equals?: number; - @Field(() => [Int], { nullable: true }) - in?: Array; + @Field(() => [Int], { nullable: true }) + in?: Array; - @Field(() => [Int], { nullable: true }) - notIn?: Array; + @Field(() => [Int], { nullable: true }) + notIn?: Array; - @Field(() => Int, { nullable: true }) - lt?: number; + @Field(() => Int, { nullable: true }) + lt?: number; - @Field(() => Int, { nullable: true }) - lte?: number; + @Field(() => Int, { nullable: true }) + lte?: number; - @Field(() => Int, { nullable: true }) - gt?: number; + @Field(() => Int, { nullable: true }) + gt?: number; - @Field(() => Int, { nullable: true }) - gte?: number; + @Field(() => Int, { nullable: true }) + gte?: number; - @Field(() => NestedIntWithAggregatesFilter, { nullable: true }) - not?: NestedIntWithAggregatesFilter; + @Field(() => NestedIntWithAggregatesFilter, { nullable: true }) + not?: NestedIntWithAggregatesFilter; - @Field(() => NestedIntFilter, { nullable: true }) - _count?: NestedIntFilter; + @Field(() => NestedIntFilter, { nullable: true }) + _count?: NestedIntFilter; - @Field(() => NestedFloatFilter, { nullable: true }) - _avg?: NestedFloatFilter; + @Field(() => NestedFloatFilter, { nullable: true }) + _avg?: NestedFloatFilter; - @Field(() => NestedIntFilter, { nullable: true }) - _sum?: NestedIntFilter; + @Field(() => NestedIntFilter, { nullable: true }) + _sum?: NestedIntFilter; - @Field(() => NestedIntFilter, { nullable: true }) - _min?: NestedIntFilter; + @Field(() => NestedIntFilter, { nullable: true }) + _min?: NestedIntFilter; - @Field(() => NestedIntFilter, { nullable: true }) - _max?: NestedIntFilter; + @Field(() => NestedIntFilter, { nullable: true }) + _max?: NestedIntFilter; } diff --git a/@generated/prisma/json-null-value-filter.enum.ts b/@generated/prisma/json-null-value-filter.enum.ts index dd712a9c..eed4c588 100644 --- a/@generated/prisma/json-null-value-filter.enum.ts +++ b/@generated/prisma/json-null-value-filter.enum.ts @@ -1,12 +1,12 @@ import { registerEnumType } from '@nestjs/graphql'; export enum JsonNullValueFilter { - DbNull = 'DbNull', - JsonNull = 'JsonNull', - AnyNull = 'AnyNull', + DbNull = 'DbNull', + JsonNull = 'JsonNull', + AnyNull = 'AnyNull', } registerEnumType(JsonNullValueFilter, { - name: 'JsonNullValueFilter', - description: undefined, + name: 'JsonNullValueFilter', + description: undefined, }); diff --git a/@generated/prisma/json-nullable-filter.input.ts b/@generated/prisma/json-nullable-filter.input.ts index 4381074c..c74e589a 100644 --- a/@generated/prisma/json-nullable-filter.input.ts +++ b/@generated/prisma/json-nullable-filter.input.ts @@ -4,42 +4,42 @@ import { GraphQLJSON } from 'graphql-type-json'; @InputType() export class JsonNullableFilter { - @Field(() => GraphQLJSON, { nullable: true }) - equals?: any; + @Field(() => GraphQLJSON, { nullable: true }) + equals?: any; - @Field(() => [String], { nullable: true }) - path?: Array; + @Field(() => [String], { nullable: true }) + path?: Array; - @Field(() => String, { nullable: true }) - string_contains?: string; + @Field(() => String, { nullable: true }) + string_contains?: string; - @Field(() => String, { nullable: true }) - string_starts_with?: string; + @Field(() => String, { nullable: true }) + string_starts_with?: string; - @Field(() => String, { nullable: true }) - string_ends_with?: string; + @Field(() => String, { nullable: true }) + string_ends_with?: string; - @Field(() => GraphQLJSON, { nullable: true }) - array_contains?: any; + @Field(() => GraphQLJSON, { nullable: true }) + array_contains?: any; - @Field(() => GraphQLJSON, { nullable: true }) - array_starts_with?: any; + @Field(() => GraphQLJSON, { nullable: true }) + array_starts_with?: any; - @Field(() => GraphQLJSON, { nullable: true }) - array_ends_with?: any; + @Field(() => GraphQLJSON, { nullable: true }) + array_ends_with?: any; - @Field(() => GraphQLJSON, { nullable: true }) - lt?: any; + @Field(() => GraphQLJSON, { nullable: true }) + lt?: any; - @Field(() => GraphQLJSON, { nullable: true }) - lte?: any; + @Field(() => GraphQLJSON, { nullable: true }) + lte?: any; - @Field(() => GraphQLJSON, { nullable: true }) - gt?: any; + @Field(() => GraphQLJSON, { nullable: true }) + gt?: any; - @Field(() => GraphQLJSON, { nullable: true }) - gte?: any; + @Field(() => GraphQLJSON, { nullable: true }) + gte?: any; - @Field(() => GraphQLJSON, { nullable: true }) - not?: any; + @Field(() => GraphQLJSON, { nullable: true }) + not?: any; } diff --git a/@generated/prisma/json-nullable-with-aggregates-filter.input.ts b/@generated/prisma/json-nullable-with-aggregates-filter.input.ts index efd5c051..ee4da34a 100644 --- a/@generated/prisma/json-nullable-with-aggregates-filter.input.ts +++ b/@generated/prisma/json-nullable-with-aggregates-filter.input.ts @@ -6,51 +6,51 @@ import { NestedJsonNullableFilter } from './nested-json-nullable-filter.input'; @InputType() export class JsonNullableWithAggregatesFilter { - @Field(() => GraphQLJSON, { nullable: true }) - equals?: any; + @Field(() => GraphQLJSON, { nullable: true }) + equals?: any; - @Field(() => [String], { nullable: true }) - path?: Array; + @Field(() => [String], { nullable: true }) + path?: Array; - @Field(() => String, { nullable: true }) - string_contains?: string; + @Field(() => String, { nullable: true }) + string_contains?: string; - @Field(() => String, { nullable: true }) - string_starts_with?: string; + @Field(() => String, { nullable: true }) + string_starts_with?: string; - @Field(() => String, { nullable: true }) - string_ends_with?: string; + @Field(() => String, { nullable: true }) + string_ends_with?: string; - @Field(() => GraphQLJSON, { nullable: true }) - array_contains?: any; + @Field(() => GraphQLJSON, { nullable: true }) + array_contains?: any; - @Field(() => GraphQLJSON, { nullable: true }) - array_starts_with?: any; + @Field(() => GraphQLJSON, { nullable: true }) + array_starts_with?: any; - @Field(() => GraphQLJSON, { nullable: true }) - array_ends_with?: any; + @Field(() => GraphQLJSON, { nullable: true }) + array_ends_with?: any; - @Field(() => GraphQLJSON, { nullable: true }) - lt?: any; + @Field(() => GraphQLJSON, { nullable: true }) + lt?: any; - @Field(() => GraphQLJSON, { nullable: true }) - lte?: any; + @Field(() => GraphQLJSON, { nullable: true }) + lte?: any; - @Field(() => GraphQLJSON, { nullable: true }) - gt?: any; + @Field(() => GraphQLJSON, { nullable: true }) + gt?: any; - @Field(() => GraphQLJSON, { nullable: true }) - gte?: any; + @Field(() => GraphQLJSON, { nullable: true }) + gte?: any; - @Field(() => GraphQLJSON, { nullable: true }) - not?: any; + @Field(() => GraphQLJSON, { nullable: true }) + not?: any; - @Field(() => NestedIntNullableFilter, { nullable: true }) - _count?: NestedIntNullableFilter; + @Field(() => NestedIntNullableFilter, { nullable: true }) + _count?: NestedIntNullableFilter; - @Field(() => NestedJsonNullableFilter, { nullable: true }) - _min?: NestedJsonNullableFilter; + @Field(() => NestedJsonNullableFilter, { nullable: true }) + _min?: NestedJsonNullableFilter; - @Field(() => NestedJsonNullableFilter, { nullable: true }) - _max?: NestedJsonNullableFilter; + @Field(() => NestedJsonNullableFilter, { nullable: true }) + _max?: NestedJsonNullableFilter; } diff --git a/@generated/prisma/nested-big-int-nullable-filter.input.ts b/@generated/prisma/nested-big-int-nullable-filter.input.ts index 1724e399..471e7001 100644 --- a/@generated/prisma/nested-big-int-nullable-filter.input.ts +++ b/@generated/prisma/nested-big-int-nullable-filter.input.ts @@ -3,27 +3,27 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class NestedBigIntNullableFilter { - @Field(() => String, { nullable: true }) - equals?: bigint | number; + @Field(() => String, { nullable: true }) + equals?: bigint | number; - @Field(() => [String], { nullable: true }) - in?: Array | Array; + @Field(() => [String], { nullable: true }) + in?: Array | Array; - @Field(() => [String], { nullable: true }) - notIn?: Array | Array; + @Field(() => [String], { nullable: true }) + notIn?: Array | Array; - @Field(() => String, { nullable: true }) - lt?: bigint | number; + @Field(() => String, { nullable: true }) + lt?: bigint | number; - @Field(() => String, { nullable: true }) - lte?: bigint | number; + @Field(() => String, { nullable: true }) + lte?: bigint | number; - @Field(() => String, { nullable: true }) - gt?: bigint | number; + @Field(() => String, { nullable: true }) + gt?: bigint | number; - @Field(() => String, { nullable: true }) - gte?: bigint | number; + @Field(() => String, { nullable: true }) + gte?: bigint | number; - @Field(() => NestedBigIntNullableFilter, { nullable: true }) - not?: NestedBigIntNullableFilter; + @Field(() => NestedBigIntNullableFilter, { nullable: true }) + not?: NestedBigIntNullableFilter; } diff --git a/@generated/prisma/nested-big-int-nullable-with-aggregates-filter.input.ts b/@generated/prisma/nested-big-int-nullable-with-aggregates-filter.input.ts index 371852fe..bcc4accf 100644 --- a/@generated/prisma/nested-big-int-nullable-with-aggregates-filter.input.ts +++ b/@generated/prisma/nested-big-int-nullable-with-aggregates-filter.input.ts @@ -6,42 +6,42 @@ import { NestedBigIntNullableFilter } from './nested-big-int-nullable-filter.inp @InputType() export class NestedBigIntNullableWithAggregatesFilter { - @Field(() => String, { nullable: true }) - equals?: bigint | number; + @Field(() => String, { nullable: true }) + equals?: bigint | number; - @Field(() => [String], { nullable: true }) - in?: Array | Array; + @Field(() => [String], { nullable: true }) + in?: Array | Array; - @Field(() => [String], { nullable: true }) - notIn?: Array | Array; + @Field(() => [String], { nullable: true }) + notIn?: Array | Array; - @Field(() => String, { nullable: true }) - lt?: bigint | number; + @Field(() => String, { nullable: true }) + lt?: bigint | number; - @Field(() => String, { nullable: true }) - lte?: bigint | number; + @Field(() => String, { nullable: true }) + lte?: bigint | number; - @Field(() => String, { nullable: true }) - gt?: bigint | number; + @Field(() => String, { nullable: true }) + gt?: bigint | number; - @Field(() => String, { nullable: true }) - gte?: bigint | number; + @Field(() => String, { nullable: true }) + gte?: bigint | number; - @Field(() => NestedBigIntNullableWithAggregatesFilter, { nullable: true }) - not?: NestedBigIntNullableWithAggregatesFilter; + @Field(() => NestedBigIntNullableWithAggregatesFilter, { nullable: true }) + not?: NestedBigIntNullableWithAggregatesFilter; - @Field(() => NestedIntNullableFilter, { nullable: true }) - _count?: NestedIntNullableFilter; + @Field(() => NestedIntNullableFilter, { nullable: true }) + _count?: NestedIntNullableFilter; - @Field(() => NestedFloatNullableFilter, { nullable: true }) - _avg?: NestedFloatNullableFilter; + @Field(() => NestedFloatNullableFilter, { nullable: true }) + _avg?: NestedFloatNullableFilter; - @Field(() => NestedBigIntNullableFilter, { nullable: true }) - _sum?: NestedBigIntNullableFilter; + @Field(() => NestedBigIntNullableFilter, { nullable: true }) + _sum?: NestedBigIntNullableFilter; - @Field(() => NestedBigIntNullableFilter, { nullable: true }) - _min?: NestedBigIntNullableFilter; + @Field(() => NestedBigIntNullableFilter, { nullable: true }) + _min?: NestedBigIntNullableFilter; - @Field(() => NestedBigIntNullableFilter, { nullable: true }) - _max?: NestedBigIntNullableFilter; + @Field(() => NestedBigIntNullableFilter, { nullable: true }) + _max?: NestedBigIntNullableFilter; } diff --git a/@generated/prisma/nested-bool-nullable-filter.input.ts b/@generated/prisma/nested-bool-nullable-filter.input.ts index 05f685f9..0ab500d3 100644 --- a/@generated/prisma/nested-bool-nullable-filter.input.ts +++ b/@generated/prisma/nested-bool-nullable-filter.input.ts @@ -3,9 +3,9 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class NestedBoolNullableFilter { - @Field(() => Boolean, { nullable: true }) - equals?: boolean; + @Field(() => Boolean, { nullable: true }) + equals?: boolean; - @Field(() => NestedBoolNullableFilter, { nullable: true }) - not?: NestedBoolNullableFilter; + @Field(() => NestedBoolNullableFilter, { nullable: true }) + not?: NestedBoolNullableFilter; } diff --git a/@generated/prisma/nested-bool-nullable-with-aggregates-filter.input.ts b/@generated/prisma/nested-bool-nullable-with-aggregates-filter.input.ts index 1c37ade7..4a5b57fd 100644 --- a/@generated/prisma/nested-bool-nullable-with-aggregates-filter.input.ts +++ b/@generated/prisma/nested-bool-nullable-with-aggregates-filter.input.ts @@ -5,18 +5,18 @@ import { NestedBoolNullableFilter } from './nested-bool-nullable-filter.input'; @InputType() export class NestedBoolNullableWithAggregatesFilter { - @Field(() => Boolean, { nullable: true }) - equals?: boolean; + @Field(() => Boolean, { nullable: true }) + equals?: boolean; - @Field(() => NestedBoolNullableWithAggregatesFilter, { nullable: true }) - not?: NestedBoolNullableWithAggregatesFilter; + @Field(() => NestedBoolNullableWithAggregatesFilter, { nullable: true }) + not?: NestedBoolNullableWithAggregatesFilter; - @Field(() => NestedIntNullableFilter, { nullable: true }) - _count?: NestedIntNullableFilter; + @Field(() => NestedIntNullableFilter, { nullable: true }) + _count?: NestedIntNullableFilter; - @Field(() => NestedBoolNullableFilter, { nullable: true }) - _min?: NestedBoolNullableFilter; + @Field(() => NestedBoolNullableFilter, { nullable: true }) + _min?: NestedBoolNullableFilter; - @Field(() => NestedBoolNullableFilter, { nullable: true }) - _max?: NestedBoolNullableFilter; + @Field(() => NestedBoolNullableFilter, { nullable: true }) + _max?: NestedBoolNullableFilter; } diff --git a/@generated/prisma/nested-bytes-nullable-filter.input.ts b/@generated/prisma/nested-bytes-nullable-filter.input.ts index ebd6c769..3f1e8ea5 100644 --- a/@generated/prisma/nested-bytes-nullable-filter.input.ts +++ b/@generated/prisma/nested-bytes-nullable-filter.input.ts @@ -3,15 +3,15 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class NestedBytesNullableFilter { - @Field(() => String, { nullable: true }) - equals?: Buffer; + @Field(() => String, { nullable: true }) + equals?: Buffer; - @Field(() => [String], { nullable: true }) - in?: Array; + @Field(() => [String], { nullable: true }) + in?: Array; - @Field(() => [String], { nullable: true }) - notIn?: Array; + @Field(() => [String], { nullable: true }) + notIn?: Array; - @Field(() => NestedBytesNullableFilter, { nullable: true }) - not?: NestedBytesNullableFilter; + @Field(() => NestedBytesNullableFilter, { nullable: true }) + not?: NestedBytesNullableFilter; } diff --git a/@generated/prisma/nested-bytes-nullable-with-aggregates-filter.input.ts b/@generated/prisma/nested-bytes-nullable-with-aggregates-filter.input.ts index 2be26891..3aa30bdc 100644 --- a/@generated/prisma/nested-bytes-nullable-with-aggregates-filter.input.ts +++ b/@generated/prisma/nested-bytes-nullable-with-aggregates-filter.input.ts @@ -5,24 +5,24 @@ import { NestedBytesNullableFilter } from './nested-bytes-nullable-filter.input' @InputType() export class NestedBytesNullableWithAggregatesFilter { - @Field(() => String, { nullable: true }) - equals?: Buffer; + @Field(() => String, { nullable: true }) + equals?: Buffer; - @Field(() => [String], { nullable: true }) - in?: Array; + @Field(() => [String], { nullable: true }) + in?: Array; - @Field(() => [String], { nullable: true }) - notIn?: Array; + @Field(() => [String], { nullable: true }) + notIn?: Array; - @Field(() => NestedBytesNullableWithAggregatesFilter, { nullable: true }) - not?: NestedBytesNullableWithAggregatesFilter; + @Field(() => NestedBytesNullableWithAggregatesFilter, { nullable: true }) + not?: NestedBytesNullableWithAggregatesFilter; - @Field(() => NestedIntNullableFilter, { nullable: true }) - _count?: NestedIntNullableFilter; + @Field(() => NestedIntNullableFilter, { nullable: true }) + _count?: NestedIntNullableFilter; - @Field(() => NestedBytesNullableFilter, { nullable: true }) - _min?: NestedBytesNullableFilter; + @Field(() => NestedBytesNullableFilter, { nullable: true }) + _min?: NestedBytesNullableFilter; - @Field(() => NestedBytesNullableFilter, { nullable: true }) - _max?: NestedBytesNullableFilter; + @Field(() => NestedBytesNullableFilter, { nullable: true }) + _max?: NestedBytesNullableFilter; } diff --git a/@generated/prisma/nested-date-time-filter.input.ts b/@generated/prisma/nested-date-time-filter.input.ts index c6da8a14..5c230f18 100644 --- a/@generated/prisma/nested-date-time-filter.input.ts +++ b/@generated/prisma/nested-date-time-filter.input.ts @@ -3,27 +3,27 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class NestedDateTimeFilter { - @Field(() => Date, { nullable: true }) - equals?: Date | string; + @Field(() => Date, { nullable: true }) + equals?: Date | string; - @Field(() => [Date], { nullable: true }) - in?: Array | Array; + @Field(() => [Date], { nullable: true }) + in?: Array | Array; - @Field(() => [Date], { nullable: true }) - notIn?: Array | Array; + @Field(() => [Date], { nullable: true }) + notIn?: Array | Array; - @Field(() => Date, { nullable: true }) - lt?: Date | string; + @Field(() => Date, { nullable: true }) + lt?: Date | string; - @Field(() => Date, { nullable: true }) - lte?: Date | string; + @Field(() => Date, { nullable: true }) + lte?: Date | string; - @Field(() => Date, { nullable: true }) - gt?: Date | string; + @Field(() => Date, { nullable: true }) + gt?: Date | string; - @Field(() => Date, { nullable: true }) - gte?: Date | string; + @Field(() => Date, { nullable: true }) + gte?: Date | string; - @Field(() => NestedDateTimeFilter, { nullable: true }) - not?: NestedDateTimeFilter; + @Field(() => NestedDateTimeFilter, { nullable: true }) + not?: NestedDateTimeFilter; } diff --git a/@generated/prisma/nested-date-time-with-aggregates-filter.input.ts b/@generated/prisma/nested-date-time-with-aggregates-filter.input.ts index faeb0b36..5c884d81 100644 --- a/@generated/prisma/nested-date-time-with-aggregates-filter.input.ts +++ b/@generated/prisma/nested-date-time-with-aggregates-filter.input.ts @@ -5,36 +5,36 @@ import { NestedDateTimeFilter } from './nested-date-time-filter.input'; @InputType() export class NestedDateTimeWithAggregatesFilter { - @Field(() => Date, { nullable: true }) - equals?: Date | string; + @Field(() => Date, { nullable: true }) + equals?: Date | string; - @Field(() => [Date], { nullable: true }) - in?: Array | Array; + @Field(() => [Date], { nullable: true }) + in?: Array | Array; - @Field(() => [Date], { nullable: true }) - notIn?: Array | Array; + @Field(() => [Date], { nullable: true }) + notIn?: Array | Array; - @Field(() => Date, { nullable: true }) - lt?: Date | string; + @Field(() => Date, { nullable: true }) + lt?: Date | string; - @Field(() => Date, { nullable: true }) - lte?: Date | string; + @Field(() => Date, { nullable: true }) + lte?: Date | string; - @Field(() => Date, { nullable: true }) - gt?: Date | string; + @Field(() => Date, { nullable: true }) + gt?: Date | string; - @Field(() => Date, { nullable: true }) - gte?: Date | string; + @Field(() => Date, { nullable: true }) + gte?: Date | string; - @Field(() => NestedDateTimeWithAggregatesFilter, { nullable: true }) - not?: NestedDateTimeWithAggregatesFilter; + @Field(() => NestedDateTimeWithAggregatesFilter, { nullable: true }) + not?: NestedDateTimeWithAggregatesFilter; - @Field(() => NestedIntFilter, { nullable: true }) - _count?: NestedIntFilter; + @Field(() => NestedIntFilter, { nullable: true }) + _count?: NestedIntFilter; - @Field(() => NestedDateTimeFilter, { nullable: true }) - _min?: NestedDateTimeFilter; + @Field(() => NestedDateTimeFilter, { nullable: true }) + _min?: NestedDateTimeFilter; - @Field(() => NestedDateTimeFilter, { nullable: true }) - _max?: NestedDateTimeFilter; + @Field(() => NestedDateTimeFilter, { nullable: true }) + _max?: NestedDateTimeFilter; } diff --git a/@generated/prisma/nested-decimal-nullable-filter.input.ts b/@generated/prisma/nested-decimal-nullable-filter.input.ts index 524be2fc..291e722e 100644 --- a/@generated/prisma/nested-decimal-nullable-filter.input.ts +++ b/@generated/prisma/nested-decimal-nullable-filter.input.ts @@ -5,27 +5,27 @@ import { GraphQLDecimal } from 'prisma-graphql-type-decimal'; @InputType() export class NestedDecimalNullableFilter { - @Field(() => GraphQLDecimal, { nullable: true }) - equals?: Decimal; + @Field(() => GraphQLDecimal, { nullable: true }) + equals?: Decimal; - @Field(() => [GraphQLDecimal], { nullable: true }) - in?: Array; + @Field(() => [GraphQLDecimal], { nullable: true }) + in?: Array; - @Field(() => [GraphQLDecimal], { nullable: true }) - notIn?: Array; + @Field(() => [GraphQLDecimal], { nullable: true }) + notIn?: Array; - @Field(() => GraphQLDecimal, { nullable: true }) - lt?: Decimal; + @Field(() => GraphQLDecimal, { nullable: true }) + lt?: Decimal; - @Field(() => GraphQLDecimal, { nullable: true }) - lte?: Decimal; + @Field(() => GraphQLDecimal, { nullable: true }) + lte?: Decimal; - @Field(() => GraphQLDecimal, { nullable: true }) - gt?: Decimal; + @Field(() => GraphQLDecimal, { nullable: true }) + gt?: Decimal; - @Field(() => GraphQLDecimal, { nullable: true }) - gte?: Decimal; + @Field(() => GraphQLDecimal, { nullable: true }) + gte?: Decimal; - @Field(() => NestedDecimalNullableFilter, { nullable: true }) - not?: NestedDecimalNullableFilter; + @Field(() => NestedDecimalNullableFilter, { nullable: true }) + not?: NestedDecimalNullableFilter; } diff --git a/@generated/prisma/nested-decimal-nullable-with-aggregates-filter.input.ts b/@generated/prisma/nested-decimal-nullable-with-aggregates-filter.input.ts index cba85608..aee9a57e 100644 --- a/@generated/prisma/nested-decimal-nullable-with-aggregates-filter.input.ts +++ b/@generated/prisma/nested-decimal-nullable-with-aggregates-filter.input.ts @@ -7,42 +7,42 @@ import { NestedDecimalNullableFilter } from './nested-decimal-nullable-filter.in @InputType() export class NestedDecimalNullableWithAggregatesFilter { - @Field(() => GraphQLDecimal, { nullable: true }) - equals?: Decimal; + @Field(() => GraphQLDecimal, { nullable: true }) + equals?: Decimal; - @Field(() => [GraphQLDecimal], { nullable: true }) - in?: Array; + @Field(() => [GraphQLDecimal], { nullable: true }) + in?: Array; - @Field(() => [GraphQLDecimal], { nullable: true }) - notIn?: Array; + @Field(() => [GraphQLDecimal], { nullable: true }) + notIn?: Array; - @Field(() => GraphQLDecimal, { nullable: true }) - lt?: Decimal; + @Field(() => GraphQLDecimal, { nullable: true }) + lt?: Decimal; - @Field(() => GraphQLDecimal, { nullable: true }) - lte?: Decimal; + @Field(() => GraphQLDecimal, { nullable: true }) + lte?: Decimal; - @Field(() => GraphQLDecimal, { nullable: true }) - gt?: Decimal; + @Field(() => GraphQLDecimal, { nullable: true }) + gt?: Decimal; - @Field(() => GraphQLDecimal, { nullable: true }) - gte?: Decimal; + @Field(() => GraphQLDecimal, { nullable: true }) + gte?: Decimal; - @Field(() => NestedDecimalNullableWithAggregatesFilter, { nullable: true }) - not?: NestedDecimalNullableWithAggregatesFilter; + @Field(() => NestedDecimalNullableWithAggregatesFilter, { nullable: true }) + not?: NestedDecimalNullableWithAggregatesFilter; - @Field(() => NestedIntNullableFilter, { nullable: true }) - _count?: NestedIntNullableFilter; + @Field(() => NestedIntNullableFilter, { nullable: true }) + _count?: NestedIntNullableFilter; - @Field(() => NestedDecimalNullableFilter, { nullable: true }) - _avg?: NestedDecimalNullableFilter; + @Field(() => NestedDecimalNullableFilter, { nullable: true }) + _avg?: NestedDecimalNullableFilter; - @Field(() => NestedDecimalNullableFilter, { nullable: true }) - _sum?: NestedDecimalNullableFilter; + @Field(() => NestedDecimalNullableFilter, { nullable: true }) + _sum?: NestedDecimalNullableFilter; - @Field(() => NestedDecimalNullableFilter, { nullable: true }) - _min?: NestedDecimalNullableFilter; + @Field(() => NestedDecimalNullableFilter, { nullable: true }) + _min?: NestedDecimalNullableFilter; - @Field(() => NestedDecimalNullableFilter, { nullable: true }) - _max?: NestedDecimalNullableFilter; + @Field(() => NestedDecimalNullableFilter, { nullable: true }) + _max?: NestedDecimalNullableFilter; } diff --git a/@generated/prisma/nested-enum-role-nullable-filter.input.ts b/@generated/prisma/nested-enum-role-nullable-filter.input.ts index ae3acef5..183b9790 100644 --- a/@generated/prisma/nested-enum-role-nullable-filter.input.ts +++ b/@generated/prisma/nested-enum-role-nullable-filter.input.ts @@ -4,15 +4,15 @@ import { Role } from './role.enum'; @InputType() export class NestedEnumRoleNullableFilter { - @Field(() => Role, { nullable: true }) - equals?: keyof typeof Role; + @Field(() => Role, { nullable: true }) + equals?: keyof typeof Role; - @Field(() => [Role], { nullable: true }) - in?: Array; + @Field(() => [Role], { nullable: true }) + in?: Array; - @Field(() => [Role], { nullable: true }) - notIn?: Array; + @Field(() => [Role], { nullable: true }) + notIn?: Array; - @Field(() => NestedEnumRoleNullableFilter, { nullable: true }) - not?: NestedEnumRoleNullableFilter; + @Field(() => NestedEnumRoleNullableFilter, { nullable: true }) + not?: NestedEnumRoleNullableFilter; } diff --git a/@generated/prisma/nested-enum-role-nullable-with-aggregates-filter.input.ts b/@generated/prisma/nested-enum-role-nullable-with-aggregates-filter.input.ts index 26399a87..fdc95423 100644 --- a/@generated/prisma/nested-enum-role-nullable-with-aggregates-filter.input.ts +++ b/@generated/prisma/nested-enum-role-nullable-with-aggregates-filter.input.ts @@ -6,24 +6,24 @@ import { NestedEnumRoleNullableFilter } from './nested-enum-role-nullable-filter @InputType() export class NestedEnumRoleNullableWithAggregatesFilter { - @Field(() => Role, { nullable: true }) - equals?: keyof typeof Role; + @Field(() => Role, { nullable: true }) + equals?: keyof typeof Role; - @Field(() => [Role], { nullable: true }) - in?: Array; + @Field(() => [Role], { nullable: true }) + in?: Array; - @Field(() => [Role], { nullable: true }) - notIn?: Array; + @Field(() => [Role], { nullable: true }) + notIn?: Array; - @Field(() => NestedEnumRoleNullableWithAggregatesFilter, { nullable: true }) - not?: NestedEnumRoleNullableWithAggregatesFilter; + @Field(() => NestedEnumRoleNullableWithAggregatesFilter, { nullable: true }) + not?: NestedEnumRoleNullableWithAggregatesFilter; - @Field(() => NestedIntNullableFilter, { nullable: true }) - _count?: NestedIntNullableFilter; + @Field(() => NestedIntNullableFilter, { nullable: true }) + _count?: NestedIntNullableFilter; - @Field(() => NestedEnumRoleNullableFilter, { nullable: true }) - _min?: NestedEnumRoleNullableFilter; + @Field(() => NestedEnumRoleNullableFilter, { nullable: true }) + _min?: NestedEnumRoleNullableFilter; - @Field(() => NestedEnumRoleNullableFilter, { nullable: true }) - _max?: NestedEnumRoleNullableFilter; + @Field(() => NestedEnumRoleNullableFilter, { nullable: true }) + _max?: NestedEnumRoleNullableFilter; } diff --git a/@generated/prisma/nested-float-filter.input.ts b/@generated/prisma/nested-float-filter.input.ts index e92d1b23..bfd27037 100644 --- a/@generated/prisma/nested-float-filter.input.ts +++ b/@generated/prisma/nested-float-filter.input.ts @@ -4,27 +4,27 @@ import { Float } from '@nestjs/graphql'; @InputType() export class NestedFloatFilter { - @Field(() => Float, { nullable: true }) - equals?: number; + @Field(() => Float, { nullable: true }) + equals?: number; - @Field(() => [Float], { nullable: true }) - in?: Array; + @Field(() => [Float], { nullable: true }) + in?: Array; - @Field(() => [Float], { nullable: true }) - notIn?: Array; + @Field(() => [Float], { nullable: true }) + notIn?: Array; - @Field(() => Float, { nullable: true }) - lt?: number; + @Field(() => Float, { nullable: true }) + lt?: number; - @Field(() => Float, { nullable: true }) - lte?: number; + @Field(() => Float, { nullable: true }) + lte?: number; - @Field(() => Float, { nullable: true }) - gt?: number; + @Field(() => Float, { nullable: true }) + gt?: number; - @Field(() => Float, { nullable: true }) - gte?: number; + @Field(() => Float, { nullable: true }) + gte?: number; - @Field(() => NestedFloatFilter, { nullable: true }) - not?: NestedFloatFilter; + @Field(() => NestedFloatFilter, { nullable: true }) + not?: NestedFloatFilter; } diff --git a/@generated/prisma/nested-float-nullable-filter.input.ts b/@generated/prisma/nested-float-nullable-filter.input.ts index e9b09d1f..4855249d 100644 --- a/@generated/prisma/nested-float-nullable-filter.input.ts +++ b/@generated/prisma/nested-float-nullable-filter.input.ts @@ -4,27 +4,27 @@ import { Float } from '@nestjs/graphql'; @InputType() export class NestedFloatNullableFilter { - @Field(() => Float, { nullable: true }) - equals?: number; + @Field(() => Float, { nullable: true }) + equals?: number; - @Field(() => [Float], { nullable: true }) - in?: Array; + @Field(() => [Float], { nullable: true }) + in?: Array; - @Field(() => [Float], { nullable: true }) - notIn?: Array; + @Field(() => [Float], { nullable: true }) + notIn?: Array; - @Field(() => Float, { nullable: true }) - lt?: number; + @Field(() => Float, { nullable: true }) + lt?: number; - @Field(() => Float, { nullable: true }) - lte?: number; + @Field(() => Float, { nullable: true }) + lte?: number; - @Field(() => Float, { nullable: true }) - gt?: number; + @Field(() => Float, { nullable: true }) + gt?: number; - @Field(() => Float, { nullable: true }) - gte?: number; + @Field(() => Float, { nullable: true }) + gte?: number; - @Field(() => NestedFloatNullableFilter, { nullable: true }) - not?: NestedFloatNullableFilter; + @Field(() => NestedFloatNullableFilter, { nullable: true }) + not?: NestedFloatNullableFilter; } diff --git a/@generated/prisma/nested-float-nullable-with-aggregates-filter.input.ts b/@generated/prisma/nested-float-nullable-with-aggregates-filter.input.ts index 9be683b7..1477e4b6 100644 --- a/@generated/prisma/nested-float-nullable-with-aggregates-filter.input.ts +++ b/@generated/prisma/nested-float-nullable-with-aggregates-filter.input.ts @@ -6,42 +6,42 @@ import { NestedFloatNullableFilter } from './nested-float-nullable-filter.input' @InputType() export class NestedFloatNullableWithAggregatesFilter { - @Field(() => Float, { nullable: true }) - equals?: number; + @Field(() => Float, { nullable: true }) + equals?: number; - @Field(() => [Float], { nullable: true }) - in?: Array; + @Field(() => [Float], { nullable: true }) + in?: Array; - @Field(() => [Float], { nullable: true }) - notIn?: Array; + @Field(() => [Float], { nullable: true }) + notIn?: Array; - @Field(() => Float, { nullable: true }) - lt?: number; + @Field(() => Float, { nullable: true }) + lt?: number; - @Field(() => Float, { nullable: true }) - lte?: number; + @Field(() => Float, { nullable: true }) + lte?: number; - @Field(() => Float, { nullable: true }) - gt?: number; + @Field(() => Float, { nullable: true }) + gt?: number; - @Field(() => Float, { nullable: true }) - gte?: number; + @Field(() => Float, { nullable: true }) + gte?: number; - @Field(() => NestedFloatNullableWithAggregatesFilter, { nullable: true }) - not?: NestedFloatNullableWithAggregatesFilter; + @Field(() => NestedFloatNullableWithAggregatesFilter, { nullable: true }) + not?: NestedFloatNullableWithAggregatesFilter; - @Field(() => NestedIntNullableFilter, { nullable: true }) - _count?: NestedIntNullableFilter; + @Field(() => NestedIntNullableFilter, { nullable: true }) + _count?: NestedIntNullableFilter; - @Field(() => NestedFloatNullableFilter, { nullable: true }) - _avg?: NestedFloatNullableFilter; + @Field(() => NestedFloatNullableFilter, { nullable: true }) + _avg?: NestedFloatNullableFilter; - @Field(() => NestedFloatNullableFilter, { nullable: true }) - _sum?: NestedFloatNullableFilter; + @Field(() => NestedFloatNullableFilter, { nullable: true }) + _sum?: NestedFloatNullableFilter; - @Field(() => NestedFloatNullableFilter, { nullable: true }) - _min?: NestedFloatNullableFilter; + @Field(() => NestedFloatNullableFilter, { nullable: true }) + _min?: NestedFloatNullableFilter; - @Field(() => NestedFloatNullableFilter, { nullable: true }) - _max?: NestedFloatNullableFilter; + @Field(() => NestedFloatNullableFilter, { nullable: true }) + _max?: NestedFloatNullableFilter; } diff --git a/@generated/prisma/nested-float-with-aggregates-filter.input.ts b/@generated/prisma/nested-float-with-aggregates-filter.input.ts index 363ccf0b..b40a975c 100644 --- a/@generated/prisma/nested-float-with-aggregates-filter.input.ts +++ b/@generated/prisma/nested-float-with-aggregates-filter.input.ts @@ -6,42 +6,42 @@ import { NestedFloatFilter } from './nested-float-filter.input'; @InputType() export class NestedFloatWithAggregatesFilter { - @Field(() => Float, { nullable: true }) - equals?: number; + @Field(() => Float, { nullable: true }) + equals?: number; - @Field(() => [Float], { nullable: true }) - in?: Array; + @Field(() => [Float], { nullable: true }) + in?: Array; - @Field(() => [Float], { nullable: true }) - notIn?: Array; + @Field(() => [Float], { nullable: true }) + notIn?: Array; - @Field(() => Float, { nullable: true }) - lt?: number; + @Field(() => Float, { nullable: true }) + lt?: number; - @Field(() => Float, { nullable: true }) - lte?: number; + @Field(() => Float, { nullable: true }) + lte?: number; - @Field(() => Float, { nullable: true }) - gt?: number; + @Field(() => Float, { nullable: true }) + gt?: number; - @Field(() => Float, { nullable: true }) - gte?: number; + @Field(() => Float, { nullable: true }) + gte?: number; - @Field(() => NestedFloatWithAggregatesFilter, { nullable: true }) - not?: NestedFloatWithAggregatesFilter; + @Field(() => NestedFloatWithAggregatesFilter, { nullable: true }) + not?: NestedFloatWithAggregatesFilter; - @Field(() => NestedIntFilter, { nullable: true }) - _count?: NestedIntFilter; + @Field(() => NestedIntFilter, { nullable: true }) + _count?: NestedIntFilter; - @Field(() => NestedFloatFilter, { nullable: true }) - _avg?: NestedFloatFilter; + @Field(() => NestedFloatFilter, { nullable: true }) + _avg?: NestedFloatFilter; - @Field(() => NestedFloatFilter, { nullable: true }) - _sum?: NestedFloatFilter; + @Field(() => NestedFloatFilter, { nullable: true }) + _sum?: NestedFloatFilter; - @Field(() => NestedFloatFilter, { nullable: true }) - _min?: NestedFloatFilter; + @Field(() => NestedFloatFilter, { nullable: true }) + _min?: NestedFloatFilter; - @Field(() => NestedFloatFilter, { nullable: true }) - _max?: NestedFloatFilter; + @Field(() => NestedFloatFilter, { nullable: true }) + _max?: NestedFloatFilter; } diff --git a/@generated/prisma/nested-int-filter.input.ts b/@generated/prisma/nested-int-filter.input.ts index 9833d0a3..f5087245 100644 --- a/@generated/prisma/nested-int-filter.input.ts +++ b/@generated/prisma/nested-int-filter.input.ts @@ -4,27 +4,27 @@ import { Int } from '@nestjs/graphql'; @InputType() export class NestedIntFilter { - @Field(() => Int, { nullable: true }) - equals?: number; + @Field(() => Int, { nullable: true }) + equals?: number; - @Field(() => [Int], { nullable: true }) - in?: Array; + @Field(() => [Int], { nullable: true }) + in?: Array; - @Field(() => [Int], { nullable: true }) - notIn?: Array; + @Field(() => [Int], { nullable: true }) + notIn?: Array; - @Field(() => Int, { nullable: true }) - lt?: number; + @Field(() => Int, { nullable: true }) + lt?: number; - @Field(() => Int, { nullable: true }) - lte?: number; + @Field(() => Int, { nullable: true }) + lte?: number; - @Field(() => Int, { nullable: true }) - gt?: number; + @Field(() => Int, { nullable: true }) + gt?: number; - @Field(() => Int, { nullable: true }) - gte?: number; + @Field(() => Int, { nullable: true }) + gte?: number; - @Field(() => NestedIntFilter, { nullable: true }) - not?: NestedIntFilter; + @Field(() => NestedIntFilter, { nullable: true }) + not?: NestedIntFilter; } diff --git a/@generated/prisma/nested-int-nullable-filter.input.ts b/@generated/prisma/nested-int-nullable-filter.input.ts index e5b569fb..6e443105 100644 --- a/@generated/prisma/nested-int-nullable-filter.input.ts +++ b/@generated/prisma/nested-int-nullable-filter.input.ts @@ -4,27 +4,27 @@ import { Int } from '@nestjs/graphql'; @InputType() export class NestedIntNullableFilter { - @Field(() => Int, { nullable: true }) - equals?: number; + @Field(() => Int, { nullable: true }) + equals?: number; - @Field(() => [Int], { nullable: true }) - in?: Array; + @Field(() => [Int], { nullable: true }) + in?: Array; - @Field(() => [Int], { nullable: true }) - notIn?: Array; + @Field(() => [Int], { nullable: true }) + notIn?: Array; - @Field(() => Int, { nullable: true }) - lt?: number; + @Field(() => Int, { nullable: true }) + lt?: number; - @Field(() => Int, { nullable: true }) - lte?: number; + @Field(() => Int, { nullable: true }) + lte?: number; - @Field(() => Int, { nullable: true }) - gt?: number; + @Field(() => Int, { nullable: true }) + gt?: number; - @Field(() => Int, { nullable: true }) - gte?: number; + @Field(() => Int, { nullable: true }) + gte?: number; - @Field(() => NestedIntNullableFilter, { nullable: true }) - not?: NestedIntNullableFilter; + @Field(() => NestedIntNullableFilter, { nullable: true }) + not?: NestedIntNullableFilter; } diff --git a/@generated/prisma/nested-int-nullable-with-aggregates-filter.input.ts b/@generated/prisma/nested-int-nullable-with-aggregates-filter.input.ts index 4ae03b1a..78e6297a 100644 --- a/@generated/prisma/nested-int-nullable-with-aggregates-filter.input.ts +++ b/@generated/prisma/nested-int-nullable-with-aggregates-filter.input.ts @@ -6,42 +6,42 @@ import { NestedFloatNullableFilter } from './nested-float-nullable-filter.input' @InputType() export class NestedIntNullableWithAggregatesFilter { - @Field(() => Int, { nullable: true }) - equals?: number; + @Field(() => Int, { nullable: true }) + equals?: number; - @Field(() => [Int], { nullable: true }) - in?: Array; + @Field(() => [Int], { nullable: true }) + in?: Array; - @Field(() => [Int], { nullable: true }) - notIn?: Array; + @Field(() => [Int], { nullable: true }) + notIn?: Array; - @Field(() => Int, { nullable: true }) - lt?: number; + @Field(() => Int, { nullable: true }) + lt?: number; - @Field(() => Int, { nullable: true }) - lte?: number; + @Field(() => Int, { nullable: true }) + lte?: number; - @Field(() => Int, { nullable: true }) - gt?: number; + @Field(() => Int, { nullable: true }) + gt?: number; - @Field(() => Int, { nullable: true }) - gte?: number; + @Field(() => Int, { nullable: true }) + gte?: number; - @Field(() => NestedIntNullableWithAggregatesFilter, { nullable: true }) - not?: NestedIntNullableWithAggregatesFilter; + @Field(() => NestedIntNullableWithAggregatesFilter, { nullable: true }) + not?: NestedIntNullableWithAggregatesFilter; - @Field(() => NestedIntNullableFilter, { nullable: true }) - _count?: NestedIntNullableFilter; + @Field(() => NestedIntNullableFilter, { nullable: true }) + _count?: NestedIntNullableFilter; - @Field(() => NestedFloatNullableFilter, { nullable: true }) - _avg?: NestedFloatNullableFilter; + @Field(() => NestedFloatNullableFilter, { nullable: true }) + _avg?: NestedFloatNullableFilter; - @Field(() => NestedIntNullableFilter, { nullable: true }) - _sum?: NestedIntNullableFilter; + @Field(() => NestedIntNullableFilter, { nullable: true }) + _sum?: NestedIntNullableFilter; - @Field(() => NestedIntNullableFilter, { nullable: true }) - _min?: NestedIntNullableFilter; + @Field(() => NestedIntNullableFilter, { nullable: true }) + _min?: NestedIntNullableFilter; - @Field(() => NestedIntNullableFilter, { nullable: true }) - _max?: NestedIntNullableFilter; + @Field(() => NestedIntNullableFilter, { nullable: true }) + _max?: NestedIntNullableFilter; } diff --git a/@generated/prisma/nested-int-with-aggregates-filter.input.ts b/@generated/prisma/nested-int-with-aggregates-filter.input.ts index 9046dbbb..65dbc1ee 100644 --- a/@generated/prisma/nested-int-with-aggregates-filter.input.ts +++ b/@generated/prisma/nested-int-with-aggregates-filter.input.ts @@ -6,42 +6,42 @@ import { NestedFloatFilter } from './nested-float-filter.input'; @InputType() export class NestedIntWithAggregatesFilter { - @Field(() => Int, { nullable: true }) - equals?: number; + @Field(() => Int, { nullable: true }) + equals?: number; - @Field(() => [Int], { nullable: true }) - in?: Array; + @Field(() => [Int], { nullable: true }) + in?: Array; - @Field(() => [Int], { nullable: true }) - notIn?: Array; + @Field(() => [Int], { nullable: true }) + notIn?: Array; - @Field(() => Int, { nullable: true }) - lt?: number; + @Field(() => Int, { nullable: true }) + lt?: number; - @Field(() => Int, { nullable: true }) - lte?: number; + @Field(() => Int, { nullable: true }) + lte?: number; - @Field(() => Int, { nullable: true }) - gt?: number; + @Field(() => Int, { nullable: true }) + gt?: number; - @Field(() => Int, { nullable: true }) - gte?: number; + @Field(() => Int, { nullable: true }) + gte?: number; - @Field(() => NestedIntWithAggregatesFilter, { nullable: true }) - not?: NestedIntWithAggregatesFilter; + @Field(() => NestedIntWithAggregatesFilter, { nullable: true }) + not?: NestedIntWithAggregatesFilter; - @Field(() => NestedIntFilter, { nullable: true }) - _count?: NestedIntFilter; + @Field(() => NestedIntFilter, { nullable: true }) + _count?: NestedIntFilter; - @Field(() => NestedFloatFilter, { nullable: true }) - _avg?: NestedFloatFilter; + @Field(() => NestedFloatFilter, { nullable: true }) + _avg?: NestedFloatFilter; - @Field(() => NestedIntFilter, { nullable: true }) - _sum?: NestedIntFilter; + @Field(() => NestedIntFilter, { nullable: true }) + _sum?: NestedIntFilter; - @Field(() => NestedIntFilter, { nullable: true }) - _min?: NestedIntFilter; + @Field(() => NestedIntFilter, { nullable: true }) + _min?: NestedIntFilter; - @Field(() => NestedIntFilter, { nullable: true }) - _max?: NestedIntFilter; + @Field(() => NestedIntFilter, { nullable: true }) + _max?: NestedIntFilter; } diff --git a/@generated/prisma/nested-json-nullable-filter.input.ts b/@generated/prisma/nested-json-nullable-filter.input.ts index 4d232bb7..d7ad6e79 100644 --- a/@generated/prisma/nested-json-nullable-filter.input.ts +++ b/@generated/prisma/nested-json-nullable-filter.input.ts @@ -4,42 +4,42 @@ import { GraphQLJSON } from 'graphql-type-json'; @InputType() export class NestedJsonNullableFilter { - @Field(() => GraphQLJSON, { nullable: true }) - equals?: any; + @Field(() => GraphQLJSON, { nullable: true }) + equals?: any; - @Field(() => [String], { nullable: true }) - path?: Array; + @Field(() => [String], { nullable: true }) + path?: Array; - @Field(() => String, { nullable: true }) - string_contains?: string; + @Field(() => String, { nullable: true }) + string_contains?: string; - @Field(() => String, { nullable: true }) - string_starts_with?: string; + @Field(() => String, { nullable: true }) + string_starts_with?: string; - @Field(() => String, { nullable: true }) - string_ends_with?: string; + @Field(() => String, { nullable: true }) + string_ends_with?: string; - @Field(() => GraphQLJSON, { nullable: true }) - array_contains?: any; + @Field(() => GraphQLJSON, { nullable: true }) + array_contains?: any; - @Field(() => GraphQLJSON, { nullable: true }) - array_starts_with?: any; + @Field(() => GraphQLJSON, { nullable: true }) + array_starts_with?: any; - @Field(() => GraphQLJSON, { nullable: true }) - array_ends_with?: any; + @Field(() => GraphQLJSON, { nullable: true }) + array_ends_with?: any; - @Field(() => GraphQLJSON, { nullable: true }) - lt?: any; + @Field(() => GraphQLJSON, { nullable: true }) + lt?: any; - @Field(() => GraphQLJSON, { nullable: true }) - lte?: any; + @Field(() => GraphQLJSON, { nullable: true }) + lte?: any; - @Field(() => GraphQLJSON, { nullable: true }) - gt?: any; + @Field(() => GraphQLJSON, { nullable: true }) + gt?: any; - @Field(() => GraphQLJSON, { nullable: true }) - gte?: any; + @Field(() => GraphQLJSON, { nullable: true }) + gte?: any; - @Field(() => GraphQLJSON, { nullable: true }) - not?: any; + @Field(() => GraphQLJSON, { nullable: true }) + not?: any; } diff --git a/@generated/prisma/nested-string-filter.input.ts b/@generated/prisma/nested-string-filter.input.ts index f44484c7..3354bb01 100644 --- a/@generated/prisma/nested-string-filter.input.ts +++ b/@generated/prisma/nested-string-filter.input.ts @@ -3,39 +3,39 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class NestedStringFilter { - @Field(() => String, { nullable: true }) - equals?: string; + @Field(() => String, { nullable: true }) + equals?: string; - @Field(() => [String], { nullable: true }) - in?: Array; + @Field(() => [String], { nullable: true }) + in?: Array; - @Field(() => [String], { nullable: true }) - notIn?: Array; + @Field(() => [String], { nullable: true }) + notIn?: Array; - @Field(() => String, { nullable: true }) - lt?: string; + @Field(() => String, { nullable: true }) + lt?: string; - @Field(() => String, { nullable: true }) - lte?: string; + @Field(() => String, { nullable: true }) + lte?: string; - @Field(() => String, { nullable: true }) - gt?: string; + @Field(() => String, { nullable: true }) + gt?: string; - @Field(() => String, { nullable: true }) - gte?: string; + @Field(() => String, { nullable: true }) + gte?: string; - @Field(() => String, { nullable: true }) - contains?: string; + @Field(() => String, { nullable: true }) + contains?: string; - @Field(() => String, { nullable: true }) - startsWith?: string; + @Field(() => String, { nullable: true }) + startsWith?: string; - @Field(() => String, { nullable: true }) - endsWith?: string; + @Field(() => String, { nullable: true }) + endsWith?: string; - @Field(() => String, { nullable: true }) - search?: string; + @Field(() => String, { nullable: true }) + search?: string; - @Field(() => NestedStringFilter, { nullable: true }) - not?: NestedStringFilter; + @Field(() => NestedStringFilter, { nullable: true }) + not?: NestedStringFilter; } diff --git a/@generated/prisma/nested-string-nullable-filter.input.ts b/@generated/prisma/nested-string-nullable-filter.input.ts index 219c521b..7d0b1e59 100644 --- a/@generated/prisma/nested-string-nullable-filter.input.ts +++ b/@generated/prisma/nested-string-nullable-filter.input.ts @@ -3,39 +3,39 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class NestedStringNullableFilter { - @Field(() => String, { nullable: true }) - equals?: string; + @Field(() => String, { nullable: true }) + equals?: string; - @Field(() => [String], { nullable: true }) - in?: Array; + @Field(() => [String], { nullable: true }) + in?: Array; - @Field(() => [String], { nullable: true }) - notIn?: Array; + @Field(() => [String], { nullable: true }) + notIn?: Array; - @Field(() => String, { nullable: true }) - lt?: string; + @Field(() => String, { nullable: true }) + lt?: string; - @Field(() => String, { nullable: true }) - lte?: string; + @Field(() => String, { nullable: true }) + lte?: string; - @Field(() => String, { nullable: true }) - gt?: string; + @Field(() => String, { nullable: true }) + gt?: string; - @Field(() => String, { nullable: true }) - gte?: string; + @Field(() => String, { nullable: true }) + gte?: string; - @Field(() => String, { nullable: true }) - contains?: string; + @Field(() => String, { nullable: true }) + contains?: string; - @Field(() => String, { nullable: true }) - startsWith?: string; + @Field(() => String, { nullable: true }) + startsWith?: string; - @Field(() => String, { nullable: true }) - endsWith?: string; + @Field(() => String, { nullable: true }) + endsWith?: string; - @Field(() => String, { nullable: true }) - search?: string; + @Field(() => String, { nullable: true }) + search?: string; - @Field(() => NestedStringNullableFilter, { nullable: true }) - not?: NestedStringNullableFilter; + @Field(() => NestedStringNullableFilter, { nullable: true }) + not?: NestedStringNullableFilter; } diff --git a/@generated/prisma/nested-string-nullable-with-aggregates-filter.input.ts b/@generated/prisma/nested-string-nullable-with-aggregates-filter.input.ts index 20fdcc08..f4200aa6 100644 --- a/@generated/prisma/nested-string-nullable-with-aggregates-filter.input.ts +++ b/@generated/prisma/nested-string-nullable-with-aggregates-filter.input.ts @@ -5,48 +5,48 @@ import { NestedStringNullableFilter } from './nested-string-nullable-filter.inpu @InputType() export class NestedStringNullableWithAggregatesFilter { - @Field(() => String, { nullable: true }) - equals?: string; + @Field(() => String, { nullable: true }) + equals?: string; - @Field(() => [String], { nullable: true }) - in?: Array; + @Field(() => [String], { nullable: true }) + in?: Array; - @Field(() => [String], { nullable: true }) - notIn?: Array; + @Field(() => [String], { nullable: true }) + notIn?: Array; - @Field(() => String, { nullable: true }) - lt?: string; + @Field(() => String, { nullable: true }) + lt?: string; - @Field(() => String, { nullable: true }) - lte?: string; + @Field(() => String, { nullable: true }) + lte?: string; - @Field(() => String, { nullable: true }) - gt?: string; + @Field(() => String, { nullable: true }) + gt?: string; - @Field(() => String, { nullable: true }) - gte?: string; + @Field(() => String, { nullable: true }) + gte?: string; - @Field(() => String, { nullable: true }) - contains?: string; + @Field(() => String, { nullable: true }) + contains?: string; - @Field(() => String, { nullable: true }) - startsWith?: string; + @Field(() => String, { nullable: true }) + startsWith?: string; - @Field(() => String, { nullable: true }) - endsWith?: string; + @Field(() => String, { nullable: true }) + endsWith?: string; - @Field(() => String, { nullable: true }) - search?: string; + @Field(() => String, { nullable: true }) + search?: string; - @Field(() => NestedStringNullableWithAggregatesFilter, { nullable: true }) - not?: NestedStringNullableWithAggregatesFilter; + @Field(() => NestedStringNullableWithAggregatesFilter, { nullable: true }) + not?: NestedStringNullableWithAggregatesFilter; - @Field(() => NestedIntNullableFilter, { nullable: true }) - _count?: NestedIntNullableFilter; + @Field(() => NestedIntNullableFilter, { nullable: true }) + _count?: NestedIntNullableFilter; - @Field(() => NestedStringNullableFilter, { nullable: true }) - _min?: NestedStringNullableFilter; + @Field(() => NestedStringNullableFilter, { nullable: true }) + _min?: NestedStringNullableFilter; - @Field(() => NestedStringNullableFilter, { nullable: true }) - _max?: NestedStringNullableFilter; + @Field(() => NestedStringNullableFilter, { nullable: true }) + _max?: NestedStringNullableFilter; } diff --git a/@generated/prisma/nested-string-with-aggregates-filter.input.ts b/@generated/prisma/nested-string-with-aggregates-filter.input.ts index cab14bc3..06d9a17f 100644 --- a/@generated/prisma/nested-string-with-aggregates-filter.input.ts +++ b/@generated/prisma/nested-string-with-aggregates-filter.input.ts @@ -5,48 +5,48 @@ import { NestedStringFilter } from './nested-string-filter.input'; @InputType() export class NestedStringWithAggregatesFilter { - @Field(() => String, { nullable: true }) - equals?: string; + @Field(() => String, { nullable: true }) + equals?: string; - @Field(() => [String], { nullable: true }) - in?: Array; + @Field(() => [String], { nullable: true }) + in?: Array; - @Field(() => [String], { nullable: true }) - notIn?: Array; + @Field(() => [String], { nullable: true }) + notIn?: Array; - @Field(() => String, { nullable: true }) - lt?: string; + @Field(() => String, { nullable: true }) + lt?: string; - @Field(() => String, { nullable: true }) - lte?: string; + @Field(() => String, { nullable: true }) + lte?: string; - @Field(() => String, { nullable: true }) - gt?: string; + @Field(() => String, { nullable: true }) + gt?: string; - @Field(() => String, { nullable: true }) - gte?: string; + @Field(() => String, { nullable: true }) + gte?: string; - @Field(() => String, { nullable: true }) - contains?: string; + @Field(() => String, { nullable: true }) + contains?: string; - @Field(() => String, { nullable: true }) - startsWith?: string; + @Field(() => String, { nullable: true }) + startsWith?: string; - @Field(() => String, { nullable: true }) - endsWith?: string; + @Field(() => String, { nullable: true }) + endsWith?: string; - @Field(() => String, { nullable: true }) - search?: string; + @Field(() => String, { nullable: true }) + search?: string; - @Field(() => NestedStringWithAggregatesFilter, { nullable: true }) - not?: NestedStringWithAggregatesFilter; + @Field(() => NestedStringWithAggregatesFilter, { nullable: true }) + not?: NestedStringWithAggregatesFilter; - @Field(() => NestedIntFilter, { nullable: true }) - _count?: NestedIntFilter; + @Field(() => NestedIntFilter, { nullable: true }) + _count?: NestedIntFilter; - @Field(() => NestedStringFilter, { nullable: true }) - _min?: NestedStringFilter; + @Field(() => NestedStringFilter, { nullable: true }) + _min?: NestedStringFilter; - @Field(() => NestedStringFilter, { nullable: true }) - _max?: NestedStringFilter; + @Field(() => NestedStringFilter, { nullable: true }) + _max?: NestedStringFilter; } diff --git a/@generated/prisma/nullable-big-int-field-update-operations.input.ts b/@generated/prisma/nullable-big-int-field-update-operations.input.ts index 34215804..2877a5b7 100644 --- a/@generated/prisma/nullable-big-int-field-update-operations.input.ts +++ b/@generated/prisma/nullable-big-int-field-update-operations.input.ts @@ -3,18 +3,18 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class NullableBigIntFieldUpdateOperationsInput { - @Field(() => String, { nullable: true }) - set?: bigint | number; + @Field(() => String, { nullable: true }) + set?: bigint | number; - @Field(() => String, { nullable: true }) - increment?: bigint | number; + @Field(() => String, { nullable: true }) + increment?: bigint | number; - @Field(() => String, { nullable: true }) - decrement?: bigint | number; + @Field(() => String, { nullable: true }) + decrement?: bigint | number; - @Field(() => String, { nullable: true }) - multiply?: bigint | number; + @Field(() => String, { nullable: true }) + multiply?: bigint | number; - @Field(() => String, { nullable: true }) - divide?: bigint | number; + @Field(() => String, { nullable: true }) + divide?: bigint | number; } diff --git a/@generated/prisma/nullable-bool-field-update-operations.input.ts b/@generated/prisma/nullable-bool-field-update-operations.input.ts index 6f64c75c..f7323244 100644 --- a/@generated/prisma/nullable-bool-field-update-operations.input.ts +++ b/@generated/prisma/nullable-bool-field-update-operations.input.ts @@ -3,6 +3,6 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class NullableBoolFieldUpdateOperationsInput { - @Field(() => Boolean, { nullable: true }) - set?: boolean; + @Field(() => Boolean, { nullable: true }) + set?: boolean; } diff --git a/@generated/prisma/nullable-bytes-field-update-operations.input.ts b/@generated/prisma/nullable-bytes-field-update-operations.input.ts index 230bcd40..a8e49622 100644 --- a/@generated/prisma/nullable-bytes-field-update-operations.input.ts +++ b/@generated/prisma/nullable-bytes-field-update-operations.input.ts @@ -3,6 +3,6 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class NullableBytesFieldUpdateOperationsInput { - @Field(() => String, { nullable: true }) - set?: Buffer; + @Field(() => String, { nullable: true }) + set?: Buffer; } diff --git a/@generated/prisma/nullable-decimal-field-update-operations.input.ts b/@generated/prisma/nullable-decimal-field-update-operations.input.ts index 6a14112f..6d19f4ef 100644 --- a/@generated/prisma/nullable-decimal-field-update-operations.input.ts +++ b/@generated/prisma/nullable-decimal-field-update-operations.input.ts @@ -5,18 +5,18 @@ import { GraphQLDecimal } from 'prisma-graphql-type-decimal'; @InputType() export class NullableDecimalFieldUpdateOperationsInput { - @Field(() => GraphQLDecimal, { nullable: true }) - set?: Decimal; + @Field(() => GraphQLDecimal, { nullable: true }) + set?: Decimal; - @Field(() => GraphQLDecimal, { nullable: true }) - increment?: Decimal; + @Field(() => GraphQLDecimal, { nullable: true }) + increment?: Decimal; - @Field(() => GraphQLDecimal, { nullable: true }) - decrement?: Decimal; + @Field(() => GraphQLDecimal, { nullable: true }) + decrement?: Decimal; - @Field(() => GraphQLDecimal, { nullable: true }) - multiply?: Decimal; + @Field(() => GraphQLDecimal, { nullable: true }) + multiply?: Decimal; - @Field(() => GraphQLDecimal, { nullable: true }) - divide?: Decimal; + @Field(() => GraphQLDecimal, { nullable: true }) + divide?: Decimal; } diff --git a/@generated/prisma/nullable-enum-role-field-update-operations.input.ts b/@generated/prisma/nullable-enum-role-field-update-operations.input.ts index c25e77e4..cbde6c52 100644 --- a/@generated/prisma/nullable-enum-role-field-update-operations.input.ts +++ b/@generated/prisma/nullable-enum-role-field-update-operations.input.ts @@ -4,6 +4,6 @@ import { Role } from './role.enum'; @InputType() export class NullableEnumRoleFieldUpdateOperationsInput { - @Field(() => Role, { nullable: true }) - set?: keyof typeof Role; + @Field(() => Role, { nullable: true }) + set?: keyof typeof Role; } diff --git a/@generated/prisma/nullable-float-field-update-operations.input.ts b/@generated/prisma/nullable-float-field-update-operations.input.ts index f657efe9..038a2902 100644 --- a/@generated/prisma/nullable-float-field-update-operations.input.ts +++ b/@generated/prisma/nullable-float-field-update-operations.input.ts @@ -4,18 +4,18 @@ import { Float } from '@nestjs/graphql'; @InputType() export class NullableFloatFieldUpdateOperationsInput { - @Field(() => Float, { nullable: true }) - set?: number; + @Field(() => Float, { nullable: true }) + set?: number; - @Field(() => Float, { nullable: true }) - increment?: number; + @Field(() => Float, { nullable: true }) + increment?: number; - @Field(() => Float, { nullable: true }) - decrement?: number; + @Field(() => Float, { nullable: true }) + decrement?: number; - @Field(() => Float, { nullable: true }) - multiply?: number; + @Field(() => Float, { nullable: true }) + multiply?: number; - @Field(() => Float, { nullable: true }) - divide?: number; + @Field(() => Float, { nullable: true }) + divide?: number; } diff --git a/@generated/prisma/nullable-int-field-update-operations.input.ts b/@generated/prisma/nullable-int-field-update-operations.input.ts index ef10e789..81e6e472 100644 --- a/@generated/prisma/nullable-int-field-update-operations.input.ts +++ b/@generated/prisma/nullable-int-field-update-operations.input.ts @@ -4,18 +4,18 @@ import { Int } from '@nestjs/graphql'; @InputType() export class NullableIntFieldUpdateOperationsInput { - @Field(() => Int, { nullable: true }) - set?: number; + @Field(() => Int, { nullable: true }) + set?: number; - @Field(() => Int, { nullable: true }) - increment?: number; + @Field(() => Int, { nullable: true }) + increment?: number; - @Field(() => Int, { nullable: true }) - decrement?: number; + @Field(() => Int, { nullable: true }) + decrement?: number; - @Field(() => Int, { nullable: true }) - multiply?: number; + @Field(() => Int, { nullable: true }) + multiply?: number; - @Field(() => Int, { nullable: true }) - divide?: number; + @Field(() => Int, { nullable: true }) + divide?: number; } diff --git a/@generated/prisma/nullable-json-null-value-input.enum.ts b/@generated/prisma/nullable-json-null-value-input.enum.ts index 9e7692cd..5e7fc475 100644 --- a/@generated/prisma/nullable-json-null-value-input.enum.ts +++ b/@generated/prisma/nullable-json-null-value-input.enum.ts @@ -1,11 +1,11 @@ import { registerEnumType } from '@nestjs/graphql'; export enum NullableJsonNullValueInput { - DbNull = 'DbNull', - JsonNull = 'JsonNull', + DbNull = 'DbNull', + JsonNull = 'JsonNull', } registerEnumType(NullableJsonNullValueInput, { - name: 'NullableJsonNullValueInput', - description: undefined, + name: 'NullableJsonNullValueInput', + description: undefined, }); diff --git a/@generated/prisma/nullable-string-field-update-operations.input.ts b/@generated/prisma/nullable-string-field-update-operations.input.ts index 6aa44687..02bf7208 100644 --- a/@generated/prisma/nullable-string-field-update-operations.input.ts +++ b/@generated/prisma/nullable-string-field-update-operations.input.ts @@ -3,6 +3,6 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class NullableStringFieldUpdateOperationsInput { - @Field(() => String, { nullable: true }) - set?: string; + @Field(() => String, { nullable: true }) + set?: string; } diff --git a/@generated/prisma/query-mode.enum.ts b/@generated/prisma/query-mode.enum.ts index baf577cb..07c08d7b 100644 --- a/@generated/prisma/query-mode.enum.ts +++ b/@generated/prisma/query-mode.enum.ts @@ -1,8 +1,8 @@ import { registerEnumType } from '@nestjs/graphql'; export enum QueryMode { - 'default' = 'default', - insensitive = 'insensitive', + 'default' = 'default', + insensitive = 'insensitive', } registerEnumType(QueryMode, { name: 'QueryMode', description: undefined }); diff --git a/@generated/prisma/role.enum.ts b/@generated/prisma/role.enum.ts index 7aabe8d4..61292c71 100644 --- a/@generated/prisma/role.enum.ts +++ b/@generated/prisma/role.enum.ts @@ -1,7 +1,7 @@ import { registerEnumType } from '@nestjs/graphql'; export enum Role { - USER = 'USER', + USER = 'USER', } registerEnumType(Role, { name: 'Role', description: undefined }); diff --git a/@generated/prisma/sort-order.enum.ts b/@generated/prisma/sort-order.enum.ts index ca1cd1b2..6e8160a8 100644 --- a/@generated/prisma/sort-order.enum.ts +++ b/@generated/prisma/sort-order.enum.ts @@ -1,8 +1,8 @@ import { registerEnumType } from '@nestjs/graphql'; export enum SortOrder { - asc = 'asc', - desc = 'desc', + asc = 'asc', + desc = 'desc', } registerEnumType(SortOrder, { name: 'SortOrder', description: undefined }); diff --git a/@generated/prisma/string-field-update-operations.input.ts b/@generated/prisma/string-field-update-operations.input.ts index 31f76b09..63612bb9 100644 --- a/@generated/prisma/string-field-update-operations.input.ts +++ b/@generated/prisma/string-field-update-operations.input.ts @@ -3,6 +3,6 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class StringFieldUpdateOperationsInput { - @Field(() => String, { nullable: true }) - set?: string; + @Field(() => String, { nullable: true }) + set?: string; } diff --git a/@generated/prisma/string-filter.input.ts b/@generated/prisma/string-filter.input.ts index eea81e43..856288b5 100644 --- a/@generated/prisma/string-filter.input.ts +++ b/@generated/prisma/string-filter.input.ts @@ -5,42 +5,42 @@ import { NestedStringFilter } from './nested-string-filter.input'; @InputType() export class StringFilter { - @Field(() => String, { nullable: true }) - equals?: string; + @Field(() => String, { nullable: true }) + equals?: string; - @Field(() => [String], { nullable: true }) - in?: Array; + @Field(() => [String], { nullable: true }) + in?: Array; - @Field(() => [String], { nullable: true }) - notIn?: Array; + @Field(() => [String], { nullable: true }) + notIn?: Array; - @Field(() => String, { nullable: true }) - lt?: string; + @Field(() => String, { nullable: true }) + lt?: string; - @Field(() => String, { nullable: true }) - lte?: string; + @Field(() => String, { nullable: true }) + lte?: string; - @Field(() => String, { nullable: true }) - gt?: string; + @Field(() => String, { nullable: true }) + gt?: string; - @Field(() => String, { nullable: true }) - gte?: string; + @Field(() => String, { nullable: true }) + gte?: string; - @Field(() => String, { nullable: true }) - contains?: string; + @Field(() => String, { nullable: true }) + contains?: string; - @Field(() => String, { nullable: true }) - startsWith?: string; + @Field(() => String, { nullable: true }) + startsWith?: string; - @Field(() => String, { nullable: true }) - endsWith?: string; + @Field(() => String, { nullable: true }) + endsWith?: string; - @Field(() => String, { nullable: true }) - search?: string; + @Field(() => String, { nullable: true }) + search?: string; - @Field(() => QueryMode, { nullable: true }) - mode?: keyof typeof QueryMode; + @Field(() => QueryMode, { nullable: true }) + mode?: keyof typeof QueryMode; - @Field(() => NestedStringFilter, { nullable: true }) - not?: NestedStringFilter; + @Field(() => NestedStringFilter, { nullable: true }) + not?: NestedStringFilter; } diff --git a/@generated/prisma/string-nullable-filter.input.ts b/@generated/prisma/string-nullable-filter.input.ts index 629121fe..eba704ff 100644 --- a/@generated/prisma/string-nullable-filter.input.ts +++ b/@generated/prisma/string-nullable-filter.input.ts @@ -5,42 +5,42 @@ import { NestedStringNullableFilter } from './nested-string-nullable-filter.inpu @InputType() export class StringNullableFilter { - @Field(() => String, { nullable: true }) - equals?: string; + @Field(() => String, { nullable: true }) + equals?: string; - @Field(() => [String], { nullable: true }) - in?: Array; + @Field(() => [String], { nullable: true }) + in?: Array; - @Field(() => [String], { nullable: true }) - notIn?: Array; + @Field(() => [String], { nullable: true }) + notIn?: Array; - @Field(() => String, { nullable: true }) - lt?: string; + @Field(() => String, { nullable: true }) + lt?: string; - @Field(() => String, { nullable: true }) - lte?: string; + @Field(() => String, { nullable: true }) + lte?: string; - @Field(() => String, { nullable: true }) - gt?: string; + @Field(() => String, { nullable: true }) + gt?: string; - @Field(() => String, { nullable: true }) - gte?: string; + @Field(() => String, { nullable: true }) + gte?: string; - @Field(() => String, { nullable: true }) - contains?: string; + @Field(() => String, { nullable: true }) + contains?: string; - @Field(() => String, { nullable: true }) - startsWith?: string; + @Field(() => String, { nullable: true }) + startsWith?: string; - @Field(() => String, { nullable: true }) - endsWith?: string; + @Field(() => String, { nullable: true }) + endsWith?: string; - @Field(() => String, { nullable: true }) - search?: string; + @Field(() => String, { nullable: true }) + search?: string; - @Field(() => QueryMode, { nullable: true }) - mode?: keyof typeof QueryMode; + @Field(() => QueryMode, { nullable: true }) + mode?: keyof typeof QueryMode; - @Field(() => NestedStringNullableFilter, { nullable: true }) - not?: NestedStringNullableFilter; + @Field(() => NestedStringNullableFilter, { nullable: true }) + not?: NestedStringNullableFilter; } diff --git a/@generated/prisma/string-nullable-list-filter.input.ts b/@generated/prisma/string-nullable-list-filter.input.ts index 75ff39ae..3e483d4e 100644 --- a/@generated/prisma/string-nullable-list-filter.input.ts +++ b/@generated/prisma/string-nullable-list-filter.input.ts @@ -3,18 +3,18 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class StringNullableListFilter { - @Field(() => [String], { nullable: true }) - equals?: Array; + @Field(() => [String], { nullable: true }) + equals?: Array; - @Field(() => String, { nullable: true }) - has?: string; + @Field(() => String, { nullable: true }) + has?: string; - @Field(() => [String], { nullable: true }) - hasEvery?: Array; + @Field(() => [String], { nullable: true }) + hasEvery?: Array; - @Field(() => [String], { nullable: true }) - hasSome?: Array; + @Field(() => [String], { nullable: true }) + hasSome?: Array; - @Field(() => Boolean, { nullable: true }) - isEmpty?: boolean; + @Field(() => Boolean, { nullable: true }) + isEmpty?: boolean; } diff --git a/@generated/prisma/string-nullable-with-aggregates-filter.input.ts b/@generated/prisma/string-nullable-with-aggregates-filter.input.ts index 4b3b3638..5553e9ca 100644 --- a/@generated/prisma/string-nullable-with-aggregates-filter.input.ts +++ b/@generated/prisma/string-nullable-with-aggregates-filter.input.ts @@ -7,51 +7,51 @@ import { NestedStringNullableFilter } from './nested-string-nullable-filter.inpu @InputType() export class StringNullableWithAggregatesFilter { - @Field(() => String, { nullable: true }) - equals?: string; + @Field(() => String, { nullable: true }) + equals?: string; - @Field(() => [String], { nullable: true }) - in?: Array; + @Field(() => [String], { nullable: true }) + in?: Array; - @Field(() => [String], { nullable: true }) - notIn?: Array; + @Field(() => [String], { nullable: true }) + notIn?: Array; - @Field(() => String, { nullable: true }) - lt?: string; + @Field(() => String, { nullable: true }) + lt?: string; - @Field(() => String, { nullable: true }) - lte?: string; + @Field(() => String, { nullable: true }) + lte?: string; - @Field(() => String, { nullable: true }) - gt?: string; + @Field(() => String, { nullable: true }) + gt?: string; - @Field(() => String, { nullable: true }) - gte?: string; + @Field(() => String, { nullable: true }) + gte?: string; - @Field(() => String, { nullable: true }) - contains?: string; + @Field(() => String, { nullable: true }) + contains?: string; - @Field(() => String, { nullable: true }) - startsWith?: string; + @Field(() => String, { nullable: true }) + startsWith?: string; - @Field(() => String, { nullable: true }) - endsWith?: string; + @Field(() => String, { nullable: true }) + endsWith?: string; - @Field(() => String, { nullable: true }) - search?: string; + @Field(() => String, { nullable: true }) + search?: string; - @Field(() => QueryMode, { nullable: true }) - mode?: keyof typeof QueryMode; + @Field(() => QueryMode, { nullable: true }) + mode?: keyof typeof QueryMode; - @Field(() => NestedStringNullableWithAggregatesFilter, { nullable: true }) - not?: NestedStringNullableWithAggregatesFilter; + @Field(() => NestedStringNullableWithAggregatesFilter, { nullable: true }) + not?: NestedStringNullableWithAggregatesFilter; - @Field(() => NestedIntNullableFilter, { nullable: true }) - _count?: NestedIntNullableFilter; + @Field(() => NestedIntNullableFilter, { nullable: true }) + _count?: NestedIntNullableFilter; - @Field(() => NestedStringNullableFilter, { nullable: true }) - _min?: NestedStringNullableFilter; + @Field(() => NestedStringNullableFilter, { nullable: true }) + _min?: NestedStringNullableFilter; - @Field(() => NestedStringNullableFilter, { nullable: true }) - _max?: NestedStringNullableFilter; + @Field(() => NestedStringNullableFilter, { nullable: true }) + _max?: NestedStringNullableFilter; } diff --git a/@generated/prisma/string-with-aggregates-filter.input.ts b/@generated/prisma/string-with-aggregates-filter.input.ts index 8f824115..e5b67a42 100644 --- a/@generated/prisma/string-with-aggregates-filter.input.ts +++ b/@generated/prisma/string-with-aggregates-filter.input.ts @@ -7,51 +7,51 @@ import { NestedStringFilter } from './nested-string-filter.input'; @InputType() export class StringWithAggregatesFilter { - @Field(() => String, { nullable: true }) - equals?: string; + @Field(() => String, { nullable: true }) + equals?: string; - @Field(() => [String], { nullable: true }) - in?: Array; + @Field(() => [String], { nullable: true }) + in?: Array; - @Field(() => [String], { nullable: true }) - notIn?: Array; + @Field(() => [String], { nullable: true }) + notIn?: Array; - @Field(() => String, { nullable: true }) - lt?: string; + @Field(() => String, { nullable: true }) + lt?: string; - @Field(() => String, { nullable: true }) - lte?: string; + @Field(() => String, { nullable: true }) + lte?: string; - @Field(() => String, { nullable: true }) - gt?: string; + @Field(() => String, { nullable: true }) + gt?: string; - @Field(() => String, { nullable: true }) - gte?: string; + @Field(() => String, { nullable: true }) + gte?: string; - @Field(() => String, { nullable: true }) - contains?: string; + @Field(() => String, { nullable: true }) + contains?: string; - @Field(() => String, { nullable: true }) - startsWith?: string; + @Field(() => String, { nullable: true }) + startsWith?: string; - @Field(() => String, { nullable: true }) - endsWith?: string; + @Field(() => String, { nullable: true }) + endsWith?: string; - @Field(() => String, { nullable: true }) - search?: string; + @Field(() => String, { nullable: true }) + search?: string; - @Field(() => QueryMode, { nullable: true }) - mode?: keyof typeof QueryMode; + @Field(() => QueryMode, { nullable: true }) + mode?: keyof typeof QueryMode; - @Field(() => NestedStringWithAggregatesFilter, { nullable: true }) - not?: NestedStringWithAggregatesFilter; + @Field(() => NestedStringWithAggregatesFilter, { nullable: true }) + not?: NestedStringWithAggregatesFilter; - @Field(() => NestedIntFilter, { nullable: true }) - _count?: NestedIntFilter; + @Field(() => NestedIntFilter, { nullable: true }) + _count?: NestedIntFilter; - @Field(() => NestedStringFilter, { nullable: true }) - _min?: NestedStringFilter; + @Field(() => NestedStringFilter, { nullable: true }) + _min?: NestedStringFilter; - @Field(() => NestedStringFilter, { nullable: true }) - _max?: NestedStringFilter; + @Field(() => NestedStringFilter, { nullable: true }) + _max?: NestedStringFilter; } diff --git a/@generated/profile/aggregate-profile.output.ts b/@generated/profile/aggregate-profile.output.ts index 096f366e..02059bca 100644 --- a/@generated/profile/aggregate-profile.output.ts +++ b/@generated/profile/aggregate-profile.output.ts @@ -8,18 +8,18 @@ import { ProfileMaxAggregate } from './profile-max-aggregate.output'; @ObjectType() export class AggregateProfile { - @Field(() => ProfileCountAggregate, { nullable: true }) - _count?: ProfileCountAggregate; + @Field(() => ProfileCountAggregate, { nullable: true }) + _count?: ProfileCountAggregate; - @Field(() => ProfileAvgAggregate, { nullable: true }) - _avg?: ProfileAvgAggregate; + @Field(() => ProfileAvgAggregate, { nullable: true }) + _avg?: ProfileAvgAggregate; - @Field(() => ProfileSumAggregate, { nullable: true }) - _sum?: ProfileSumAggregate; + @Field(() => ProfileSumAggregate, { nullable: true }) + _sum?: ProfileSumAggregate; - @Field(() => ProfileMinAggregate, { nullable: true }) - _min?: ProfileMinAggregate; + @Field(() => ProfileMinAggregate, { nullable: true }) + _min?: ProfileMinAggregate; - @Field(() => ProfileMaxAggregate, { nullable: true }) - _max?: ProfileMaxAggregate; + @Field(() => ProfileMaxAggregate, { nullable: true }) + _max?: ProfileMaxAggregate; } diff --git a/@generated/profile/create-many-profile.args.ts b/@generated/profile/create-many-profile.args.ts index 00e910f9..bcb57d21 100644 --- a/@generated/profile/create-many-profile.args.ts +++ b/@generated/profile/create-many-profile.args.ts @@ -4,9 +4,9 @@ import { ProfileCreateManyInput } from './profile-create-many.input'; @ArgsType() export class CreateManyProfileArgs { - @Field(() => [ProfileCreateManyInput], { nullable: false }) - data!: Array; + @Field(() => [ProfileCreateManyInput], { nullable: false }) + data!: Array; - @Field(() => Boolean, { nullable: true }) - skipDuplicates?: boolean; + @Field(() => Boolean, { nullable: true }) + skipDuplicates?: boolean; } diff --git a/@generated/profile/create-one-profile.args.ts b/@generated/profile/create-one-profile.args.ts index 03fa293a..7ebf98c5 100644 --- a/@generated/profile/create-one-profile.args.ts +++ b/@generated/profile/create-one-profile.args.ts @@ -4,6 +4,6 @@ import { ProfileCreateInput } from './profile-create.input'; @ArgsType() export class CreateOneProfileArgs { - @Field(() => ProfileCreateInput, { nullable: false }) - data!: ProfileCreateInput; + @Field(() => ProfileCreateInput, { nullable: false }) + data!: ProfileCreateInput; } diff --git a/@generated/profile/delete-many-profile.args.ts b/@generated/profile/delete-many-profile.args.ts index 8b3da4a1..fe14f18f 100644 --- a/@generated/profile/delete-many-profile.args.ts +++ b/@generated/profile/delete-many-profile.args.ts @@ -4,6 +4,6 @@ import { ProfileWhereInput } from './profile-where.input'; @ArgsType() export class DeleteManyProfileArgs { - @Field(() => ProfileWhereInput, { nullable: true }) - where?: ProfileWhereInput; + @Field(() => ProfileWhereInput, { nullable: true }) + where?: ProfileWhereInput; } diff --git a/@generated/profile/delete-one-profile.args.ts b/@generated/profile/delete-one-profile.args.ts index 9bf7545f..80ca35c8 100644 --- a/@generated/profile/delete-one-profile.args.ts +++ b/@generated/profile/delete-one-profile.args.ts @@ -4,6 +4,6 @@ import { ProfileWhereUniqueInput } from './profile-where-unique.input'; @ArgsType() export class DeleteOneProfileArgs { - @Field(() => ProfileWhereUniqueInput, { nullable: false }) - where!: ProfileWhereUniqueInput; + @Field(() => ProfileWhereUniqueInput, { nullable: false }) + where!: ProfileWhereUniqueInput; } diff --git a/@generated/profile/find-first-profile.args.ts b/@generated/profile/find-first-profile.args.ts index 37df65f7..f91fa52e 100644 --- a/@generated/profile/find-first-profile.args.ts +++ b/@generated/profile/find-first-profile.args.ts @@ -8,23 +8,23 @@ import { ProfileScalarFieldEnum } from './profile-scalar-field.enum'; @ArgsType() export class FindFirstProfileArgs { - @Field(() => ProfileWhereInput, { nullable: true }) - where?: ProfileWhereInput; + @Field(() => ProfileWhereInput, { nullable: true }) + where?: ProfileWhereInput; - @Field(() => [ProfileOrderByWithRelationAndSearchRelevanceInput], { - nullable: true, - }) - orderBy?: Array; + @Field(() => [ProfileOrderByWithRelationAndSearchRelevanceInput], { + nullable: true, + }) + orderBy?: Array; - @Field(() => ProfileWhereUniqueInput, { nullable: true }) - cursor?: ProfileWhereUniqueInput; + @Field(() => ProfileWhereUniqueInput, { nullable: true }) + cursor?: ProfileWhereUniqueInput; - @Field(() => Int, { nullable: true }) - take?: number; + @Field(() => Int, { nullable: true }) + take?: number; - @Field(() => Int, { nullable: true }) - skip?: number; + @Field(() => Int, { nullable: true }) + skip?: number; - @Field(() => [ProfileScalarFieldEnum], { nullable: true }) - distinct?: Array; + @Field(() => [ProfileScalarFieldEnum], { nullable: true }) + distinct?: Array; } diff --git a/@generated/profile/find-many-profile.args.ts b/@generated/profile/find-many-profile.args.ts index 583a100f..06ea59e8 100644 --- a/@generated/profile/find-many-profile.args.ts +++ b/@generated/profile/find-many-profile.args.ts @@ -8,23 +8,23 @@ import { ProfileScalarFieldEnum } from './profile-scalar-field.enum'; @ArgsType() export class FindManyProfileArgs { - @Field(() => ProfileWhereInput, { nullable: true }) - where?: ProfileWhereInput; + @Field(() => ProfileWhereInput, { nullable: true }) + where?: ProfileWhereInput; - @Field(() => [ProfileOrderByWithRelationAndSearchRelevanceInput], { - nullable: true, - }) - orderBy?: Array; + @Field(() => [ProfileOrderByWithRelationAndSearchRelevanceInput], { + nullable: true, + }) + orderBy?: Array; - @Field(() => ProfileWhereUniqueInput, { nullable: true }) - cursor?: ProfileWhereUniqueInput; + @Field(() => ProfileWhereUniqueInput, { nullable: true }) + cursor?: ProfileWhereUniqueInput; - @Field(() => Int, { nullable: true }) - take?: number; + @Field(() => Int, { nullable: true }) + take?: number; - @Field(() => Int, { nullable: true }) - skip?: number; + @Field(() => Int, { nullable: true }) + skip?: number; - @Field(() => [ProfileScalarFieldEnum], { nullable: true }) - distinct?: Array; + @Field(() => [ProfileScalarFieldEnum], { nullable: true }) + distinct?: Array; } diff --git a/@generated/profile/find-unique-profile.args.ts b/@generated/profile/find-unique-profile.args.ts index 92e2c2da..aedb752e 100644 --- a/@generated/profile/find-unique-profile.args.ts +++ b/@generated/profile/find-unique-profile.args.ts @@ -4,6 +4,6 @@ import { ProfileWhereUniqueInput } from './profile-where-unique.input'; @ArgsType() export class FindUniqueProfileArgs { - @Field(() => ProfileWhereUniqueInput, { nullable: false }) - where!: ProfileWhereUniqueInput; + @Field(() => ProfileWhereUniqueInput, { nullable: false }) + where!: ProfileWhereUniqueInput; } diff --git a/@generated/profile/profile-aggregate.args.ts b/@generated/profile/profile-aggregate.args.ts index d2b3077a..75478b24 100644 --- a/@generated/profile/profile-aggregate.args.ts +++ b/@generated/profile/profile-aggregate.args.ts @@ -12,35 +12,35 @@ import { ProfileMaxAggregateInput } from './profile-max-aggregate.input'; @ArgsType() export class ProfileAggregateArgs { - @Field(() => ProfileWhereInput, { nullable: true }) - where?: ProfileWhereInput; + @Field(() => ProfileWhereInput, { nullable: true }) + where?: ProfileWhereInput; - @Field(() => [ProfileOrderByWithRelationAndSearchRelevanceInput], { - nullable: true, - }) - orderBy?: Array; + @Field(() => [ProfileOrderByWithRelationAndSearchRelevanceInput], { + nullable: true, + }) + orderBy?: Array; - @Field(() => ProfileWhereUniqueInput, { nullable: true }) - cursor?: ProfileWhereUniqueInput; + @Field(() => ProfileWhereUniqueInput, { nullable: true }) + cursor?: ProfileWhereUniqueInput; - @Field(() => Int, { nullable: true }) - take?: number; + @Field(() => Int, { nullable: true }) + take?: number; - @Field(() => Int, { nullable: true }) - skip?: number; + @Field(() => Int, { nullable: true }) + skip?: number; - @Field(() => ProfileCountAggregateInput, { nullable: true }) - _count?: ProfileCountAggregateInput; + @Field(() => ProfileCountAggregateInput, { nullable: true }) + _count?: ProfileCountAggregateInput; - @Field(() => ProfileAvgAggregateInput, { nullable: true }) - _avg?: ProfileAvgAggregateInput; + @Field(() => ProfileAvgAggregateInput, { nullable: true }) + _avg?: ProfileAvgAggregateInput; - @Field(() => ProfileSumAggregateInput, { nullable: true }) - _sum?: ProfileSumAggregateInput; + @Field(() => ProfileSumAggregateInput, { nullable: true }) + _sum?: ProfileSumAggregateInput; - @Field(() => ProfileMinAggregateInput, { nullable: true }) - _min?: ProfileMinAggregateInput; + @Field(() => ProfileMinAggregateInput, { nullable: true }) + _min?: ProfileMinAggregateInput; - @Field(() => ProfileMaxAggregateInput, { nullable: true }) - _max?: ProfileMaxAggregateInput; + @Field(() => ProfileMaxAggregateInput, { nullable: true }) + _max?: ProfileMaxAggregateInput; } diff --git a/@generated/profile/profile-avg-aggregate.input.ts b/@generated/profile/profile-avg-aggregate.input.ts index 995265dd..7092d800 100644 --- a/@generated/profile/profile-avg-aggregate.input.ts +++ b/@generated/profile/profile-avg-aggregate.input.ts @@ -3,6 +3,6 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class ProfileAvgAggregateInput { - @Field(() => Boolean, { nullable: true }) - id?: true; + @Field(() => Boolean, { nullable: true }) + id?: true; } diff --git a/@generated/profile/profile-avg-aggregate.output.ts b/@generated/profile/profile-avg-aggregate.output.ts index 79c5fcc2..f8e48487 100644 --- a/@generated/profile/profile-avg-aggregate.output.ts +++ b/@generated/profile/profile-avg-aggregate.output.ts @@ -4,6 +4,6 @@ import { Float } from '@nestjs/graphql'; @ObjectType() export class ProfileAvgAggregate { - @Field(() => Float, { nullable: true }) - id?: number; + @Field(() => Float, { nullable: true }) + id?: number; } diff --git a/@generated/profile/profile-avg-order-by-aggregate.input.ts b/@generated/profile/profile-avg-order-by-aggregate.input.ts index 6dbfe823..e56f759e 100644 --- a/@generated/profile/profile-avg-order-by-aggregate.input.ts +++ b/@generated/profile/profile-avg-order-by-aggregate.input.ts @@ -4,6 +4,6 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class ProfileAvgOrderByAggregateInput { - @Field(() => SortOrder, { nullable: true }) - id?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + id?: keyof typeof SortOrder; } diff --git a/@generated/profile/profile-count-aggregate.input.ts b/@generated/profile/profile-count-aggregate.input.ts index f7cb522c..29646d48 100644 --- a/@generated/profile/profile-count-aggregate.input.ts +++ b/@generated/profile/profile-count-aggregate.input.ts @@ -3,15 +3,15 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class ProfileCountAggregateInput { - @Field(() => Boolean, { nullable: true }) - id?: true; + @Field(() => Boolean, { nullable: true }) + id?: true; - @Field(() => Boolean, { nullable: true }) - userId?: true; + @Field(() => Boolean, { nullable: true }) + userId?: true; - @Field(() => Boolean, { nullable: true }) - dummy?: true; + @Field(() => Boolean, { nullable: true }) + dummy?: true; - @Field(() => Boolean, { nullable: true }) - _all?: true; + @Field(() => Boolean, { nullable: true }) + _all?: true; } diff --git a/@generated/profile/profile-count-aggregate.output.ts b/@generated/profile/profile-count-aggregate.output.ts index 39ea1b01..48786dc6 100644 --- a/@generated/profile/profile-count-aggregate.output.ts +++ b/@generated/profile/profile-count-aggregate.output.ts @@ -4,15 +4,15 @@ import { Int } from '@nestjs/graphql'; @ObjectType() export class ProfileCountAggregate { - @Field(() => Int, { nullable: false }) - id!: number; + @Field(() => Int, { nullable: false }) + id!: number; - @Field(() => Int, { nullable: false }) - userId!: number; + @Field(() => Int, { nullable: false }) + userId!: number; - @Field(() => Int, { nullable: false }) - dummy!: number; + @Field(() => Int, { nullable: false }) + dummy!: number; - @Field(() => Int, { nullable: false }) - _all!: number; + @Field(() => Int, { nullable: false }) + _all!: number; } diff --git a/@generated/profile/profile-count-order-by-aggregate.input.ts b/@generated/profile/profile-count-order-by-aggregate.input.ts index 92e6da1d..acd1c5db 100644 --- a/@generated/profile/profile-count-order-by-aggregate.input.ts +++ b/@generated/profile/profile-count-order-by-aggregate.input.ts @@ -4,12 +4,12 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class ProfileCountOrderByAggregateInput { - @Field(() => SortOrder, { nullable: true }) - id?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + id?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - userId?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + userId?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - dummy?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + dummy?: keyof typeof SortOrder; } diff --git a/@generated/profile/profile-create-many.input.ts b/@generated/profile/profile-create-many.input.ts index 6a1814fc..6efac1d5 100644 --- a/@generated/profile/profile-create-many.input.ts +++ b/@generated/profile/profile-create-many.input.ts @@ -4,12 +4,12 @@ import { Int } from '@nestjs/graphql'; @InputType() export class ProfileCreateManyInput { - @Field(() => Int, { nullable: true }) - id?: number; + @Field(() => Int, { nullable: true }) + id?: number; - @Field(() => String, { nullable: false }) - userId!: string; + @Field(() => String, { nullable: false }) + userId!: string; - @Field(() => String, { nullable: true }) - dummy?: string; + @Field(() => String, { nullable: true }) + dummy?: string; } diff --git a/@generated/profile/profile-create-nested-one-without-user.input.ts b/@generated/profile/profile-create-nested-one-without-user.input.ts index 2d8f6800..583e0926 100644 --- a/@generated/profile/profile-create-nested-one-without-user.input.ts +++ b/@generated/profile/profile-create-nested-one-without-user.input.ts @@ -6,12 +6,12 @@ import { ProfileWhereUniqueInput } from './profile-where-unique.input'; @InputType() export class ProfileCreateNestedOneWithoutUserInput { - @Field(() => ProfileCreateWithoutUserInput, { nullable: true }) - create?: ProfileCreateWithoutUserInput; + @Field(() => ProfileCreateWithoutUserInput, { nullable: true }) + create?: ProfileCreateWithoutUserInput; - @Field(() => ProfileCreateOrConnectWithoutUserInput, { nullable: true }) - connectOrCreate?: ProfileCreateOrConnectWithoutUserInput; + @Field(() => ProfileCreateOrConnectWithoutUserInput, { nullable: true }) + connectOrCreate?: ProfileCreateOrConnectWithoutUserInput; - @Field(() => ProfileWhereUniqueInput, { nullable: true }) - connect?: ProfileWhereUniqueInput; + @Field(() => ProfileWhereUniqueInput, { nullable: true }) + connect?: ProfileWhereUniqueInput; } diff --git a/@generated/profile/profile-create-or-connect-without-user.input.ts b/@generated/profile/profile-create-or-connect-without-user.input.ts index 2f9be5a3..c19c90a5 100644 --- a/@generated/profile/profile-create-or-connect-without-user.input.ts +++ b/@generated/profile/profile-create-or-connect-without-user.input.ts @@ -5,9 +5,9 @@ import { ProfileCreateWithoutUserInput } from './profile-create-without-user.inp @InputType() export class ProfileCreateOrConnectWithoutUserInput { - @Field(() => ProfileWhereUniqueInput, { nullable: false }) - where!: ProfileWhereUniqueInput; + @Field(() => ProfileWhereUniqueInput, { nullable: false }) + where!: ProfileWhereUniqueInput; - @Field(() => ProfileCreateWithoutUserInput, { nullable: false }) - create!: ProfileCreateWithoutUserInput; + @Field(() => ProfileCreateWithoutUserInput, { nullable: false }) + create!: ProfileCreateWithoutUserInput; } diff --git a/@generated/profile/profile-create-without-user.input.ts b/@generated/profile/profile-create-without-user.input.ts index 8acff0ef..dffa437c 100644 --- a/@generated/profile/profile-create-without-user.input.ts +++ b/@generated/profile/profile-create-without-user.input.ts @@ -3,6 +3,6 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class ProfileCreateWithoutUserInput { - @Field(() => String, { nullable: true }) - dummy?: string; + @Field(() => String, { nullable: true }) + dummy?: string; } diff --git a/@generated/profile/profile-create.input.ts b/@generated/profile/profile-create.input.ts index ee1d1e5d..a9df95c0 100644 --- a/@generated/profile/profile-create.input.ts +++ b/@generated/profile/profile-create.input.ts @@ -4,9 +4,9 @@ import { UserCreateNestedOneWithoutProfileInput } from '../user/user-create-nest @InputType() export class ProfileCreateInput { - @Field(() => UserCreateNestedOneWithoutProfileInput, { nullable: false }) - user!: UserCreateNestedOneWithoutProfileInput; + @Field(() => UserCreateNestedOneWithoutProfileInput, { nullable: false }) + user!: UserCreateNestedOneWithoutProfileInput; - @Field(() => String, { nullable: true }) - dummy?: string; + @Field(() => String, { nullable: true }) + dummy?: string; } diff --git a/@generated/profile/profile-group-by.args.ts b/@generated/profile/profile-group-by.args.ts index 4e71c3d9..381cbdd7 100644 --- a/@generated/profile/profile-group-by.args.ts +++ b/@generated/profile/profile-group-by.args.ts @@ -13,36 +13,36 @@ import { ProfileMaxAggregateInput } from './profile-max-aggregate.input'; @ArgsType() export class ProfileGroupByArgs { - @Field(() => ProfileWhereInput, { nullable: true }) - where?: ProfileWhereInput; + @Field(() => ProfileWhereInput, { nullable: true }) + where?: ProfileWhereInput; - @Field(() => [ProfileOrderByWithAggregationInput], { nullable: true }) - orderBy?: Array; + @Field(() => [ProfileOrderByWithAggregationInput], { nullable: true }) + orderBy?: Array; - @Field(() => [ProfileScalarFieldEnum], { nullable: false }) - by!: Array; + @Field(() => [ProfileScalarFieldEnum], { nullable: false }) + by!: Array; - @Field(() => ProfileScalarWhereWithAggregatesInput, { nullable: true }) - having?: ProfileScalarWhereWithAggregatesInput; + @Field(() => ProfileScalarWhereWithAggregatesInput, { nullable: true }) + having?: ProfileScalarWhereWithAggregatesInput; - @Field(() => Int, { nullable: true }) - take?: number; + @Field(() => Int, { nullable: true }) + take?: number; - @Field(() => Int, { nullable: true }) - skip?: number; + @Field(() => Int, { nullable: true }) + skip?: number; - @Field(() => ProfileCountAggregateInput, { nullable: true }) - _count?: ProfileCountAggregateInput; + @Field(() => ProfileCountAggregateInput, { nullable: true }) + _count?: ProfileCountAggregateInput; - @Field(() => ProfileAvgAggregateInput, { nullable: true }) - _avg?: ProfileAvgAggregateInput; + @Field(() => ProfileAvgAggregateInput, { nullable: true }) + _avg?: ProfileAvgAggregateInput; - @Field(() => ProfileSumAggregateInput, { nullable: true }) - _sum?: ProfileSumAggregateInput; + @Field(() => ProfileSumAggregateInput, { nullable: true }) + _sum?: ProfileSumAggregateInput; - @Field(() => ProfileMinAggregateInput, { nullable: true }) - _min?: ProfileMinAggregateInput; + @Field(() => ProfileMinAggregateInput, { nullable: true }) + _min?: ProfileMinAggregateInput; - @Field(() => ProfileMaxAggregateInput, { nullable: true }) - _max?: ProfileMaxAggregateInput; + @Field(() => ProfileMaxAggregateInput, { nullable: true }) + _max?: ProfileMaxAggregateInput; } diff --git a/@generated/profile/profile-group-by.output.ts b/@generated/profile/profile-group-by.output.ts index e8e3d7c7..f2ee433a 100644 --- a/@generated/profile/profile-group-by.output.ts +++ b/@generated/profile/profile-group-by.output.ts @@ -9,27 +9,27 @@ import { ProfileMaxAggregate } from './profile-max-aggregate.output'; @ObjectType() export class ProfileGroupBy { - @Field(() => Int, { nullable: false }) - id!: number; + @Field(() => Int, { nullable: false }) + id!: number; - @Field(() => String, { nullable: false }) - userId!: string; + @Field(() => String, { nullable: false }) + userId!: string; - @Field(() => String, { nullable: true }) - dummy?: string; + @Field(() => String, { nullable: true }) + dummy?: string; - @Field(() => ProfileCountAggregate, { nullable: true }) - _count?: ProfileCountAggregate; + @Field(() => ProfileCountAggregate, { nullable: true }) + _count?: ProfileCountAggregate; - @Field(() => ProfileAvgAggregate, { nullable: true }) - _avg?: ProfileAvgAggregate; + @Field(() => ProfileAvgAggregate, { nullable: true }) + _avg?: ProfileAvgAggregate; - @Field(() => ProfileSumAggregate, { nullable: true }) - _sum?: ProfileSumAggregate; + @Field(() => ProfileSumAggregate, { nullable: true }) + _sum?: ProfileSumAggregate; - @Field(() => ProfileMinAggregate, { nullable: true }) - _min?: ProfileMinAggregate; + @Field(() => ProfileMinAggregate, { nullable: true }) + _min?: ProfileMinAggregate; - @Field(() => ProfileMaxAggregate, { nullable: true }) - _max?: ProfileMaxAggregate; + @Field(() => ProfileMaxAggregate, { nullable: true }) + _max?: ProfileMaxAggregate; } diff --git a/@generated/profile/profile-max-aggregate.input.ts b/@generated/profile/profile-max-aggregate.input.ts index 824fff2f..06069f7a 100644 --- a/@generated/profile/profile-max-aggregate.input.ts +++ b/@generated/profile/profile-max-aggregate.input.ts @@ -3,12 +3,12 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class ProfileMaxAggregateInput { - @Field(() => Boolean, { nullable: true }) - id?: true; + @Field(() => Boolean, { nullable: true }) + id?: true; - @Field(() => Boolean, { nullable: true }) - userId?: true; + @Field(() => Boolean, { nullable: true }) + userId?: true; - @Field(() => Boolean, { nullable: true }) - dummy?: true; + @Field(() => Boolean, { nullable: true }) + dummy?: true; } diff --git a/@generated/profile/profile-max-aggregate.output.ts b/@generated/profile/profile-max-aggregate.output.ts index 9ed9f55e..53cca991 100644 --- a/@generated/profile/profile-max-aggregate.output.ts +++ b/@generated/profile/profile-max-aggregate.output.ts @@ -4,12 +4,12 @@ import { Int } from '@nestjs/graphql'; @ObjectType() export class ProfileMaxAggregate { - @Field(() => Int, { nullable: true }) - id?: number; + @Field(() => Int, { nullable: true }) + id?: number; - @Field(() => String, { nullable: true }) - userId?: string; + @Field(() => String, { nullable: true }) + userId?: string; - @Field(() => String, { nullable: true }) - dummy?: string; + @Field(() => String, { nullable: true }) + dummy?: string; } diff --git a/@generated/profile/profile-max-order-by-aggregate.input.ts b/@generated/profile/profile-max-order-by-aggregate.input.ts index 769c874f..c666fc6f 100644 --- a/@generated/profile/profile-max-order-by-aggregate.input.ts +++ b/@generated/profile/profile-max-order-by-aggregate.input.ts @@ -4,12 +4,12 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class ProfileMaxOrderByAggregateInput { - @Field(() => SortOrder, { nullable: true }) - id?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + id?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - userId?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + userId?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - dummy?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + dummy?: keyof typeof SortOrder; } diff --git a/@generated/profile/profile-min-aggregate.input.ts b/@generated/profile/profile-min-aggregate.input.ts index c1733400..0cb69e0b 100644 --- a/@generated/profile/profile-min-aggregate.input.ts +++ b/@generated/profile/profile-min-aggregate.input.ts @@ -3,12 +3,12 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class ProfileMinAggregateInput { - @Field(() => Boolean, { nullable: true }) - id?: true; + @Field(() => Boolean, { nullable: true }) + id?: true; - @Field(() => Boolean, { nullable: true }) - userId?: true; + @Field(() => Boolean, { nullable: true }) + userId?: true; - @Field(() => Boolean, { nullable: true }) - dummy?: true; + @Field(() => Boolean, { nullable: true }) + dummy?: true; } diff --git a/@generated/profile/profile-min-aggregate.output.ts b/@generated/profile/profile-min-aggregate.output.ts index 881ea15d..e7cb8307 100644 --- a/@generated/profile/profile-min-aggregate.output.ts +++ b/@generated/profile/profile-min-aggregate.output.ts @@ -4,12 +4,12 @@ import { Int } from '@nestjs/graphql'; @ObjectType() export class ProfileMinAggregate { - @Field(() => Int, { nullable: true }) - id?: number; + @Field(() => Int, { nullable: true }) + id?: number; - @Field(() => String, { nullable: true }) - userId?: string; + @Field(() => String, { nullable: true }) + userId?: string; - @Field(() => String, { nullable: true }) - dummy?: string; + @Field(() => String, { nullable: true }) + dummy?: string; } diff --git a/@generated/profile/profile-min-order-by-aggregate.input.ts b/@generated/profile/profile-min-order-by-aggregate.input.ts index 43c48b18..fd1185b7 100644 --- a/@generated/profile/profile-min-order-by-aggregate.input.ts +++ b/@generated/profile/profile-min-order-by-aggregate.input.ts @@ -4,12 +4,12 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class ProfileMinOrderByAggregateInput { - @Field(() => SortOrder, { nullable: true }) - id?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + id?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - userId?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + userId?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - dummy?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + dummy?: keyof typeof SortOrder; } diff --git a/@generated/profile/profile-order-by-relevance-field.enum.ts b/@generated/profile/profile-order-by-relevance-field.enum.ts index 2d532e83..605c11f2 100644 --- a/@generated/profile/profile-order-by-relevance-field.enum.ts +++ b/@generated/profile/profile-order-by-relevance-field.enum.ts @@ -1,11 +1,11 @@ import { registerEnumType } from '@nestjs/graphql'; export enum ProfileOrderByRelevanceFieldEnum { - userId = 'userId', - dummy = 'dummy', + userId = 'userId', + dummy = 'dummy', } registerEnumType(ProfileOrderByRelevanceFieldEnum, { - name: 'ProfileOrderByRelevanceFieldEnum', - description: undefined, + name: 'ProfileOrderByRelevanceFieldEnum', + description: undefined, }); diff --git a/@generated/profile/profile-order-by-relevance.input.ts b/@generated/profile/profile-order-by-relevance.input.ts index b9413fbb..d5d971d6 100644 --- a/@generated/profile/profile-order-by-relevance.input.ts +++ b/@generated/profile/profile-order-by-relevance.input.ts @@ -5,12 +5,12 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class ProfileOrderByRelevanceInput { - @Field(() => [ProfileOrderByRelevanceFieldEnum], { nullable: false }) - fields!: Array; + @Field(() => [ProfileOrderByRelevanceFieldEnum], { nullable: false }) + fields!: Array; - @Field(() => SortOrder, { nullable: false }) - sort!: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: false }) + sort!: keyof typeof SortOrder; - @Field(() => String, { nullable: false }) - search!: string; + @Field(() => String, { nullable: false }) + search!: string; } diff --git a/@generated/profile/profile-order-by-with-aggregation.input.ts b/@generated/profile/profile-order-by-with-aggregation.input.ts index 1a17da68..08c0a1bf 100644 --- a/@generated/profile/profile-order-by-with-aggregation.input.ts +++ b/@generated/profile/profile-order-by-with-aggregation.input.ts @@ -9,27 +9,27 @@ import { ProfileSumOrderByAggregateInput } from './profile-sum-order-by-aggregat @InputType() export class ProfileOrderByWithAggregationInput { - @Field(() => SortOrder, { nullable: true }) - id?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + id?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - userId?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + userId?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - dummy?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + dummy?: keyof typeof SortOrder; - @Field(() => ProfileCountOrderByAggregateInput, { nullable: true }) - _count?: ProfileCountOrderByAggregateInput; + @Field(() => ProfileCountOrderByAggregateInput, { nullable: true }) + _count?: ProfileCountOrderByAggregateInput; - @Field(() => ProfileAvgOrderByAggregateInput, { nullable: true }) - _avg?: ProfileAvgOrderByAggregateInput; + @Field(() => ProfileAvgOrderByAggregateInput, { nullable: true }) + _avg?: ProfileAvgOrderByAggregateInput; - @Field(() => ProfileMaxOrderByAggregateInput, { nullable: true }) - _max?: ProfileMaxOrderByAggregateInput; + @Field(() => ProfileMaxOrderByAggregateInput, { nullable: true }) + _max?: ProfileMaxOrderByAggregateInput; - @Field(() => ProfileMinOrderByAggregateInput, { nullable: true }) - _min?: ProfileMinOrderByAggregateInput; + @Field(() => ProfileMinOrderByAggregateInput, { nullable: true }) + _min?: ProfileMinOrderByAggregateInput; - @Field(() => ProfileSumOrderByAggregateInput, { nullable: true }) - _sum?: ProfileSumOrderByAggregateInput; + @Field(() => ProfileSumOrderByAggregateInput, { nullable: true }) + _sum?: ProfileSumOrderByAggregateInput; } diff --git a/@generated/profile/profile-order-by-with-relation-and-search-relevance.input.ts b/@generated/profile/profile-order-by-with-relation-and-search-relevance.input.ts index 1b6b80ec..da8d517b 100644 --- a/@generated/profile/profile-order-by-with-relation-and-search-relevance.input.ts +++ b/@generated/profile/profile-order-by-with-relation-and-search-relevance.input.ts @@ -6,18 +6,18 @@ import { ProfileOrderByRelevanceInput } from './profile-order-by-relevance.input @InputType() export class ProfileOrderByWithRelationAndSearchRelevanceInput { - @Field(() => SortOrder, { nullable: true }) - id?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + id?: keyof typeof SortOrder; - @Field(() => UserOrderByWithRelationAndSearchRelevanceInput, { nullable: true }) - user?: UserOrderByWithRelationAndSearchRelevanceInput; + @Field(() => UserOrderByWithRelationAndSearchRelevanceInput, { nullable: true }) + user?: UserOrderByWithRelationAndSearchRelevanceInput; - @Field(() => SortOrder, { nullable: true }) - userId?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + userId?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - dummy?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + dummy?: keyof typeof SortOrder; - @Field(() => ProfileOrderByRelevanceInput, { nullable: true }) - _relevance?: ProfileOrderByRelevanceInput; + @Field(() => ProfileOrderByRelevanceInput, { nullable: true }) + _relevance?: ProfileOrderByRelevanceInput; } diff --git a/@generated/profile/profile-relation-filter.input.ts b/@generated/profile/profile-relation-filter.input.ts index c75b4868..e4cc2e85 100644 --- a/@generated/profile/profile-relation-filter.input.ts +++ b/@generated/profile/profile-relation-filter.input.ts @@ -4,9 +4,9 @@ import { ProfileWhereInput } from './profile-where.input'; @InputType() export class ProfileRelationFilter { - @Field(() => ProfileWhereInput, { nullable: true }) - is?: ProfileWhereInput; + @Field(() => ProfileWhereInput, { nullable: true }) + is?: ProfileWhereInput; - @Field(() => ProfileWhereInput, { nullable: true }) - isNot?: ProfileWhereInput; + @Field(() => ProfileWhereInput, { nullable: true }) + isNot?: ProfileWhereInput; } diff --git a/@generated/profile/profile-scalar-field.enum.ts b/@generated/profile/profile-scalar-field.enum.ts index e9d24ef9..eb067c47 100644 --- a/@generated/profile/profile-scalar-field.enum.ts +++ b/@generated/profile/profile-scalar-field.enum.ts @@ -1,12 +1,12 @@ import { registerEnumType } from '@nestjs/graphql'; export enum ProfileScalarFieldEnum { - id = 'id', - userId = 'userId', - dummy = 'dummy', + id = 'id', + userId = 'userId', + dummy = 'dummy', } registerEnumType(ProfileScalarFieldEnum, { - name: 'ProfileScalarFieldEnum', - description: undefined, + name: 'ProfileScalarFieldEnum', + description: undefined, }); diff --git a/@generated/profile/profile-scalar-where-with-aggregates.input.ts b/@generated/profile/profile-scalar-where-with-aggregates.input.ts index 0d635459..44db1166 100644 --- a/@generated/profile/profile-scalar-where-with-aggregates.input.ts +++ b/@generated/profile/profile-scalar-where-with-aggregates.input.ts @@ -6,21 +6,21 @@ import { StringNullableWithAggregatesFilter } from '../prisma/string-nullable-wi @InputType() export class ProfileScalarWhereWithAggregatesInput { - @Field(() => [ProfileScalarWhereWithAggregatesInput], { nullable: true }) - AND?: Array; + @Field(() => [ProfileScalarWhereWithAggregatesInput], { nullable: true }) + AND?: Array; - @Field(() => [ProfileScalarWhereWithAggregatesInput], { nullable: true }) - OR?: Array; + @Field(() => [ProfileScalarWhereWithAggregatesInput], { nullable: true }) + OR?: Array; - @Field(() => [ProfileScalarWhereWithAggregatesInput], { nullable: true }) - NOT?: Array; + @Field(() => [ProfileScalarWhereWithAggregatesInput], { nullable: true }) + NOT?: Array; - @Field(() => IntWithAggregatesFilter, { nullable: true }) - id?: IntWithAggregatesFilter; + @Field(() => IntWithAggregatesFilter, { nullable: true }) + id?: IntWithAggregatesFilter; - @Field(() => StringWithAggregatesFilter, { nullable: true }) - userId?: StringWithAggregatesFilter; + @Field(() => StringWithAggregatesFilter, { nullable: true }) + userId?: StringWithAggregatesFilter; - @Field(() => StringNullableWithAggregatesFilter, { nullable: true }) - dummy?: StringNullableWithAggregatesFilter; + @Field(() => StringNullableWithAggregatesFilter, { nullable: true }) + dummy?: StringNullableWithAggregatesFilter; } diff --git a/@generated/profile/profile-sum-aggregate.input.ts b/@generated/profile/profile-sum-aggregate.input.ts index 03ac48f9..57d97533 100644 --- a/@generated/profile/profile-sum-aggregate.input.ts +++ b/@generated/profile/profile-sum-aggregate.input.ts @@ -3,6 +3,6 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class ProfileSumAggregateInput { - @Field(() => Boolean, { nullable: true }) - id?: true; + @Field(() => Boolean, { nullable: true }) + id?: true; } diff --git a/@generated/profile/profile-sum-aggregate.output.ts b/@generated/profile/profile-sum-aggregate.output.ts index bae77c36..1ab708e1 100644 --- a/@generated/profile/profile-sum-aggregate.output.ts +++ b/@generated/profile/profile-sum-aggregate.output.ts @@ -4,6 +4,6 @@ import { Int } from '@nestjs/graphql'; @ObjectType() export class ProfileSumAggregate { - @Field(() => Int, { nullable: true }) - id?: number; + @Field(() => Int, { nullable: true }) + id?: number; } diff --git a/@generated/profile/profile-sum-order-by-aggregate.input.ts b/@generated/profile/profile-sum-order-by-aggregate.input.ts index b17ca712..ebd51c53 100644 --- a/@generated/profile/profile-sum-order-by-aggregate.input.ts +++ b/@generated/profile/profile-sum-order-by-aggregate.input.ts @@ -4,6 +4,6 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class ProfileSumOrderByAggregateInput { - @Field(() => SortOrder, { nullable: true }) - id?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + id?: keyof typeof SortOrder; } diff --git a/@generated/profile/profile-unchecked-create-nested-one-without-user.input.ts b/@generated/profile/profile-unchecked-create-nested-one-without-user.input.ts index 47143c9a..bfd36494 100644 --- a/@generated/profile/profile-unchecked-create-nested-one-without-user.input.ts +++ b/@generated/profile/profile-unchecked-create-nested-one-without-user.input.ts @@ -7,12 +7,12 @@ import { ProfileWhereUniqueInput } from './profile-where-unique.input'; @InputType() export class ProfileUncheckedCreateNestedOneWithoutUserInput { - @Field(() => ProfileCreateWithoutUserInput, { nullable: true }) - create?: ProfileCreateWithoutUserInput; + @Field(() => ProfileCreateWithoutUserInput, { nullable: true }) + create?: ProfileCreateWithoutUserInput; - @HideField() - connectOrCreate?: ProfileCreateOrConnectWithoutUserInput; + @HideField() + connectOrCreate?: ProfileCreateOrConnectWithoutUserInput; - @HideField() - connect?: ProfileWhereUniqueInput; + @HideField() + connect?: ProfileWhereUniqueInput; } diff --git a/@generated/profile/profile-unchecked-create-without-user.input.ts b/@generated/profile/profile-unchecked-create-without-user.input.ts index ea2adfb6..0452e6dd 100644 --- a/@generated/profile/profile-unchecked-create-without-user.input.ts +++ b/@generated/profile/profile-unchecked-create-without-user.input.ts @@ -4,9 +4,9 @@ import { Int } from '@nestjs/graphql'; @InputType() export class ProfileUncheckedCreateWithoutUserInput { - @Field(() => Int, { nullable: true }) - id?: number; + @Field(() => Int, { nullable: true }) + id?: number; - @Field(() => String, { nullable: true }) - dummy?: string; + @Field(() => String, { nullable: true }) + dummy?: string; } diff --git a/@generated/profile/profile-unchecked-create.input.ts b/@generated/profile/profile-unchecked-create.input.ts index 7bddab9d..2555bb6f 100644 --- a/@generated/profile/profile-unchecked-create.input.ts +++ b/@generated/profile/profile-unchecked-create.input.ts @@ -4,12 +4,12 @@ import { Int } from '@nestjs/graphql'; @InputType() export class ProfileUncheckedCreateInput { - @Field(() => Int, { nullable: true }) - id?: number; + @Field(() => Int, { nullable: true }) + id?: number; - @Field(() => String, { nullable: false }) - userId!: string; + @Field(() => String, { nullable: false }) + userId!: string; - @Field(() => String, { nullable: true }) - dummy?: string; + @Field(() => String, { nullable: true }) + dummy?: string; } diff --git a/@generated/profile/profile-unchecked-update-many.input.ts b/@generated/profile/profile-unchecked-update-many.input.ts index b27f4609..218d46a7 100644 --- a/@generated/profile/profile-unchecked-update-many.input.ts +++ b/@generated/profile/profile-unchecked-update-many.input.ts @@ -6,12 +6,12 @@ import { NullableStringFieldUpdateOperationsInput } from '../prisma/nullable-str @InputType() export class ProfileUncheckedUpdateManyInput { - @Field(() => IntFieldUpdateOperationsInput, { nullable: true }) - id?: IntFieldUpdateOperationsInput; + @Field(() => IntFieldUpdateOperationsInput, { nullable: true }) + id?: IntFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - userId?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + userId?: StringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - dummy?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + dummy?: NullableStringFieldUpdateOperationsInput; } diff --git a/@generated/profile/profile-unchecked-update-one-without-user.input.ts b/@generated/profile/profile-unchecked-update-one-without-user.input.ts index ffbcdd2e..afb646e5 100644 --- a/@generated/profile/profile-unchecked-update-one-without-user.input.ts +++ b/@generated/profile/profile-unchecked-update-one-without-user.input.ts @@ -8,24 +8,24 @@ import { ProfileUpdateWithoutUserInput } from './profile-update-without-user.inp @InputType() export class ProfileUncheckedUpdateOneWithoutUserInput { - @Field(() => ProfileCreateWithoutUserInput, { nullable: true }) - create?: ProfileCreateWithoutUserInput; + @Field(() => ProfileCreateWithoutUserInput, { nullable: true }) + create?: ProfileCreateWithoutUserInput; - @Field(() => ProfileCreateOrConnectWithoutUserInput, { nullable: true }) - connectOrCreate?: ProfileCreateOrConnectWithoutUserInput; + @Field(() => ProfileCreateOrConnectWithoutUserInput, { nullable: true }) + connectOrCreate?: ProfileCreateOrConnectWithoutUserInput; - @Field(() => ProfileUpsertWithoutUserInput, { nullable: true }) - upsert?: ProfileUpsertWithoutUserInput; + @Field(() => ProfileUpsertWithoutUserInput, { nullable: true }) + upsert?: ProfileUpsertWithoutUserInput; - @Field(() => Boolean, { nullable: true }) - disconnect?: boolean; + @Field(() => Boolean, { nullable: true }) + disconnect?: boolean; - @Field(() => Boolean, { nullable: true }) - delete?: boolean; + @Field(() => Boolean, { nullable: true }) + delete?: boolean; - @Field(() => ProfileWhereUniqueInput, { nullable: true }) - connect?: ProfileWhereUniqueInput; + @Field(() => ProfileWhereUniqueInput, { nullable: true }) + connect?: ProfileWhereUniqueInput; - @Field(() => ProfileUpdateWithoutUserInput, { nullable: true }) - update?: ProfileUpdateWithoutUserInput; + @Field(() => ProfileUpdateWithoutUserInput, { nullable: true }) + update?: ProfileUpdateWithoutUserInput; } diff --git a/@generated/profile/profile-unchecked-update-without-user.input.ts b/@generated/profile/profile-unchecked-update-without-user.input.ts index a3d94770..a30554ad 100644 --- a/@generated/profile/profile-unchecked-update-without-user.input.ts +++ b/@generated/profile/profile-unchecked-update-without-user.input.ts @@ -5,9 +5,9 @@ import { NullableStringFieldUpdateOperationsInput } from '../prisma/nullable-str @InputType() export class ProfileUncheckedUpdateWithoutUserInput { - @Field(() => IntFieldUpdateOperationsInput, { nullable: true }) - id?: IntFieldUpdateOperationsInput; + @Field(() => IntFieldUpdateOperationsInput, { nullable: true }) + id?: IntFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - dummy?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + dummy?: NullableStringFieldUpdateOperationsInput; } diff --git a/@generated/profile/profile-unchecked-update.input.ts b/@generated/profile/profile-unchecked-update.input.ts index f2754132..5f3319d4 100644 --- a/@generated/profile/profile-unchecked-update.input.ts +++ b/@generated/profile/profile-unchecked-update.input.ts @@ -6,12 +6,12 @@ import { NullableStringFieldUpdateOperationsInput } from '../prisma/nullable-str @InputType() export class ProfileUncheckedUpdateInput { - @Field(() => IntFieldUpdateOperationsInput, { nullable: true }) - id?: IntFieldUpdateOperationsInput; + @Field(() => IntFieldUpdateOperationsInput, { nullable: true }) + id?: IntFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - userId?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + userId?: StringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - dummy?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + dummy?: NullableStringFieldUpdateOperationsInput; } diff --git a/@generated/profile/profile-update-many-mutation.input.ts b/@generated/profile/profile-update-many-mutation.input.ts index 9ff7ad69..9cfcb125 100644 --- a/@generated/profile/profile-update-many-mutation.input.ts +++ b/@generated/profile/profile-update-many-mutation.input.ts @@ -4,6 +4,6 @@ import { NullableStringFieldUpdateOperationsInput } from '../prisma/nullable-str @InputType() export class ProfileUpdateManyMutationInput { - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - dummy?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + dummy?: NullableStringFieldUpdateOperationsInput; } diff --git a/@generated/profile/profile-update-one-without-user.input.ts b/@generated/profile/profile-update-one-without-user.input.ts index db2c37e3..f5f0d129 100644 --- a/@generated/profile/profile-update-one-without-user.input.ts +++ b/@generated/profile/profile-update-one-without-user.input.ts @@ -8,24 +8,24 @@ import { ProfileUpdateWithoutUserInput } from './profile-update-without-user.inp @InputType() export class ProfileUpdateOneWithoutUserInput { - @Field(() => ProfileCreateWithoutUserInput, { nullable: true }) - create?: ProfileCreateWithoutUserInput; + @Field(() => ProfileCreateWithoutUserInput, { nullable: true }) + create?: ProfileCreateWithoutUserInput; - @Field(() => ProfileCreateOrConnectWithoutUserInput, { nullable: true }) - connectOrCreate?: ProfileCreateOrConnectWithoutUserInput; + @Field(() => ProfileCreateOrConnectWithoutUserInput, { nullable: true }) + connectOrCreate?: ProfileCreateOrConnectWithoutUserInput; - @Field(() => ProfileUpsertWithoutUserInput, { nullable: true }) - upsert?: ProfileUpsertWithoutUserInput; + @Field(() => ProfileUpsertWithoutUserInput, { nullable: true }) + upsert?: ProfileUpsertWithoutUserInput; - @Field(() => Boolean, { nullable: true }) - disconnect?: boolean; + @Field(() => Boolean, { nullable: true }) + disconnect?: boolean; - @Field(() => Boolean, { nullable: true }) - delete?: boolean; + @Field(() => Boolean, { nullable: true }) + delete?: boolean; - @Field(() => ProfileWhereUniqueInput, { nullable: true }) - connect?: ProfileWhereUniqueInput; + @Field(() => ProfileWhereUniqueInput, { nullable: true }) + connect?: ProfileWhereUniqueInput; - @Field(() => ProfileUpdateWithoutUserInput, { nullable: true }) - update?: ProfileUpdateWithoutUserInput; + @Field(() => ProfileUpdateWithoutUserInput, { nullable: true }) + update?: ProfileUpdateWithoutUserInput; } diff --git a/@generated/profile/profile-update-without-user.input.ts b/@generated/profile/profile-update-without-user.input.ts index 90e2dffb..1449585e 100644 --- a/@generated/profile/profile-update-without-user.input.ts +++ b/@generated/profile/profile-update-without-user.input.ts @@ -4,6 +4,6 @@ import { NullableStringFieldUpdateOperationsInput } from '../prisma/nullable-str @InputType() export class ProfileUpdateWithoutUserInput { - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - dummy?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + dummy?: NullableStringFieldUpdateOperationsInput; } diff --git a/@generated/profile/profile-update.input.ts b/@generated/profile/profile-update.input.ts index 429b6997..2a656cc3 100644 --- a/@generated/profile/profile-update.input.ts +++ b/@generated/profile/profile-update.input.ts @@ -5,9 +5,9 @@ import { NullableStringFieldUpdateOperationsInput } from '../prisma/nullable-str @InputType() export class ProfileUpdateInput { - @Field(() => UserUpdateOneRequiredWithoutProfileInput, { nullable: true }) - user?: UserUpdateOneRequiredWithoutProfileInput; + @Field(() => UserUpdateOneRequiredWithoutProfileInput, { nullable: true }) + user?: UserUpdateOneRequiredWithoutProfileInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - dummy?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + dummy?: NullableStringFieldUpdateOperationsInput; } diff --git a/@generated/profile/profile-upsert-without-user.input.ts b/@generated/profile/profile-upsert-without-user.input.ts index 3ae5bbcd..ea4aa960 100644 --- a/@generated/profile/profile-upsert-without-user.input.ts +++ b/@generated/profile/profile-upsert-without-user.input.ts @@ -5,9 +5,9 @@ import { ProfileCreateWithoutUserInput } from './profile-create-without-user.inp @InputType() export class ProfileUpsertWithoutUserInput { - @Field(() => ProfileUpdateWithoutUserInput, { nullable: false }) - update!: ProfileUpdateWithoutUserInput; + @Field(() => ProfileUpdateWithoutUserInput, { nullable: false }) + update!: ProfileUpdateWithoutUserInput; - @Field(() => ProfileCreateWithoutUserInput, { nullable: false }) - create!: ProfileCreateWithoutUserInput; + @Field(() => ProfileCreateWithoutUserInput, { nullable: false }) + create!: ProfileCreateWithoutUserInput; } diff --git a/@generated/profile/profile-where-unique.input.ts b/@generated/profile/profile-where-unique.input.ts index 3099ac38..36ae023b 100644 --- a/@generated/profile/profile-where-unique.input.ts +++ b/@generated/profile/profile-where-unique.input.ts @@ -4,9 +4,9 @@ import { Int } from '@nestjs/graphql'; @InputType() export class ProfileWhereUniqueInput { - @Field(() => Int, { nullable: true }) - id?: number; + @Field(() => Int, { nullable: true }) + id?: number; - @Field(() => String, { nullable: true }) - userId?: string; + @Field(() => String, { nullable: true }) + userId?: string; } diff --git a/@generated/profile/profile-where.input.ts b/@generated/profile/profile-where.input.ts index 7984f9fc..79bba383 100644 --- a/@generated/profile/profile-where.input.ts +++ b/@generated/profile/profile-where.input.ts @@ -7,24 +7,24 @@ import { StringNullableFilter } from '../prisma/string-nullable-filter.input'; @InputType() export class ProfileWhereInput { - @Field(() => [ProfileWhereInput], { nullable: true }) - AND?: Array; + @Field(() => [ProfileWhereInput], { nullable: true }) + AND?: Array; - @Field(() => [ProfileWhereInput], { nullable: true }) - OR?: Array; + @Field(() => [ProfileWhereInput], { nullable: true }) + OR?: Array; - @Field(() => [ProfileWhereInput], { nullable: true }) - NOT?: Array; + @Field(() => [ProfileWhereInput], { nullable: true }) + NOT?: Array; - @Field(() => IntFilter, { nullable: true }) - id?: IntFilter; + @Field(() => IntFilter, { nullable: true }) + id?: IntFilter; - @Field(() => UserWhereInput, { nullable: true }) - user?: UserWhereInput; + @Field(() => UserWhereInput, { nullable: true }) + user?: UserWhereInput; - @Field(() => StringFilter, { nullable: true }) - userId?: StringFilter; + @Field(() => StringFilter, { nullable: true }) + userId?: StringFilter; - @Field(() => StringNullableFilter, { nullable: true }) - dummy?: StringNullableFilter; + @Field(() => StringNullableFilter, { nullable: true }) + dummy?: StringNullableFilter; } diff --git a/@generated/profile/profile.model.ts b/@generated/profile/profile.model.ts index 95d8d019..8e1d5d70 100644 --- a/@generated/profile/profile.model.ts +++ b/@generated/profile/profile.model.ts @@ -5,15 +5,15 @@ import { User } from '../user/user.model'; @ObjectType() export class Profile { - @Field(() => ID, { nullable: false }) - id!: number; + @Field(() => ID, { nullable: false }) + id!: number; - @Field(() => User, { nullable: false }) - user?: User; + @Field(() => User, { nullable: false }) + user?: User; - @Field(() => String, { nullable: false }) - userId!: string; + @Field(() => String, { nullable: false }) + userId!: string; - @Field(() => String, { nullable: true }) - dummy!: string | null; + @Field(() => String, { nullable: true }) + dummy!: string | null; } diff --git a/@generated/profile/update-many-profile.args.ts b/@generated/profile/update-many-profile.args.ts index 8ffbf3c0..bc420e49 100644 --- a/@generated/profile/update-many-profile.args.ts +++ b/@generated/profile/update-many-profile.args.ts @@ -5,9 +5,9 @@ import { ProfileWhereInput } from './profile-where.input'; @ArgsType() export class UpdateManyProfileArgs { - @Field(() => ProfileUpdateManyMutationInput, { nullable: false }) - data!: ProfileUpdateManyMutationInput; + @Field(() => ProfileUpdateManyMutationInput, { nullable: false }) + data!: ProfileUpdateManyMutationInput; - @Field(() => ProfileWhereInput, { nullable: true }) - where?: ProfileWhereInput; + @Field(() => ProfileWhereInput, { nullable: true }) + where?: ProfileWhereInput; } diff --git a/@generated/profile/update-one-profile.args.ts b/@generated/profile/update-one-profile.args.ts index a77714eb..589209eb 100644 --- a/@generated/profile/update-one-profile.args.ts +++ b/@generated/profile/update-one-profile.args.ts @@ -5,9 +5,9 @@ import { ProfileWhereUniqueInput } from './profile-where-unique.input'; @ArgsType() export class UpdateOneProfileArgs { - @Field(() => ProfileUpdateInput, { nullable: false }) - data!: ProfileUpdateInput; + @Field(() => ProfileUpdateInput, { nullable: false }) + data!: ProfileUpdateInput; - @Field(() => ProfileWhereUniqueInput, { nullable: false }) - where!: ProfileWhereUniqueInput; + @Field(() => ProfileWhereUniqueInput, { nullable: false }) + where!: ProfileWhereUniqueInput; } diff --git a/@generated/profile/upsert-one-profile.args.ts b/@generated/profile/upsert-one-profile.args.ts index 2f1ccdd3..1061c862 100644 --- a/@generated/profile/upsert-one-profile.args.ts +++ b/@generated/profile/upsert-one-profile.args.ts @@ -6,12 +6,12 @@ import { ProfileUpdateInput } from './profile-update.input'; @ArgsType() export class UpsertOneProfileArgs { - @Field(() => ProfileWhereUniqueInput, { nullable: false }) - where!: ProfileWhereUniqueInput; + @Field(() => ProfileWhereUniqueInput, { nullable: false }) + where!: ProfileWhereUniqueInput; - @Field(() => ProfileCreateInput, { nullable: false }) - create!: ProfileCreateInput; + @Field(() => ProfileCreateInput, { nullable: false }) + create!: ProfileCreateInput; - @Field(() => ProfileUpdateInput, { nullable: false }) - update!: ProfileUpdateInput; + @Field(() => ProfileUpdateInput, { nullable: false }) + update!: ProfileUpdateInput; } diff --git a/@generated/tag/aggregate-tag.output.ts b/@generated/tag/aggregate-tag.output.ts index 755683b4..fd38ff81 100644 --- a/@generated/tag/aggregate-tag.output.ts +++ b/@generated/tag/aggregate-tag.output.ts @@ -6,12 +6,12 @@ import { TagMaxAggregate } from './tag-max-aggregate.output'; @ObjectType() export class AggregateTag { - @Field(() => TagCountAggregate, { nullable: true }) - _count?: TagCountAggregate; + @Field(() => TagCountAggregate, { nullable: true }) + _count?: TagCountAggregate; - @Field(() => TagMinAggregate, { nullable: true }) - _min?: TagMinAggregate; + @Field(() => TagMinAggregate, { nullable: true }) + _min?: TagMinAggregate; - @Field(() => TagMaxAggregate, { nullable: true }) - _max?: TagMaxAggregate; + @Field(() => TagMaxAggregate, { nullable: true }) + _max?: TagMaxAggregate; } diff --git a/@generated/tag/create-many-tag.args.ts b/@generated/tag/create-many-tag.args.ts index 8d7a8ff8..e66b94f5 100644 --- a/@generated/tag/create-many-tag.args.ts +++ b/@generated/tag/create-many-tag.args.ts @@ -4,9 +4,9 @@ import { TagCreateManyInput } from './tag-create-many.input'; @ArgsType() export class CreateManyTagArgs { - @Field(() => [TagCreateManyInput], { nullable: false }) - data!: Array; + @Field(() => [TagCreateManyInput], { nullable: false }) + data!: Array; - @Field(() => Boolean, { nullable: true }) - skipDuplicates?: boolean; + @Field(() => Boolean, { nullable: true }) + skipDuplicates?: boolean; } diff --git a/@generated/tag/create-one-tag.args.ts b/@generated/tag/create-one-tag.args.ts index 90864746..e7f33279 100644 --- a/@generated/tag/create-one-tag.args.ts +++ b/@generated/tag/create-one-tag.args.ts @@ -4,6 +4,6 @@ import { TagCreateInput } from './tag-create.input'; @ArgsType() export class CreateOneTagArgs { - @Field(() => TagCreateInput, { nullable: false }) - data!: TagCreateInput; + @Field(() => TagCreateInput, { nullable: false }) + data!: TagCreateInput; } diff --git a/@generated/tag/delete-many-tag.args.ts b/@generated/tag/delete-many-tag.args.ts index 2b43187b..01a57621 100644 --- a/@generated/tag/delete-many-tag.args.ts +++ b/@generated/tag/delete-many-tag.args.ts @@ -4,6 +4,6 @@ import { TagWhereInput } from './tag-where.input'; @ArgsType() export class DeleteManyTagArgs { - @Field(() => TagWhereInput, { nullable: true }) - where?: TagWhereInput; + @Field(() => TagWhereInput, { nullable: true }) + where?: TagWhereInput; } diff --git a/@generated/tag/delete-one-tag.args.ts b/@generated/tag/delete-one-tag.args.ts index be443041..b83d2705 100644 --- a/@generated/tag/delete-one-tag.args.ts +++ b/@generated/tag/delete-one-tag.args.ts @@ -4,6 +4,6 @@ import { TagWhereUniqueInput } from './tag-where-unique.input'; @ArgsType() export class DeleteOneTagArgs { - @Field(() => TagWhereUniqueInput, { nullable: false }) - where!: TagWhereUniqueInput; + @Field(() => TagWhereUniqueInput, { nullable: false }) + where!: TagWhereUniqueInput; } diff --git a/@generated/tag/find-first-tag.args.ts b/@generated/tag/find-first-tag.args.ts index 169d09f5..71adf08a 100644 --- a/@generated/tag/find-first-tag.args.ts +++ b/@generated/tag/find-first-tag.args.ts @@ -8,21 +8,21 @@ import { TagScalarFieldEnum } from './tag-scalar-field.enum'; @ArgsType() export class FindFirstTagArgs { - @Field(() => TagWhereInput, { nullable: true }) - where?: TagWhereInput; + @Field(() => TagWhereInput, { nullable: true }) + where?: TagWhereInput; - @Field(() => [TagOrderByWithRelationAndSearchRelevanceInput], { nullable: true }) - orderBy?: Array; + @Field(() => [TagOrderByWithRelationAndSearchRelevanceInput], { nullable: true }) + orderBy?: Array; - @Field(() => TagWhereUniqueInput, { nullable: true }) - cursor?: TagWhereUniqueInput; + @Field(() => TagWhereUniqueInput, { nullable: true }) + cursor?: TagWhereUniqueInput; - @Field(() => Int, { nullable: true }) - take?: number; + @Field(() => Int, { nullable: true }) + take?: number; - @Field(() => Int, { nullable: true }) - skip?: number; + @Field(() => Int, { nullable: true }) + skip?: number; - @Field(() => [TagScalarFieldEnum], { nullable: true }) - distinct?: Array; + @Field(() => [TagScalarFieldEnum], { nullable: true }) + distinct?: Array; } diff --git a/@generated/tag/find-many-tag.args.ts b/@generated/tag/find-many-tag.args.ts index 6be229a8..ba91e2b7 100644 --- a/@generated/tag/find-many-tag.args.ts +++ b/@generated/tag/find-many-tag.args.ts @@ -8,21 +8,21 @@ import { TagScalarFieldEnum } from './tag-scalar-field.enum'; @ArgsType() export class FindManyTagArgs { - @Field(() => TagWhereInput, { nullable: true }) - where?: TagWhereInput; + @Field(() => TagWhereInput, { nullable: true }) + where?: TagWhereInput; - @Field(() => [TagOrderByWithRelationAndSearchRelevanceInput], { nullable: true }) - orderBy?: Array; + @Field(() => [TagOrderByWithRelationAndSearchRelevanceInput], { nullable: true }) + orderBy?: Array; - @Field(() => TagWhereUniqueInput, { nullable: true }) - cursor?: TagWhereUniqueInput; + @Field(() => TagWhereUniqueInput, { nullable: true }) + cursor?: TagWhereUniqueInput; - @Field(() => Int, { nullable: true }) - take?: number; + @Field(() => Int, { nullable: true }) + take?: number; - @Field(() => Int, { nullable: true }) - skip?: number; + @Field(() => Int, { nullable: true }) + skip?: number; - @Field(() => [TagScalarFieldEnum], { nullable: true }) - distinct?: Array; + @Field(() => [TagScalarFieldEnum], { nullable: true }) + distinct?: Array; } diff --git a/@generated/tag/find-unique-tag.args.ts b/@generated/tag/find-unique-tag.args.ts index f2b7a257..103c1290 100644 --- a/@generated/tag/find-unique-tag.args.ts +++ b/@generated/tag/find-unique-tag.args.ts @@ -4,6 +4,6 @@ import { TagWhereUniqueInput } from './tag-where-unique.input'; @ArgsType() export class FindUniqueTagArgs { - @Field(() => TagWhereUniqueInput, { nullable: false }) - where!: TagWhereUniqueInput; + @Field(() => TagWhereUniqueInput, { nullable: false }) + where!: TagWhereUniqueInput; } diff --git a/@generated/tag/tag-aggregate.args.ts b/@generated/tag/tag-aggregate.args.ts index 751b1d34..2791cddd 100644 --- a/@generated/tag/tag-aggregate.args.ts +++ b/@generated/tag/tag-aggregate.args.ts @@ -10,27 +10,27 @@ import { TagMaxAggregateInput } from './tag-max-aggregate.input'; @ArgsType() export class TagAggregateArgs { - @Field(() => TagWhereInput, { nullable: true }) - where?: TagWhereInput; + @Field(() => TagWhereInput, { nullable: true }) + where?: TagWhereInput; - @Field(() => [TagOrderByWithRelationAndSearchRelevanceInput], { nullable: true }) - orderBy?: Array; + @Field(() => [TagOrderByWithRelationAndSearchRelevanceInput], { nullable: true }) + orderBy?: Array; - @Field(() => TagWhereUniqueInput, { nullable: true }) - cursor?: TagWhereUniqueInput; + @Field(() => TagWhereUniqueInput, { nullable: true }) + cursor?: TagWhereUniqueInput; - @Field(() => Int, { nullable: true }) - take?: number; + @Field(() => Int, { nullable: true }) + take?: number; - @Field(() => Int, { nullable: true }) - skip?: number; + @Field(() => Int, { nullable: true }) + skip?: number; - @Field(() => TagCountAggregateInput, { nullable: true }) - _count?: TagCountAggregateInput; + @Field(() => TagCountAggregateInput, { nullable: true }) + _count?: TagCountAggregateInput; - @Field(() => TagMinAggregateInput, { nullable: true }) - _min?: TagMinAggregateInput; + @Field(() => TagMinAggregateInput, { nullable: true }) + _min?: TagMinAggregateInput; - @Field(() => TagMaxAggregateInput, { nullable: true }) - _max?: TagMaxAggregateInput; + @Field(() => TagMaxAggregateInput, { nullable: true }) + _max?: TagMaxAggregateInput; } diff --git a/@generated/tag/tag-count-aggregate.input.ts b/@generated/tag/tag-count-aggregate.input.ts index 6b657031..fde9183d 100644 --- a/@generated/tag/tag-count-aggregate.input.ts +++ b/@generated/tag/tag-count-aggregate.input.ts @@ -3,12 +3,12 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class TagCountAggregateInput { - @Field(() => Boolean, { nullable: true }) - id?: true; + @Field(() => Boolean, { nullable: true }) + id?: true; - @Field(() => Boolean, { nullable: true }) - name?: true; + @Field(() => Boolean, { nullable: true }) + name?: true; - @Field(() => Boolean, { nullable: true }) - _all?: true; + @Field(() => Boolean, { nullable: true }) + _all?: true; } diff --git a/@generated/tag/tag-count-aggregate.output.ts b/@generated/tag/tag-count-aggregate.output.ts index 1ddb43aa..fb5c7371 100644 --- a/@generated/tag/tag-count-aggregate.output.ts +++ b/@generated/tag/tag-count-aggregate.output.ts @@ -4,12 +4,12 @@ import { Int } from '@nestjs/graphql'; @ObjectType() export class TagCountAggregate { - @Field(() => Int, { nullable: false }) - id!: number; + @Field(() => Int, { nullable: false }) + id!: number; - @Field(() => Int, { nullable: false }) - name!: number; + @Field(() => Int, { nullable: false }) + name!: number; - @Field(() => Int, { nullable: false }) - _all!: number; + @Field(() => Int, { nullable: false }) + _all!: number; } diff --git a/@generated/tag/tag-count-order-by-aggregate.input.ts b/@generated/tag/tag-count-order-by-aggregate.input.ts index f7493164..da954e5e 100644 --- a/@generated/tag/tag-count-order-by-aggregate.input.ts +++ b/@generated/tag/tag-count-order-by-aggregate.input.ts @@ -4,9 +4,9 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class TagCountOrderByAggregateInput { - @Field(() => SortOrder, { nullable: true }) - id?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + id?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - name?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + name?: keyof typeof SortOrder; } diff --git a/@generated/tag/tag-count.output.ts b/@generated/tag/tag-count.output.ts index 8af6069a..ac89ff91 100644 --- a/@generated/tag/tag-count.output.ts +++ b/@generated/tag/tag-count.output.ts @@ -4,6 +4,6 @@ import { Int } from '@nestjs/graphql'; @ObjectType() export class TagCount { - @Field(() => Int, { nullable: false }) - articles?: number; + @Field(() => Int, { nullable: false }) + articles?: number; } diff --git a/@generated/tag/tag-create-many.input.ts b/@generated/tag/tag-create-many.input.ts index 39f00f66..a38f5fed 100644 --- a/@generated/tag/tag-create-many.input.ts +++ b/@generated/tag/tag-create-many.input.ts @@ -3,9 +3,9 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class TagCreateManyInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => String, { nullable: false }) - name!: string; + @Field(() => String, { nullable: false }) + name!: string; } diff --git a/@generated/tag/tag-create-nested-many-without-articles.input.ts b/@generated/tag/tag-create-nested-many-without-articles.input.ts index 5a3b21f1..07966f69 100644 --- a/@generated/tag/tag-create-nested-many-without-articles.input.ts +++ b/@generated/tag/tag-create-nested-many-without-articles.input.ts @@ -6,12 +6,12 @@ import { TagWhereUniqueInput } from './tag-where-unique.input'; @InputType() export class TagCreateNestedManyWithoutArticlesInput { - @Field(() => [TagCreateWithoutArticlesInput], { nullable: true }) - create?: Array; + @Field(() => [TagCreateWithoutArticlesInput], { nullable: true }) + create?: Array; - @Field(() => [TagCreateOrConnectWithoutArticlesInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [TagCreateOrConnectWithoutArticlesInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => [TagWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [TagWhereUniqueInput], { nullable: true }) + connect?: Array; } diff --git a/@generated/tag/tag-create-or-connect-without-articles.input.ts b/@generated/tag/tag-create-or-connect-without-articles.input.ts index 5c6ec613..b045008b 100644 --- a/@generated/tag/tag-create-or-connect-without-articles.input.ts +++ b/@generated/tag/tag-create-or-connect-without-articles.input.ts @@ -5,9 +5,9 @@ import { TagCreateWithoutArticlesInput } from './tag-create-without-articles.inp @InputType() export class TagCreateOrConnectWithoutArticlesInput { - @Field(() => TagWhereUniqueInput, { nullable: false }) - where!: TagWhereUniqueInput; + @Field(() => TagWhereUniqueInput, { nullable: false }) + where!: TagWhereUniqueInput; - @Field(() => TagCreateWithoutArticlesInput, { nullable: false }) - create!: TagCreateWithoutArticlesInput; + @Field(() => TagCreateWithoutArticlesInput, { nullable: false }) + create!: TagCreateWithoutArticlesInput; } diff --git a/@generated/tag/tag-create-without-articles.input.ts b/@generated/tag/tag-create-without-articles.input.ts index 89ab0af1..b8824ab9 100644 --- a/@generated/tag/tag-create-without-articles.input.ts +++ b/@generated/tag/tag-create-without-articles.input.ts @@ -3,9 +3,9 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class TagCreateWithoutArticlesInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => String, { nullable: false }) - name!: string; + @Field(() => String, { nullable: false }) + name!: string; } diff --git a/@generated/tag/tag-create.input.ts b/@generated/tag/tag-create.input.ts index 6ec48262..4b0bdc6b 100644 --- a/@generated/tag/tag-create.input.ts +++ b/@generated/tag/tag-create.input.ts @@ -4,12 +4,12 @@ import { ArticleCreateNestedManyWithoutTagsInput } from '../article/article-crea @InputType() export class TagCreateInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => String, { nullable: false }) - name!: string; + @Field(() => String, { nullable: false }) + name!: string; - @Field(() => ArticleCreateNestedManyWithoutTagsInput, { nullable: true }) - articles?: ArticleCreateNestedManyWithoutTagsInput; + @Field(() => ArticleCreateNestedManyWithoutTagsInput, { nullable: true }) + articles?: ArticleCreateNestedManyWithoutTagsInput; } diff --git a/@generated/tag/tag-group-by.args.ts b/@generated/tag/tag-group-by.args.ts index 5f96567e..41340972 100644 --- a/@generated/tag/tag-group-by.args.ts +++ b/@generated/tag/tag-group-by.args.ts @@ -11,30 +11,30 @@ import { TagMaxAggregateInput } from './tag-max-aggregate.input'; @ArgsType() export class TagGroupByArgs { - @Field(() => TagWhereInput, { nullable: true }) - where?: TagWhereInput; + @Field(() => TagWhereInput, { nullable: true }) + where?: TagWhereInput; - @Field(() => [TagOrderByWithAggregationInput], { nullable: true }) - orderBy?: Array; + @Field(() => [TagOrderByWithAggregationInput], { nullable: true }) + orderBy?: Array; - @Field(() => [TagScalarFieldEnum], { nullable: false }) - by!: Array; + @Field(() => [TagScalarFieldEnum], { nullable: false }) + by!: Array; - @Field(() => TagScalarWhereWithAggregatesInput, { nullable: true }) - having?: TagScalarWhereWithAggregatesInput; + @Field(() => TagScalarWhereWithAggregatesInput, { nullable: true }) + having?: TagScalarWhereWithAggregatesInput; - @Field(() => Int, { nullable: true }) - take?: number; + @Field(() => Int, { nullable: true }) + take?: number; - @Field(() => Int, { nullable: true }) - skip?: number; + @Field(() => Int, { nullable: true }) + skip?: number; - @Field(() => TagCountAggregateInput, { nullable: true }) - _count?: TagCountAggregateInput; + @Field(() => TagCountAggregateInput, { nullable: true }) + _count?: TagCountAggregateInput; - @Field(() => TagMinAggregateInput, { nullable: true }) - _min?: TagMinAggregateInput; + @Field(() => TagMinAggregateInput, { nullable: true }) + _min?: TagMinAggregateInput; - @Field(() => TagMaxAggregateInput, { nullable: true }) - _max?: TagMaxAggregateInput; + @Field(() => TagMaxAggregateInput, { nullable: true }) + _max?: TagMaxAggregateInput; } diff --git a/@generated/tag/tag-group-by.output.ts b/@generated/tag/tag-group-by.output.ts index c09a2e44..accaaad3 100644 --- a/@generated/tag/tag-group-by.output.ts +++ b/@generated/tag/tag-group-by.output.ts @@ -6,18 +6,18 @@ import { TagMaxAggregate } from './tag-max-aggregate.output'; @ObjectType() export class TagGroupBy { - @Field(() => String, { nullable: false }) - id!: string; + @Field(() => String, { nullable: false }) + id!: string; - @Field(() => String, { nullable: false }) - name!: string; + @Field(() => String, { nullable: false }) + name!: string; - @Field(() => TagCountAggregate, { nullable: true }) - _count?: TagCountAggregate; + @Field(() => TagCountAggregate, { nullable: true }) + _count?: TagCountAggregate; - @Field(() => TagMinAggregate, { nullable: true }) - _min?: TagMinAggregate; + @Field(() => TagMinAggregate, { nullable: true }) + _min?: TagMinAggregate; - @Field(() => TagMaxAggregate, { nullable: true }) - _max?: TagMaxAggregate; + @Field(() => TagMaxAggregate, { nullable: true }) + _max?: TagMaxAggregate; } diff --git a/@generated/tag/tag-list-relation-filter.input.ts b/@generated/tag/tag-list-relation-filter.input.ts index 8649ae03..1d19d5db 100644 --- a/@generated/tag/tag-list-relation-filter.input.ts +++ b/@generated/tag/tag-list-relation-filter.input.ts @@ -4,12 +4,12 @@ import { TagWhereInput } from './tag-where.input'; @InputType() export class TagListRelationFilter { - @Field(() => TagWhereInput, { nullable: true }) - every?: TagWhereInput; + @Field(() => TagWhereInput, { nullable: true }) + every?: TagWhereInput; - @Field(() => TagWhereInput, { nullable: true }) - some?: TagWhereInput; + @Field(() => TagWhereInput, { nullable: true }) + some?: TagWhereInput; - @Field(() => TagWhereInput, { nullable: true }) - none?: TagWhereInput; + @Field(() => TagWhereInput, { nullable: true }) + none?: TagWhereInput; } diff --git a/@generated/tag/tag-max-aggregate.input.ts b/@generated/tag/tag-max-aggregate.input.ts index 924a5b81..556641ab 100644 --- a/@generated/tag/tag-max-aggregate.input.ts +++ b/@generated/tag/tag-max-aggregate.input.ts @@ -3,9 +3,9 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class TagMaxAggregateInput { - @Field(() => Boolean, { nullable: true }) - id?: true; + @Field(() => Boolean, { nullable: true }) + id?: true; - @Field(() => Boolean, { nullable: true }) - name?: true; + @Field(() => Boolean, { nullable: true }) + name?: true; } diff --git a/@generated/tag/tag-max-aggregate.output.ts b/@generated/tag/tag-max-aggregate.output.ts index 47aefa38..e5d8e8ba 100644 --- a/@generated/tag/tag-max-aggregate.output.ts +++ b/@generated/tag/tag-max-aggregate.output.ts @@ -3,9 +3,9 @@ import { ObjectType } from '@nestjs/graphql'; @ObjectType() export class TagMaxAggregate { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => String, { nullable: true }) - name?: string; + @Field(() => String, { nullable: true }) + name?: string; } diff --git a/@generated/tag/tag-max-order-by-aggregate.input.ts b/@generated/tag/tag-max-order-by-aggregate.input.ts index 006d269e..48bf1460 100644 --- a/@generated/tag/tag-max-order-by-aggregate.input.ts +++ b/@generated/tag/tag-max-order-by-aggregate.input.ts @@ -4,9 +4,9 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class TagMaxOrderByAggregateInput { - @Field(() => SortOrder, { nullable: true }) - id?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + id?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - name?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + name?: keyof typeof SortOrder; } diff --git a/@generated/tag/tag-min-aggregate.input.ts b/@generated/tag/tag-min-aggregate.input.ts index 7229d132..250b2d83 100644 --- a/@generated/tag/tag-min-aggregate.input.ts +++ b/@generated/tag/tag-min-aggregate.input.ts @@ -3,9 +3,9 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class TagMinAggregateInput { - @Field(() => Boolean, { nullable: true }) - id?: true; + @Field(() => Boolean, { nullable: true }) + id?: true; - @Field(() => Boolean, { nullable: true }) - name?: true; + @Field(() => Boolean, { nullable: true }) + name?: true; } diff --git a/@generated/tag/tag-min-aggregate.output.ts b/@generated/tag/tag-min-aggregate.output.ts index 64572ee1..af609aca 100644 --- a/@generated/tag/tag-min-aggregate.output.ts +++ b/@generated/tag/tag-min-aggregate.output.ts @@ -3,9 +3,9 @@ import { ObjectType } from '@nestjs/graphql'; @ObjectType() export class TagMinAggregate { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => String, { nullable: true }) - name?: string; + @Field(() => String, { nullable: true }) + name?: string; } diff --git a/@generated/tag/tag-min-order-by-aggregate.input.ts b/@generated/tag/tag-min-order-by-aggregate.input.ts index 5b3483be..d15ea0d5 100644 --- a/@generated/tag/tag-min-order-by-aggregate.input.ts +++ b/@generated/tag/tag-min-order-by-aggregate.input.ts @@ -4,9 +4,9 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class TagMinOrderByAggregateInput { - @Field(() => SortOrder, { nullable: true }) - id?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + id?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - name?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + name?: keyof typeof SortOrder; } diff --git a/@generated/tag/tag-order-by-relation-aggregate.input.ts b/@generated/tag/tag-order-by-relation-aggregate.input.ts index 4884d803..576d1f03 100644 --- a/@generated/tag/tag-order-by-relation-aggregate.input.ts +++ b/@generated/tag/tag-order-by-relation-aggregate.input.ts @@ -4,6 +4,6 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class TagOrderByRelationAggregateInput { - @Field(() => SortOrder, { nullable: true }) - _count?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + _count?: keyof typeof SortOrder; } diff --git a/@generated/tag/tag-order-by-relevance-field.enum.ts b/@generated/tag/tag-order-by-relevance-field.enum.ts index 19e62896..2c04c1fe 100644 --- a/@generated/tag/tag-order-by-relevance-field.enum.ts +++ b/@generated/tag/tag-order-by-relevance-field.enum.ts @@ -1,11 +1,11 @@ import { registerEnumType } from '@nestjs/graphql'; export enum TagOrderByRelevanceFieldEnum { - id = 'id', - name = 'name', + id = 'id', + name = 'name', } registerEnumType(TagOrderByRelevanceFieldEnum, { - name: 'TagOrderByRelevanceFieldEnum', - description: undefined, + name: 'TagOrderByRelevanceFieldEnum', + description: undefined, }); diff --git a/@generated/tag/tag-order-by-relevance.input.ts b/@generated/tag/tag-order-by-relevance.input.ts index 3b492966..b5dd3264 100644 --- a/@generated/tag/tag-order-by-relevance.input.ts +++ b/@generated/tag/tag-order-by-relevance.input.ts @@ -5,12 +5,12 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class TagOrderByRelevanceInput { - @Field(() => [TagOrderByRelevanceFieldEnum], { nullable: false }) - fields!: Array; + @Field(() => [TagOrderByRelevanceFieldEnum], { nullable: false }) + fields!: Array; - @Field(() => SortOrder, { nullable: false }) - sort!: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: false }) + sort!: keyof typeof SortOrder; - @Field(() => String, { nullable: false }) - search!: string; + @Field(() => String, { nullable: false }) + search!: string; } diff --git a/@generated/tag/tag-order-by-with-aggregation.input.ts b/@generated/tag/tag-order-by-with-aggregation.input.ts index 3f4ecd3d..8768040a 100644 --- a/@generated/tag/tag-order-by-with-aggregation.input.ts +++ b/@generated/tag/tag-order-by-with-aggregation.input.ts @@ -7,18 +7,18 @@ import { TagMinOrderByAggregateInput } from './tag-min-order-by-aggregate.input' @InputType() export class TagOrderByWithAggregationInput { - @Field(() => SortOrder, { nullable: true }) - id?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + id?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - name?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + name?: keyof typeof SortOrder; - @Field(() => TagCountOrderByAggregateInput, { nullable: true }) - _count?: TagCountOrderByAggregateInput; + @Field(() => TagCountOrderByAggregateInput, { nullable: true }) + _count?: TagCountOrderByAggregateInput; - @Field(() => TagMaxOrderByAggregateInput, { nullable: true }) - _max?: TagMaxOrderByAggregateInput; + @Field(() => TagMaxOrderByAggregateInput, { nullable: true }) + _max?: TagMaxOrderByAggregateInput; - @Field(() => TagMinOrderByAggregateInput, { nullable: true }) - _min?: TagMinOrderByAggregateInput; + @Field(() => TagMinOrderByAggregateInput, { nullable: true }) + _min?: TagMinOrderByAggregateInput; } diff --git a/@generated/tag/tag-order-by-with-relation-and-search-relevance.input.ts b/@generated/tag/tag-order-by-with-relation-and-search-relevance.input.ts index ed55be71..e998a346 100644 --- a/@generated/tag/tag-order-by-with-relation-and-search-relevance.input.ts +++ b/@generated/tag/tag-order-by-with-relation-and-search-relevance.input.ts @@ -6,15 +6,15 @@ import { TagOrderByRelevanceInput } from './tag-order-by-relevance.input'; @InputType() export class TagOrderByWithRelationAndSearchRelevanceInput { - @Field(() => SortOrder, { nullable: true }) - id?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + id?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - name?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + name?: keyof typeof SortOrder; - @Field(() => ArticleOrderByRelationAggregateInput, { nullable: true }) - articles?: ArticleOrderByRelationAggregateInput; + @Field(() => ArticleOrderByRelationAggregateInput, { nullable: true }) + articles?: ArticleOrderByRelationAggregateInput; - @Field(() => TagOrderByRelevanceInput, { nullable: true }) - _relevance?: TagOrderByRelevanceInput; + @Field(() => TagOrderByRelevanceInput, { nullable: true }) + _relevance?: TagOrderByRelevanceInput; } diff --git a/@generated/tag/tag-scalar-field.enum.ts b/@generated/tag/tag-scalar-field.enum.ts index 927789ba..e49ca050 100644 --- a/@generated/tag/tag-scalar-field.enum.ts +++ b/@generated/tag/tag-scalar-field.enum.ts @@ -1,11 +1,11 @@ import { registerEnumType } from '@nestjs/graphql'; export enum TagScalarFieldEnum { - id = 'id', - name = 'name', + id = 'id', + name = 'name', } registerEnumType(TagScalarFieldEnum, { - name: 'TagScalarFieldEnum', - description: undefined, + name: 'TagScalarFieldEnum', + description: undefined, }); diff --git a/@generated/tag/tag-scalar-where-with-aggregates.input.ts b/@generated/tag/tag-scalar-where-with-aggregates.input.ts index f3982559..df8e2014 100644 --- a/@generated/tag/tag-scalar-where-with-aggregates.input.ts +++ b/@generated/tag/tag-scalar-where-with-aggregates.input.ts @@ -4,18 +4,18 @@ import { StringWithAggregatesFilter } from '../prisma/string-with-aggregates-fil @InputType() export class TagScalarWhereWithAggregatesInput { - @Field(() => [TagScalarWhereWithAggregatesInput], { nullable: true }) - AND?: Array; + @Field(() => [TagScalarWhereWithAggregatesInput], { nullable: true }) + AND?: Array; - @Field(() => [TagScalarWhereWithAggregatesInput], { nullable: true }) - OR?: Array; + @Field(() => [TagScalarWhereWithAggregatesInput], { nullable: true }) + OR?: Array; - @Field(() => [TagScalarWhereWithAggregatesInput], { nullable: true }) - NOT?: Array; + @Field(() => [TagScalarWhereWithAggregatesInput], { nullable: true }) + NOT?: Array; - @Field(() => StringWithAggregatesFilter, { nullable: true }) - id?: StringWithAggregatesFilter; + @Field(() => StringWithAggregatesFilter, { nullable: true }) + id?: StringWithAggregatesFilter; - @Field(() => StringWithAggregatesFilter, { nullable: true }) - name?: StringWithAggregatesFilter; + @Field(() => StringWithAggregatesFilter, { nullable: true }) + name?: StringWithAggregatesFilter; } diff --git a/@generated/tag/tag-scalar-where.input.ts b/@generated/tag/tag-scalar-where.input.ts index cbbf89db..eab7bb2a 100644 --- a/@generated/tag/tag-scalar-where.input.ts +++ b/@generated/tag/tag-scalar-where.input.ts @@ -4,18 +4,18 @@ import { StringFilter } from '../prisma/string-filter.input'; @InputType() export class TagScalarWhereInput { - @Field(() => [TagScalarWhereInput], { nullable: true }) - AND?: Array; + @Field(() => [TagScalarWhereInput], { nullable: true }) + AND?: Array; - @Field(() => [TagScalarWhereInput], { nullable: true }) - OR?: Array; + @Field(() => [TagScalarWhereInput], { nullable: true }) + OR?: Array; - @Field(() => [TagScalarWhereInput], { nullable: true }) - NOT?: Array; + @Field(() => [TagScalarWhereInput], { nullable: true }) + NOT?: Array; - @Field(() => StringFilter, { nullable: true }) - id?: StringFilter; + @Field(() => StringFilter, { nullable: true }) + id?: StringFilter; - @Field(() => StringFilter, { nullable: true }) - name?: StringFilter; + @Field(() => StringFilter, { nullable: true }) + name?: StringFilter; } diff --git a/@generated/tag/tag-unchecked-create-nested-many-without-articles.input.ts b/@generated/tag/tag-unchecked-create-nested-many-without-articles.input.ts index 838d64fc..3367ac7c 100644 --- a/@generated/tag/tag-unchecked-create-nested-many-without-articles.input.ts +++ b/@generated/tag/tag-unchecked-create-nested-many-without-articles.input.ts @@ -6,12 +6,12 @@ import { TagWhereUniqueInput } from './tag-where-unique.input'; @InputType() export class TagUncheckedCreateNestedManyWithoutArticlesInput { - @Field(() => [TagCreateWithoutArticlesInput], { nullable: true }) - create?: Array; + @Field(() => [TagCreateWithoutArticlesInput], { nullable: true }) + create?: Array; - @Field(() => [TagCreateOrConnectWithoutArticlesInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [TagCreateOrConnectWithoutArticlesInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => [TagWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [TagWhereUniqueInput], { nullable: true }) + connect?: Array; } diff --git a/@generated/tag/tag-unchecked-create-without-articles.input.ts b/@generated/tag/tag-unchecked-create-without-articles.input.ts index ab7e24d8..31b42f36 100644 --- a/@generated/tag/tag-unchecked-create-without-articles.input.ts +++ b/@generated/tag/tag-unchecked-create-without-articles.input.ts @@ -3,9 +3,9 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class TagUncheckedCreateWithoutArticlesInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => String, { nullable: false }) - name!: string; + @Field(() => String, { nullable: false }) + name!: string; } diff --git a/@generated/tag/tag-unchecked-create.input.ts b/@generated/tag/tag-unchecked-create.input.ts index f4da15d7..118e2931 100644 --- a/@generated/tag/tag-unchecked-create.input.ts +++ b/@generated/tag/tag-unchecked-create.input.ts @@ -4,12 +4,12 @@ import { ArticleUncheckedCreateNestedManyWithoutTagsInput } from '../article/art @InputType() export class TagUncheckedCreateInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => String, { nullable: false }) - name!: string; + @Field(() => String, { nullable: false }) + name!: string; - @Field(() => ArticleUncheckedCreateNestedManyWithoutTagsInput, { nullable: true }) - articles?: ArticleUncheckedCreateNestedManyWithoutTagsInput; + @Field(() => ArticleUncheckedCreateNestedManyWithoutTagsInput, { nullable: true }) + articles?: ArticleUncheckedCreateNestedManyWithoutTagsInput; } diff --git a/@generated/tag/tag-unchecked-update-many-without-articles.input.ts b/@generated/tag/tag-unchecked-update-many-without-articles.input.ts index b2619ef1..eb70052f 100644 --- a/@generated/tag/tag-unchecked-update-many-without-articles.input.ts +++ b/@generated/tag/tag-unchecked-update-many-without-articles.input.ts @@ -10,33 +10,33 @@ import { TagScalarWhereInput } from './tag-scalar-where.input'; @InputType() export class TagUncheckedUpdateManyWithoutArticlesInput { - @Field(() => [TagCreateWithoutArticlesInput], { nullable: true }) - create?: Array; + @Field(() => [TagCreateWithoutArticlesInput], { nullable: true }) + create?: Array; - @Field(() => [TagCreateOrConnectWithoutArticlesInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [TagCreateOrConnectWithoutArticlesInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => [TagUpsertWithWhereUniqueWithoutArticlesInput], { nullable: true }) - upsert?: Array; + @Field(() => [TagUpsertWithWhereUniqueWithoutArticlesInput], { nullable: true }) + upsert?: Array; - @Field(() => [TagWhereUniqueInput], { nullable: true }) - set?: Array; + @Field(() => [TagWhereUniqueInput], { nullable: true }) + set?: Array; - @Field(() => [TagWhereUniqueInput], { nullable: true }) - disconnect?: Array; + @Field(() => [TagWhereUniqueInput], { nullable: true }) + disconnect?: Array; - @Field(() => [TagWhereUniqueInput], { nullable: true }) - delete?: Array; + @Field(() => [TagWhereUniqueInput], { nullable: true }) + delete?: Array; - @Field(() => [TagWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [TagWhereUniqueInput], { nullable: true }) + connect?: Array; - @Field(() => [TagUpdateWithWhereUniqueWithoutArticlesInput], { nullable: true }) - update?: Array; + @Field(() => [TagUpdateWithWhereUniqueWithoutArticlesInput], { nullable: true }) + update?: Array; - @Field(() => [TagUpdateManyWithWhereWithoutArticlesInput], { nullable: true }) - updateMany?: Array; + @Field(() => [TagUpdateManyWithWhereWithoutArticlesInput], { nullable: true }) + updateMany?: Array; - @Field(() => [TagScalarWhereInput], { nullable: true }) - deleteMany?: Array; + @Field(() => [TagScalarWhereInput], { nullable: true }) + deleteMany?: Array; } diff --git a/@generated/tag/tag-unchecked-update-many-without-tags.input.ts b/@generated/tag/tag-unchecked-update-many-without-tags.input.ts index 404e26d9..b8121799 100644 --- a/@generated/tag/tag-unchecked-update-many-without-tags.input.ts +++ b/@generated/tag/tag-unchecked-update-many-without-tags.input.ts @@ -4,9 +4,9 @@ import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update- @InputType() export class TagUncheckedUpdateManyWithoutTagsInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - name?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + name?: StringFieldUpdateOperationsInput; } diff --git a/@generated/tag/tag-unchecked-update-many.input.ts b/@generated/tag/tag-unchecked-update-many.input.ts index 0700f7c7..92dcbb15 100644 --- a/@generated/tag/tag-unchecked-update-many.input.ts +++ b/@generated/tag/tag-unchecked-update-many.input.ts @@ -4,9 +4,9 @@ import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update- @InputType() export class TagUncheckedUpdateManyInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - name?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + name?: StringFieldUpdateOperationsInput; } diff --git a/@generated/tag/tag-unchecked-update-without-articles.input.ts b/@generated/tag/tag-unchecked-update-without-articles.input.ts index e72389bc..ee1b6a8b 100644 --- a/@generated/tag/tag-unchecked-update-without-articles.input.ts +++ b/@generated/tag/tag-unchecked-update-without-articles.input.ts @@ -4,9 +4,9 @@ import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update- @InputType() export class TagUncheckedUpdateWithoutArticlesInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - name?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + name?: StringFieldUpdateOperationsInput; } diff --git a/@generated/tag/tag-unchecked-update.input.ts b/@generated/tag/tag-unchecked-update.input.ts index 4fe91e39..29bc5562 100644 --- a/@generated/tag/tag-unchecked-update.input.ts +++ b/@generated/tag/tag-unchecked-update.input.ts @@ -5,12 +5,12 @@ import { ArticleUncheckedUpdateManyWithoutTagsInput } from '../article/article-u @InputType() export class TagUncheckedUpdateInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - name?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + name?: StringFieldUpdateOperationsInput; - @Field(() => ArticleUncheckedUpdateManyWithoutTagsInput, { nullable: true }) - articles?: ArticleUncheckedUpdateManyWithoutTagsInput; + @Field(() => ArticleUncheckedUpdateManyWithoutTagsInput, { nullable: true }) + articles?: ArticleUncheckedUpdateManyWithoutTagsInput; } diff --git a/@generated/tag/tag-update-many-mutation.input.ts b/@generated/tag/tag-update-many-mutation.input.ts index 878b980d..57a402fa 100644 --- a/@generated/tag/tag-update-many-mutation.input.ts +++ b/@generated/tag/tag-update-many-mutation.input.ts @@ -4,9 +4,9 @@ import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update- @InputType() export class TagUpdateManyMutationInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - name?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + name?: StringFieldUpdateOperationsInput; } diff --git a/@generated/tag/tag-update-many-with-where-without-articles.input.ts b/@generated/tag/tag-update-many-with-where-without-articles.input.ts index b8b0e036..62691be8 100644 --- a/@generated/tag/tag-update-many-with-where-without-articles.input.ts +++ b/@generated/tag/tag-update-many-with-where-without-articles.input.ts @@ -5,9 +5,9 @@ import { TagUpdateManyMutationInput } from './tag-update-many-mutation.input'; @InputType() export class TagUpdateManyWithWhereWithoutArticlesInput { - @Field(() => TagScalarWhereInput, { nullable: false }) - where!: TagScalarWhereInput; + @Field(() => TagScalarWhereInput, { nullable: false }) + where!: TagScalarWhereInput; - @Field(() => TagUpdateManyMutationInput, { nullable: false }) - data!: TagUpdateManyMutationInput; + @Field(() => TagUpdateManyMutationInput, { nullable: false }) + data!: TagUpdateManyMutationInput; } diff --git a/@generated/tag/tag-update-many-without-articles.input.ts b/@generated/tag/tag-update-many-without-articles.input.ts index 4a61e947..1978685a 100644 --- a/@generated/tag/tag-update-many-without-articles.input.ts +++ b/@generated/tag/tag-update-many-without-articles.input.ts @@ -10,33 +10,33 @@ import { TagScalarWhereInput } from './tag-scalar-where.input'; @InputType() export class TagUpdateManyWithoutArticlesInput { - @Field(() => [TagCreateWithoutArticlesInput], { nullable: true }) - create?: Array; + @Field(() => [TagCreateWithoutArticlesInput], { nullable: true }) + create?: Array; - @Field(() => [TagCreateOrConnectWithoutArticlesInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [TagCreateOrConnectWithoutArticlesInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => [TagUpsertWithWhereUniqueWithoutArticlesInput], { nullable: true }) - upsert?: Array; + @Field(() => [TagUpsertWithWhereUniqueWithoutArticlesInput], { nullable: true }) + upsert?: Array; - @Field(() => [TagWhereUniqueInput], { nullable: true }) - set?: Array; + @Field(() => [TagWhereUniqueInput], { nullable: true }) + set?: Array; - @Field(() => [TagWhereUniqueInput], { nullable: true }) - disconnect?: Array; + @Field(() => [TagWhereUniqueInput], { nullable: true }) + disconnect?: Array; - @Field(() => [TagWhereUniqueInput], { nullable: true }) - delete?: Array; + @Field(() => [TagWhereUniqueInput], { nullable: true }) + delete?: Array; - @Field(() => [TagWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [TagWhereUniqueInput], { nullable: true }) + connect?: Array; - @Field(() => [TagUpdateWithWhereUniqueWithoutArticlesInput], { nullable: true }) - update?: Array; + @Field(() => [TagUpdateWithWhereUniqueWithoutArticlesInput], { nullable: true }) + update?: Array; - @Field(() => [TagUpdateManyWithWhereWithoutArticlesInput], { nullable: true }) - updateMany?: Array; + @Field(() => [TagUpdateManyWithWhereWithoutArticlesInput], { nullable: true }) + updateMany?: Array; - @Field(() => [TagScalarWhereInput], { nullable: true }) - deleteMany?: Array; + @Field(() => [TagScalarWhereInput], { nullable: true }) + deleteMany?: Array; } diff --git a/@generated/tag/tag-update-with-where-unique-without-articles.input.ts b/@generated/tag/tag-update-with-where-unique-without-articles.input.ts index ce05fc2c..395cc8a3 100644 --- a/@generated/tag/tag-update-with-where-unique-without-articles.input.ts +++ b/@generated/tag/tag-update-with-where-unique-without-articles.input.ts @@ -5,9 +5,9 @@ import { TagUpdateWithoutArticlesInput } from './tag-update-without-articles.inp @InputType() export class TagUpdateWithWhereUniqueWithoutArticlesInput { - @Field(() => TagWhereUniqueInput, { nullable: false }) - where!: TagWhereUniqueInput; + @Field(() => TagWhereUniqueInput, { nullable: false }) + where!: TagWhereUniqueInput; - @Field(() => TagUpdateWithoutArticlesInput, { nullable: false }) - data!: TagUpdateWithoutArticlesInput; + @Field(() => TagUpdateWithoutArticlesInput, { nullable: false }) + data!: TagUpdateWithoutArticlesInput; } diff --git a/@generated/tag/tag-update-without-articles.input.ts b/@generated/tag/tag-update-without-articles.input.ts index 4eca4145..66f81a2c 100644 --- a/@generated/tag/tag-update-without-articles.input.ts +++ b/@generated/tag/tag-update-without-articles.input.ts @@ -4,9 +4,9 @@ import { StringFieldUpdateOperationsInput } from '../prisma/string-field-update- @InputType() export class TagUpdateWithoutArticlesInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - name?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + name?: StringFieldUpdateOperationsInput; } diff --git a/@generated/tag/tag-update.input.ts b/@generated/tag/tag-update.input.ts index 66652850..47a1188b 100644 --- a/@generated/tag/tag-update.input.ts +++ b/@generated/tag/tag-update.input.ts @@ -5,12 +5,12 @@ import { ArticleUpdateManyWithoutTagsInput } from '../article/article-update-man @InputType() export class TagUpdateInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - name?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + name?: StringFieldUpdateOperationsInput; - @Field(() => ArticleUpdateManyWithoutTagsInput, { nullable: true }) - articles?: ArticleUpdateManyWithoutTagsInput; + @Field(() => ArticleUpdateManyWithoutTagsInput, { nullable: true }) + articles?: ArticleUpdateManyWithoutTagsInput; } diff --git a/@generated/tag/tag-upsert-with-where-unique-without-articles.input.ts b/@generated/tag/tag-upsert-with-where-unique-without-articles.input.ts index 12385bf0..5c25d46f 100644 --- a/@generated/tag/tag-upsert-with-where-unique-without-articles.input.ts +++ b/@generated/tag/tag-upsert-with-where-unique-without-articles.input.ts @@ -6,12 +6,12 @@ import { TagCreateWithoutArticlesInput } from './tag-create-without-articles.inp @InputType() export class TagUpsertWithWhereUniqueWithoutArticlesInput { - @Field(() => TagWhereUniqueInput, { nullable: false }) - where!: TagWhereUniqueInput; + @Field(() => TagWhereUniqueInput, { nullable: false }) + where!: TagWhereUniqueInput; - @Field(() => TagUpdateWithoutArticlesInput, { nullable: false }) - update!: TagUpdateWithoutArticlesInput; + @Field(() => TagUpdateWithoutArticlesInput, { nullable: false }) + update!: TagUpdateWithoutArticlesInput; - @Field(() => TagCreateWithoutArticlesInput, { nullable: false }) - create!: TagCreateWithoutArticlesInput; + @Field(() => TagCreateWithoutArticlesInput, { nullable: false }) + create!: TagCreateWithoutArticlesInput; } diff --git a/@generated/tag/tag-where-unique.input.ts b/@generated/tag/tag-where-unique.input.ts index 3555c20b..fbb14a3d 100644 --- a/@generated/tag/tag-where-unique.input.ts +++ b/@generated/tag/tag-where-unique.input.ts @@ -3,9 +3,9 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class TagWhereUniqueInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => String, { nullable: true }) - name?: string; + @Field(() => String, { nullable: true }) + name?: string; } diff --git a/@generated/tag/tag-where.input.ts b/@generated/tag/tag-where.input.ts index 1ded6ebf..4b4b7804 100644 --- a/@generated/tag/tag-where.input.ts +++ b/@generated/tag/tag-where.input.ts @@ -5,21 +5,21 @@ import { ArticleListRelationFilter } from '../article/article-list-relation-filt @InputType() export class TagWhereInput { - @Field(() => [TagWhereInput], { nullable: true }) - AND?: Array; + @Field(() => [TagWhereInput], { nullable: true }) + AND?: Array; - @Field(() => [TagWhereInput], { nullable: true }) - OR?: Array; + @Field(() => [TagWhereInput], { nullable: true }) + OR?: Array; - @Field(() => [TagWhereInput], { nullable: true }) - NOT?: Array; + @Field(() => [TagWhereInput], { nullable: true }) + NOT?: Array; - @Field(() => StringFilter, { nullable: true }) - id?: StringFilter; + @Field(() => StringFilter, { nullable: true }) + id?: StringFilter; - @Field(() => StringFilter, { nullable: true }) - name?: StringFilter; + @Field(() => StringFilter, { nullable: true }) + name?: StringFilter; - @Field(() => ArticleListRelationFilter, { nullable: true }) - articles?: ArticleListRelationFilter; + @Field(() => ArticleListRelationFilter, { nullable: true }) + articles?: ArticleListRelationFilter; } diff --git a/@generated/tag/tag.model.ts b/@generated/tag/tag.model.ts index 0641864a..04baf382 100644 --- a/@generated/tag/tag.model.ts +++ b/@generated/tag/tag.model.ts @@ -6,15 +6,15 @@ import { TagCount } from './tag-count.output'; @ObjectType() export class Tag { - @Field(() => ID, { nullable: false }) - id!: string; + @Field(() => ID, { nullable: false }) + id!: string; - @Field(() => String, { nullable: false }) - name!: string; + @Field(() => String, { nullable: false }) + name!: string; - @Field(() => [Article], { nullable: true }) - articles?: Array
; + @Field(() => [Article], { nullable: true }) + articles?: Array
; - @Field(() => TagCount, { nullable: false }) - _count?: TagCount; + @Field(() => TagCount, { nullable: false }) + _count?: TagCount; } diff --git a/@generated/tag/update-many-tag.args.ts b/@generated/tag/update-many-tag.args.ts index faf2a735..3b4cb206 100644 --- a/@generated/tag/update-many-tag.args.ts +++ b/@generated/tag/update-many-tag.args.ts @@ -5,9 +5,9 @@ import { TagWhereInput } from './tag-where.input'; @ArgsType() export class UpdateManyTagArgs { - @Field(() => TagUpdateManyMutationInput, { nullable: false }) - data!: TagUpdateManyMutationInput; + @Field(() => TagUpdateManyMutationInput, { nullable: false }) + data!: TagUpdateManyMutationInput; - @Field(() => TagWhereInput, { nullable: true }) - where?: TagWhereInput; + @Field(() => TagWhereInput, { nullable: true }) + where?: TagWhereInput; } diff --git a/@generated/tag/update-one-tag.args.ts b/@generated/tag/update-one-tag.args.ts index 8663c83c..aa382510 100644 --- a/@generated/tag/update-one-tag.args.ts +++ b/@generated/tag/update-one-tag.args.ts @@ -5,9 +5,9 @@ import { TagWhereUniqueInput } from './tag-where-unique.input'; @ArgsType() export class UpdateOneTagArgs { - @Field(() => TagUpdateInput, { nullable: false }) - data!: TagUpdateInput; + @Field(() => TagUpdateInput, { nullable: false }) + data!: TagUpdateInput; - @Field(() => TagWhereUniqueInput, { nullable: false }) - where!: TagWhereUniqueInput; + @Field(() => TagWhereUniqueInput, { nullable: false }) + where!: TagWhereUniqueInput; } diff --git a/@generated/tag/upsert-one-tag.args.ts b/@generated/tag/upsert-one-tag.args.ts index 2a52acef..986ae508 100644 --- a/@generated/tag/upsert-one-tag.args.ts +++ b/@generated/tag/upsert-one-tag.args.ts @@ -6,12 +6,12 @@ import { TagUpdateInput } from './tag-update.input'; @ArgsType() export class UpsertOneTagArgs { - @Field(() => TagWhereUniqueInput, { nullable: false }) - where!: TagWhereUniqueInput; + @Field(() => TagWhereUniqueInput, { nullable: false }) + where!: TagWhereUniqueInput; - @Field(() => TagCreateInput, { nullable: false }) - create!: TagCreateInput; + @Field(() => TagCreateInput, { nullable: false }) + create!: TagCreateInput; - @Field(() => TagUpdateInput, { nullable: false }) - update!: TagUpdateInput; + @Field(() => TagUpdateInput, { nullable: false }) + update!: TagUpdateInput; } diff --git a/@generated/user/aggregate-user.output.ts b/@generated/user/aggregate-user.output.ts index 436cbc08..e4980e71 100644 --- a/@generated/user/aggregate-user.output.ts +++ b/@generated/user/aggregate-user.output.ts @@ -8,18 +8,18 @@ import { UserMaxAggregate } from './user-max-aggregate.output'; @ObjectType() export class AggregateUser { - @Field(() => UserCountAggregate, { nullable: true }) - _count?: UserCountAggregate; + @Field(() => UserCountAggregate, { nullable: true }) + _count?: UserCountAggregate; - @Field(() => UserAvgAggregate, { nullable: true }) - _avg?: UserAvgAggregate; + @Field(() => UserAvgAggregate, { nullable: true }) + _avg?: UserAvgAggregate; - @Field(() => UserSumAggregate, { nullable: true }) - _sum?: UserSumAggregate; + @Field(() => UserSumAggregate, { nullable: true }) + _sum?: UserSumAggregate; - @Field(() => UserMinAggregate, { nullable: true }) - _min?: UserMinAggregate; + @Field(() => UserMinAggregate, { nullable: true }) + _min?: UserMinAggregate; - @Field(() => UserMaxAggregate, { nullable: true }) - _max?: UserMaxAggregate; + @Field(() => UserMaxAggregate, { nullable: true }) + _max?: UserMaxAggregate; } diff --git a/@generated/user/create-many-user.args.ts b/@generated/user/create-many-user.args.ts index e9b65917..fb86735b 100644 --- a/@generated/user/create-many-user.args.ts +++ b/@generated/user/create-many-user.args.ts @@ -6,11 +6,11 @@ import { Type } from 'class-transformer'; @ArgsType() export class CreateManyUserArgs { - @Field(() => [UserCreateManyInput], { nullable: false }) - @ValidateNested() - @Type(() => UserCreateManyInput) - data!: Array; + @Field(() => [UserCreateManyInput], { nullable: false }) + @ValidateNested() + @Type(() => UserCreateManyInput) + data!: Array; - @Field(() => Boolean, { nullable: true }) - skipDuplicates?: boolean; + @Field(() => Boolean, { nullable: true }) + skipDuplicates?: boolean; } diff --git a/@generated/user/create-one-user.args.ts b/@generated/user/create-one-user.args.ts index 69ef71d8..08ca7275 100644 --- a/@generated/user/create-one-user.args.ts +++ b/@generated/user/create-one-user.args.ts @@ -6,8 +6,8 @@ import { Type } from 'class-transformer'; @ArgsType() export class CreateOneUserArgs { - @Field(() => UserCreateInput, { nullable: false }) - @ValidateNested() - @Type(() => UserCreateInput) - data!: UserCreateInput; + @Field(() => UserCreateInput, { nullable: false }) + @ValidateNested() + @Type(() => UserCreateInput) + data!: UserCreateInput; } diff --git a/@generated/user/delete-many-user.args.ts b/@generated/user/delete-many-user.args.ts index 9f4aa055..a7af8857 100644 --- a/@generated/user/delete-many-user.args.ts +++ b/@generated/user/delete-many-user.args.ts @@ -4,6 +4,6 @@ import { UserWhereInput } from './user-where.input'; @ArgsType() export class DeleteManyUserArgs { - @Field(() => UserWhereInput, { nullable: true }) - where?: UserWhereInput; + @Field(() => UserWhereInput, { nullable: true }) + where?: UserWhereInput; } diff --git a/@generated/user/delete-one-user.args.ts b/@generated/user/delete-one-user.args.ts index 83bea507..f3e7aaee 100644 --- a/@generated/user/delete-one-user.args.ts +++ b/@generated/user/delete-one-user.args.ts @@ -4,6 +4,6 @@ import { UserWhereUniqueInput } from './user-where-unique.input'; @ArgsType() export class DeleteOneUserArgs { - @Field(() => UserWhereUniqueInput, { nullable: false }) - where!: UserWhereUniqueInput; + @Field(() => UserWhereUniqueInput, { nullable: false }) + where!: UserWhereUniqueInput; } diff --git a/@generated/user/find-first-user.args.ts b/@generated/user/find-first-user.args.ts index 276c1480..1d712d49 100644 --- a/@generated/user/find-first-user.args.ts +++ b/@generated/user/find-first-user.args.ts @@ -8,21 +8,21 @@ import { UserScalarFieldEnum } from './user-scalar-field.enum'; @ArgsType() export class FindFirstUserArgs { - @Field(() => UserWhereInput, { nullable: true }) - where?: UserWhereInput; + @Field(() => UserWhereInput, { nullable: true }) + where?: UserWhereInput; - @Field(() => [UserOrderByWithRelationAndSearchRelevanceInput], { nullable: true }) - orderBy?: Array; + @Field(() => [UserOrderByWithRelationAndSearchRelevanceInput], { nullable: true }) + orderBy?: Array; - @Field(() => UserWhereUniqueInput, { nullable: true }) - cursor?: UserWhereUniqueInput; + @Field(() => UserWhereUniqueInput, { nullable: true }) + cursor?: UserWhereUniqueInput; - @Field(() => Int, { nullable: true }) - take?: number; + @Field(() => Int, { nullable: true }) + take?: number; - @Field(() => Int, { nullable: true }) - skip?: number; + @Field(() => Int, { nullable: true }) + skip?: number; - @Field(() => [UserScalarFieldEnum], { nullable: true }) - distinct?: Array; + @Field(() => [UserScalarFieldEnum], { nullable: true }) + distinct?: Array; } diff --git a/@generated/user/find-many-user.args.ts b/@generated/user/find-many-user.args.ts index 3f8b8485..48975ded 100644 --- a/@generated/user/find-many-user.args.ts +++ b/@generated/user/find-many-user.args.ts @@ -8,21 +8,21 @@ import { UserScalarFieldEnum } from './user-scalar-field.enum'; @ArgsType() export class FindManyUserArgs { - @Field(() => UserWhereInput, { nullable: true }) - where?: UserWhereInput; + @Field(() => UserWhereInput, { nullable: true }) + where?: UserWhereInput; - @Field(() => [UserOrderByWithRelationAndSearchRelevanceInput], { nullable: true }) - orderBy?: Array; + @Field(() => [UserOrderByWithRelationAndSearchRelevanceInput], { nullable: true }) + orderBy?: Array; - @Field(() => UserWhereUniqueInput, { nullable: true }) - cursor?: UserWhereUniqueInput; + @Field(() => UserWhereUniqueInput, { nullable: true }) + cursor?: UserWhereUniqueInput; - @Field(() => Int, { nullable: true }) - take?: number; + @Field(() => Int, { nullable: true }) + take?: number; - @Field(() => Int, { nullable: true }) - skip?: number; + @Field(() => Int, { nullable: true }) + skip?: number; - @Field(() => [UserScalarFieldEnum], { nullable: true }) - distinct?: Array; + @Field(() => [UserScalarFieldEnum], { nullable: true }) + distinct?: Array; } diff --git a/@generated/user/find-unique-user.args.ts b/@generated/user/find-unique-user.args.ts index 2da31b28..1abc6f9c 100644 --- a/@generated/user/find-unique-user.args.ts +++ b/@generated/user/find-unique-user.args.ts @@ -4,6 +4,6 @@ import { UserWhereUniqueInput } from './user-where-unique.input'; @ArgsType() export class FindUniqueUserArgs { - @Field(() => UserWhereUniqueInput, { nullable: false }) - where!: UserWhereUniqueInput; + @Field(() => UserWhereUniqueInput, { nullable: false }) + where!: UserWhereUniqueInput; } diff --git a/@generated/user/update-many-user.args.ts b/@generated/user/update-many-user.args.ts index 8d965558..2dd77542 100644 --- a/@generated/user/update-many-user.args.ts +++ b/@generated/user/update-many-user.args.ts @@ -5,9 +5,9 @@ import { UserWhereInput } from './user-where.input'; @ArgsType() export class UpdateManyUserArgs { - @Field(() => UserUpdateManyMutationInput, { nullable: false }) - data!: UserUpdateManyMutationInput; + @Field(() => UserUpdateManyMutationInput, { nullable: false }) + data!: UserUpdateManyMutationInput; - @Field(() => UserWhereInput, { nullable: true }) - where?: UserWhereInput; + @Field(() => UserWhereInput, { nullable: true }) + where?: UserWhereInput; } diff --git a/@generated/user/update-one-user.args.ts b/@generated/user/update-one-user.args.ts index 535d720e..1dfc97da 100644 --- a/@generated/user/update-one-user.args.ts +++ b/@generated/user/update-one-user.args.ts @@ -5,9 +5,9 @@ import { UserWhereUniqueInput } from './user-where-unique.input'; @ArgsType() export class UpdateOneUserArgs { - @Field(() => UserUpdateInput, { nullable: false }) - data!: UserUpdateInput; + @Field(() => UserUpdateInput, { nullable: false }) + data!: UserUpdateInput; - @Field(() => UserWhereUniqueInput, { nullable: false }) - where!: UserWhereUniqueInput; + @Field(() => UserWhereUniqueInput, { nullable: false }) + where!: UserWhereUniqueInput; } diff --git a/@generated/user/upsert-one-user.args.ts b/@generated/user/upsert-one-user.args.ts index cbea6030..db22697f 100644 --- a/@generated/user/upsert-one-user.args.ts +++ b/@generated/user/upsert-one-user.args.ts @@ -6,12 +6,12 @@ import { UserUpdateInput } from './user-update.input'; @ArgsType() export class UpsertOneUserArgs { - @Field(() => UserWhereUniqueInput, { nullable: false }) - where!: UserWhereUniqueInput; + @Field(() => UserWhereUniqueInput, { nullable: false }) + where!: UserWhereUniqueInput; - @Field(() => UserCreateInput, { nullable: false }) - create!: UserCreateInput; + @Field(() => UserCreateInput, { nullable: false }) + create!: UserCreateInput; - @Field(() => UserUpdateInput, { nullable: false }) - update!: UserUpdateInput; + @Field(() => UserUpdateInput, { nullable: false }) + update!: UserUpdateInput; } diff --git a/@generated/user/user-aggregate.args.ts b/@generated/user/user-aggregate.args.ts index 1f497d76..8ba685c3 100644 --- a/@generated/user/user-aggregate.args.ts +++ b/@generated/user/user-aggregate.args.ts @@ -12,33 +12,33 @@ import { UserMaxAggregateInput } from './user-max-aggregate.input'; @ArgsType() export class UserAggregateArgs { - @Field(() => UserWhereInput, { nullable: true }) - where?: UserWhereInput; + @Field(() => UserWhereInput, { nullable: true }) + where?: UserWhereInput; - @Field(() => [UserOrderByWithRelationAndSearchRelevanceInput], { nullable: true }) - orderBy?: Array; + @Field(() => [UserOrderByWithRelationAndSearchRelevanceInput], { nullable: true }) + orderBy?: Array; - @Field(() => UserWhereUniqueInput, { nullable: true }) - cursor?: UserWhereUniqueInput; + @Field(() => UserWhereUniqueInput, { nullable: true }) + cursor?: UserWhereUniqueInput; - @Field(() => Int, { nullable: true }) - take?: number; + @Field(() => Int, { nullable: true }) + take?: number; - @Field(() => Int, { nullable: true }) - skip?: number; + @Field(() => Int, { nullable: true }) + skip?: number; - @Field(() => UserCountAggregateInput, { nullable: true }) - _count?: UserCountAggregateInput; + @Field(() => UserCountAggregateInput, { nullable: true }) + _count?: UserCountAggregateInput; - @Field(() => UserAvgAggregateInput, { nullable: true }) - _avg?: UserAvgAggregateInput; + @Field(() => UserAvgAggregateInput, { nullable: true }) + _avg?: UserAvgAggregateInput; - @Field(() => UserSumAggregateInput, { nullable: true }) - _sum?: UserSumAggregateInput; + @Field(() => UserSumAggregateInput, { nullable: true }) + _sum?: UserSumAggregateInput; - @Field(() => UserMinAggregateInput, { nullable: true }) - _min?: UserMinAggregateInput; + @Field(() => UserMinAggregateInput, { nullable: true }) + _min?: UserMinAggregateInput; - @Field(() => UserMaxAggregateInput, { nullable: true }) - _max?: UserMaxAggregateInput; + @Field(() => UserMaxAggregateInput, { nullable: true }) + _max?: UserMaxAggregateInput; } diff --git a/@generated/user/user-avg-aggregate.input.ts b/@generated/user/user-avg-aggregate.input.ts index cfd60525..adb175c8 100644 --- a/@generated/user/user-avg-aggregate.input.ts +++ b/@generated/user/user-avg-aggregate.input.ts @@ -3,9 +3,9 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class UserAvgAggregateInput { - @Field(() => Boolean, { nullable: true }) - countComments?: true; + @Field(() => Boolean, { nullable: true }) + countComments?: true; - @Field(() => Boolean, { nullable: true }) - rating?: true; + @Field(() => Boolean, { nullable: true }) + rating?: true; } diff --git a/@generated/user/user-avg-aggregate.output.ts b/@generated/user/user-avg-aggregate.output.ts index 0ccee136..882c6b68 100644 --- a/@generated/user/user-avg-aggregate.output.ts +++ b/@generated/user/user-avg-aggregate.output.ts @@ -4,9 +4,9 @@ import { Float } from '@nestjs/graphql'; @ObjectType() export class UserAvgAggregate { - @Field(() => Float, { nullable: true }) - countComments?: number; + @Field(() => Float, { nullable: true }) + countComments?: number; - @Field(() => Float, { nullable: true }) - rating?: number; + @Field(() => Float, { nullable: true }) + rating?: number; } diff --git a/@generated/user/user-avg-order-by-aggregate.input.ts b/@generated/user/user-avg-order-by-aggregate.input.ts index ef7e48b3..3d582f51 100644 --- a/@generated/user/user-avg-order-by-aggregate.input.ts +++ b/@generated/user/user-avg-order-by-aggregate.input.ts @@ -4,9 +4,9 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class UserAvgOrderByAggregateInput { - @Field(() => SortOrder, { nullable: true }) - countComments?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + countComments?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - rating?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + rating?: keyof typeof SortOrder; } diff --git a/@generated/user/user-count-aggregate.input.ts b/@generated/user/user-count-aggregate.input.ts index 8431ab70..497d94f1 100644 --- a/@generated/user/user-count-aggregate.input.ts +++ b/@generated/user/user-count-aggregate.input.ts @@ -3,33 +3,33 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class UserCountAggregateInput { - @Field(() => Boolean, { nullable: true }) - id?: true; + @Field(() => Boolean, { nullable: true }) + id?: true; - @Field(() => Boolean, { nullable: true }) - email?: true; + @Field(() => Boolean, { nullable: true }) + email?: true; - @Field(() => Boolean, { nullable: true }) - name?: true; + @Field(() => Boolean, { nullable: true }) + name?: true; - @Field(() => Boolean, { nullable: true }) - password?: true; + @Field(() => Boolean, { nullable: true }) + password?: true; - @Field(() => Boolean, { nullable: true }) - bio?: true; + @Field(() => Boolean, { nullable: true }) + bio?: true; - @Field(() => Boolean, { nullable: true }) - image?: true; + @Field(() => Boolean, { nullable: true }) + image?: true; - @Field(() => Boolean, { nullable: true }) - countComments?: true; + @Field(() => Boolean, { nullable: true }) + countComments?: true; - @Field(() => Boolean, { nullable: true }) - rating?: true; + @Field(() => Boolean, { nullable: true }) + rating?: true; - @Field(() => Boolean, { nullable: true }) - role?: true; + @Field(() => Boolean, { nullable: true }) + role?: true; - @Field(() => Boolean, { nullable: true }) - _all?: true; + @Field(() => Boolean, { nullable: true }) + _all?: true; } diff --git a/@generated/user/user-count-aggregate.output.ts b/@generated/user/user-count-aggregate.output.ts index 0cf4fe39..06ecbbf9 100644 --- a/@generated/user/user-count-aggregate.output.ts +++ b/@generated/user/user-count-aggregate.output.ts @@ -5,33 +5,33 @@ import { HideField } from '@nestjs/graphql'; @ObjectType() export class UserCountAggregate { - @Field(() => Int, { nullable: false }) - id!: number; + @Field(() => Int, { nullable: false }) + id!: number; - @Field(() => Int, { nullable: false }) - email!: number; + @Field(() => Int, { nullable: false }) + email!: number; - @Field(() => Int, { nullable: false }) - name!: number; + @Field(() => Int, { nullable: false }) + name!: number; - @HideField() - password!: number; + @HideField() + password!: number; - @Field(() => Int, { nullable: false }) - bio!: number; + @Field(() => Int, { nullable: false }) + bio!: number; - @Field(() => Int, { nullable: false }) - image!: number; + @Field(() => Int, { nullable: false }) + image!: number; - @Field(() => Int, { nullable: false }) - countComments!: number; + @Field(() => Int, { nullable: false }) + countComments!: number; - @Field(() => Int, { nullable: false }) - rating!: number; + @Field(() => Int, { nullable: false }) + rating!: number; - @Field(() => Int, { nullable: false }) - role!: number; + @Field(() => Int, { nullable: false }) + role!: number; - @Field(() => Int, { nullable: false }) - _all!: number; + @Field(() => Int, { nullable: false }) + _all!: number; } diff --git a/@generated/user/user-count-order-by-aggregate.input.ts b/@generated/user/user-count-order-by-aggregate.input.ts index db2088ec..1d0a99d1 100644 --- a/@generated/user/user-count-order-by-aggregate.input.ts +++ b/@generated/user/user-count-order-by-aggregate.input.ts @@ -4,30 +4,30 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class UserCountOrderByAggregateInput { - @Field(() => SortOrder, { nullable: true }) - id?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + id?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - email?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + email?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - name?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + name?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - password?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + password?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - bio?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + bio?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - image?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + image?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - countComments?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + countComments?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - rating?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + rating?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - role?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + role?: keyof typeof SortOrder; } diff --git a/@generated/user/user-count.output.ts b/@generated/user/user-count.output.ts index 51891307..da705521 100644 --- a/@generated/user/user-count.output.ts +++ b/@generated/user/user-count.output.ts @@ -4,18 +4,18 @@ import { Int } from '@nestjs/graphql'; @ObjectType() export class UserCount { - @Field(() => Int, { nullable: false }) - following?: number; + @Field(() => Int, { nullable: false }) + following?: number; - @Field(() => Int, { nullable: false }) - followers?: number; + @Field(() => Int, { nullable: false }) + followers?: number; - @Field(() => Int, { nullable: false }) - favoriteArticles?: number; + @Field(() => Int, { nullable: false }) + favoriteArticles?: number; - @Field(() => Int, { nullable: false }) - articles?: number; + @Field(() => Int, { nullable: false }) + articles?: number; - @Field(() => Int, { nullable: false }) - comments?: number; + @Field(() => Int, { nullable: false }) + comments?: number; } diff --git a/@generated/user/user-create-many.input.ts b/@generated/user/user-create-many.input.ts index ec22c6c1..ac46bca2 100644 --- a/@generated/user/user-create-many.input.ts +++ b/@generated/user/user-create-many.input.ts @@ -8,32 +8,32 @@ import { Role } from '../prisma/role.enum'; @InputType() export class UserCreateManyInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => Scalars.GraphQLEmailAddress, { nullable: false }) - email!: string; + @Field(() => Scalars.GraphQLEmailAddress, { nullable: false }) + email!: string; - @Field(() => String, { nullable: false }) - @Validator.MinLength(3) - @Validator.MaxLength(50) - name!: string; + @Field(() => String, { nullable: false }) + @Validator.MinLength(3) + @Validator.MaxLength(50) + name!: string; - @Field(() => String, { nullable: false }) - password!: string; + @Field(() => String, { nullable: false }) + password!: string; - @Field(() => String, { nullable: true }) - bio?: string; + @Field(() => String, { nullable: true }) + bio?: string; - @Field(() => String, { nullable: true }) - image?: string; + @Field(() => String, { nullable: true }) + image?: string; - @Field(() => Int, { nullable: true }) - countComments?: number; + @Field(() => Int, { nullable: true }) + countComments?: number; - @Field(() => Float, { nullable: true }) - rating?: number; + @Field(() => Float, { nullable: true }) + rating?: number; - @Field(() => Role, { nullable: true }) - role?: keyof typeof Role; + @Field(() => Role, { nullable: true }) + role?: keyof typeof Role; } diff --git a/@generated/user/user-create-nested-many-without-favorite-articles.input.ts b/@generated/user/user-create-nested-many-without-favorite-articles.input.ts index c0f191b5..827a9bc5 100644 --- a/@generated/user/user-create-nested-many-without-favorite-articles.input.ts +++ b/@generated/user/user-create-nested-many-without-favorite-articles.input.ts @@ -6,12 +6,12 @@ import { UserWhereUniqueInput } from './user-where-unique.input'; @InputType() export class UserCreateNestedManyWithoutFavoriteArticlesInput { - @Field(() => [UserCreateWithoutFavoriteArticlesInput], { nullable: true }) - create?: Array; + @Field(() => [UserCreateWithoutFavoriteArticlesInput], { nullable: true }) + create?: Array; - @Field(() => [UserCreateOrConnectWithoutFavoriteArticlesInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [UserCreateOrConnectWithoutFavoriteArticlesInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => [UserWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [UserWhereUniqueInput], { nullable: true }) + connect?: Array; } diff --git a/@generated/user/user-create-nested-many-without-followers.input.ts b/@generated/user/user-create-nested-many-without-followers.input.ts index 5bc0af21..eb339316 100644 --- a/@generated/user/user-create-nested-many-without-followers.input.ts +++ b/@generated/user/user-create-nested-many-without-followers.input.ts @@ -6,12 +6,12 @@ import { UserWhereUniqueInput } from './user-where-unique.input'; @InputType() export class UserCreateNestedManyWithoutFollowersInput { - @Field(() => [UserCreateWithoutFollowersInput], { nullable: true }) - create?: Array; + @Field(() => [UserCreateWithoutFollowersInput], { nullable: true }) + create?: Array; - @Field(() => [UserCreateOrConnectWithoutFollowersInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [UserCreateOrConnectWithoutFollowersInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => [UserWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [UserWhereUniqueInput], { nullable: true }) + connect?: Array; } diff --git a/@generated/user/user-create-nested-many-without-following.input.ts b/@generated/user/user-create-nested-many-without-following.input.ts index 1a5e1492..3fa02885 100644 --- a/@generated/user/user-create-nested-many-without-following.input.ts +++ b/@generated/user/user-create-nested-many-without-following.input.ts @@ -6,12 +6,12 @@ import { UserWhereUniqueInput } from './user-where-unique.input'; @InputType() export class UserCreateNestedManyWithoutFollowingInput { - @Field(() => [UserCreateWithoutFollowingInput], { nullable: true }) - create?: Array; + @Field(() => [UserCreateWithoutFollowingInput], { nullable: true }) + create?: Array; - @Field(() => [UserCreateOrConnectWithoutFollowingInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [UserCreateOrConnectWithoutFollowingInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => [UserWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [UserWhereUniqueInput], { nullable: true }) + connect?: Array; } diff --git a/@generated/user/user-create-nested-one-without-articles.input.ts b/@generated/user/user-create-nested-one-without-articles.input.ts index 57a111d2..4db60542 100644 --- a/@generated/user/user-create-nested-one-without-articles.input.ts +++ b/@generated/user/user-create-nested-one-without-articles.input.ts @@ -6,12 +6,12 @@ import { UserWhereUniqueInput } from './user-where-unique.input'; @InputType() export class UserCreateNestedOneWithoutArticlesInput { - @Field(() => UserCreateWithoutArticlesInput, { nullable: true }) - create?: UserCreateWithoutArticlesInput; + @Field(() => UserCreateWithoutArticlesInput, { nullable: true }) + create?: UserCreateWithoutArticlesInput; - @Field(() => UserCreateOrConnectWithoutArticlesInput, { nullable: true }) - connectOrCreate?: UserCreateOrConnectWithoutArticlesInput; + @Field(() => UserCreateOrConnectWithoutArticlesInput, { nullable: true }) + connectOrCreate?: UserCreateOrConnectWithoutArticlesInput; - @Field(() => UserWhereUniqueInput, { nullable: true }) - connect?: UserWhereUniqueInput; + @Field(() => UserWhereUniqueInput, { nullable: true }) + connect?: UserWhereUniqueInput; } diff --git a/@generated/user/user-create-nested-one-without-comments.input.ts b/@generated/user/user-create-nested-one-without-comments.input.ts index a0b82fb5..46b11dd4 100644 --- a/@generated/user/user-create-nested-one-without-comments.input.ts +++ b/@generated/user/user-create-nested-one-without-comments.input.ts @@ -6,12 +6,12 @@ import { UserWhereUniqueInput } from './user-where-unique.input'; @InputType() export class UserCreateNestedOneWithoutCommentsInput { - @Field(() => UserCreateWithoutCommentsInput, { nullable: true }) - create?: UserCreateWithoutCommentsInput; + @Field(() => UserCreateWithoutCommentsInput, { nullable: true }) + create?: UserCreateWithoutCommentsInput; - @Field(() => UserCreateOrConnectWithoutCommentsInput, { nullable: true }) - connectOrCreate?: UserCreateOrConnectWithoutCommentsInput; + @Field(() => UserCreateOrConnectWithoutCommentsInput, { nullable: true }) + connectOrCreate?: UserCreateOrConnectWithoutCommentsInput; - @Field(() => UserWhereUniqueInput, { nullable: true }) - connect?: UserWhereUniqueInput; + @Field(() => UserWhereUniqueInput, { nullable: true }) + connect?: UserWhereUniqueInput; } diff --git a/@generated/user/user-create-nested-one-without-profile.input.ts b/@generated/user/user-create-nested-one-without-profile.input.ts index 3eb431af..28414e54 100644 --- a/@generated/user/user-create-nested-one-without-profile.input.ts +++ b/@generated/user/user-create-nested-one-without-profile.input.ts @@ -6,12 +6,12 @@ import { UserWhereUniqueInput } from './user-where-unique.input'; @InputType() export class UserCreateNestedOneWithoutProfileInput { - @Field(() => UserCreateWithoutProfileInput, { nullable: true }) - create?: UserCreateWithoutProfileInput; + @Field(() => UserCreateWithoutProfileInput, { nullable: true }) + create?: UserCreateWithoutProfileInput; - @Field(() => UserCreateOrConnectWithoutProfileInput, { nullable: true }) - connectOrCreate?: UserCreateOrConnectWithoutProfileInput; + @Field(() => UserCreateOrConnectWithoutProfileInput, { nullable: true }) + connectOrCreate?: UserCreateOrConnectWithoutProfileInput; - @Field(() => UserWhereUniqueInput, { nullable: true }) - connect?: UserWhereUniqueInput; + @Field(() => UserWhereUniqueInput, { nullable: true }) + connect?: UserWhereUniqueInput; } diff --git a/@generated/user/user-create-or-connect-without-articles.input.ts b/@generated/user/user-create-or-connect-without-articles.input.ts index 60591464..61c33ef2 100644 --- a/@generated/user/user-create-or-connect-without-articles.input.ts +++ b/@generated/user/user-create-or-connect-without-articles.input.ts @@ -5,9 +5,9 @@ import { UserCreateWithoutArticlesInput } from './user-create-without-articles.i @InputType() export class UserCreateOrConnectWithoutArticlesInput { - @Field(() => UserWhereUniqueInput, { nullable: false }) - where!: UserWhereUniqueInput; + @Field(() => UserWhereUniqueInput, { nullable: false }) + where!: UserWhereUniqueInput; - @Field(() => UserCreateWithoutArticlesInput, { nullable: false }) - create!: UserCreateWithoutArticlesInput; + @Field(() => UserCreateWithoutArticlesInput, { nullable: false }) + create!: UserCreateWithoutArticlesInput; } diff --git a/@generated/user/user-create-or-connect-without-comments.input.ts b/@generated/user/user-create-or-connect-without-comments.input.ts index 11ce26c2..a5d7eea0 100644 --- a/@generated/user/user-create-or-connect-without-comments.input.ts +++ b/@generated/user/user-create-or-connect-without-comments.input.ts @@ -5,9 +5,9 @@ import { UserCreateWithoutCommentsInput } from './user-create-without-comments.i @InputType() export class UserCreateOrConnectWithoutCommentsInput { - @Field(() => UserWhereUniqueInput, { nullable: false }) - where!: UserWhereUniqueInput; + @Field(() => UserWhereUniqueInput, { nullable: false }) + where!: UserWhereUniqueInput; - @Field(() => UserCreateWithoutCommentsInput, { nullable: false }) - create!: UserCreateWithoutCommentsInput; + @Field(() => UserCreateWithoutCommentsInput, { nullable: false }) + create!: UserCreateWithoutCommentsInput; } diff --git a/@generated/user/user-create-or-connect-without-favorite-articles.input.ts b/@generated/user/user-create-or-connect-without-favorite-articles.input.ts index daf15f0b..5931240b 100644 --- a/@generated/user/user-create-or-connect-without-favorite-articles.input.ts +++ b/@generated/user/user-create-or-connect-without-favorite-articles.input.ts @@ -5,9 +5,9 @@ import { UserCreateWithoutFavoriteArticlesInput } from './user-create-without-fa @InputType() export class UserCreateOrConnectWithoutFavoriteArticlesInput { - @Field(() => UserWhereUniqueInput, { nullable: false }) - where!: UserWhereUniqueInput; + @Field(() => UserWhereUniqueInput, { nullable: false }) + where!: UserWhereUniqueInput; - @Field(() => UserCreateWithoutFavoriteArticlesInput, { nullable: false }) - create!: UserCreateWithoutFavoriteArticlesInput; + @Field(() => UserCreateWithoutFavoriteArticlesInput, { nullable: false }) + create!: UserCreateWithoutFavoriteArticlesInput; } diff --git a/@generated/user/user-create-or-connect-without-followers.input.ts b/@generated/user/user-create-or-connect-without-followers.input.ts index 6f9383b4..e1938c69 100644 --- a/@generated/user/user-create-or-connect-without-followers.input.ts +++ b/@generated/user/user-create-or-connect-without-followers.input.ts @@ -5,9 +5,9 @@ import { UserCreateWithoutFollowersInput } from './user-create-without-followers @InputType() export class UserCreateOrConnectWithoutFollowersInput { - @Field(() => UserWhereUniqueInput, { nullable: false }) - where!: UserWhereUniqueInput; + @Field(() => UserWhereUniqueInput, { nullable: false }) + where!: UserWhereUniqueInput; - @Field(() => UserCreateWithoutFollowersInput, { nullable: false }) - create!: UserCreateWithoutFollowersInput; + @Field(() => UserCreateWithoutFollowersInput, { nullable: false }) + create!: UserCreateWithoutFollowersInput; } diff --git a/@generated/user/user-create-or-connect-without-following.input.ts b/@generated/user/user-create-or-connect-without-following.input.ts index 21bed24b..743dbeea 100644 --- a/@generated/user/user-create-or-connect-without-following.input.ts +++ b/@generated/user/user-create-or-connect-without-following.input.ts @@ -5,9 +5,9 @@ import { UserCreateWithoutFollowingInput } from './user-create-without-following @InputType() export class UserCreateOrConnectWithoutFollowingInput { - @Field(() => UserWhereUniqueInput, { nullable: false }) - where!: UserWhereUniqueInput; + @Field(() => UserWhereUniqueInput, { nullable: false }) + where!: UserWhereUniqueInput; - @Field(() => UserCreateWithoutFollowingInput, { nullable: false }) - create!: UserCreateWithoutFollowingInput; + @Field(() => UserCreateWithoutFollowingInput, { nullable: false }) + create!: UserCreateWithoutFollowingInput; } diff --git a/@generated/user/user-create-or-connect-without-profile.input.ts b/@generated/user/user-create-or-connect-without-profile.input.ts index 59c568aa..1840ff63 100644 --- a/@generated/user/user-create-or-connect-without-profile.input.ts +++ b/@generated/user/user-create-or-connect-without-profile.input.ts @@ -5,9 +5,9 @@ import { UserCreateWithoutProfileInput } from './user-create-without-profile.inp @InputType() export class UserCreateOrConnectWithoutProfileInput { - @Field(() => UserWhereUniqueInput, { nullable: false }) - where!: UserWhereUniqueInput; + @Field(() => UserWhereUniqueInput, { nullable: false }) + where!: UserWhereUniqueInput; - @Field(() => UserCreateWithoutProfileInput, { nullable: false }) - create!: UserCreateWithoutProfileInput; + @Field(() => UserCreateWithoutProfileInput, { nullable: false }) + create!: UserCreateWithoutProfileInput; } diff --git a/@generated/user/user-create-without-articles.input.ts b/@generated/user/user-create-without-articles.input.ts index d0d5cc0d..b76c51be 100644 --- a/@generated/user/user-create-without-articles.input.ts +++ b/@generated/user/user-create-without-articles.input.ts @@ -13,47 +13,47 @@ import { ProfileCreateNestedOneWithoutUserInput } from '../profile/profile-creat @InputType() export class UserCreateWithoutArticlesInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => Scalars.GraphQLEmailAddress, { nullable: false }) - email!: string; + @Field(() => Scalars.GraphQLEmailAddress, { nullable: false }) + email!: string; - @Field(() => String, { nullable: false }) - @Validator.MinLength(3) - @Validator.MaxLength(50) - name!: string; + @Field(() => String, { nullable: false }) + @Validator.MinLength(3) + @Validator.MaxLength(50) + name!: string; - @Field(() => String, { nullable: false }) - password!: string; + @Field(() => String, { nullable: false }) + password!: string; - @Field(() => String, { nullable: true }) - bio?: string; + @Field(() => String, { nullable: true }) + bio?: string; - @Field(() => String, { nullable: true }) - image?: string; + @Field(() => String, { nullable: true }) + image?: string; - @Field(() => UserCreateNestedManyWithoutFollowersInput, { nullable: true }) - following?: UserCreateNestedManyWithoutFollowersInput; + @Field(() => UserCreateNestedManyWithoutFollowersInput, { nullable: true }) + following?: UserCreateNestedManyWithoutFollowersInput; - @Field(() => UserCreateNestedManyWithoutFollowingInput, { nullable: true }) - followers?: UserCreateNestedManyWithoutFollowingInput; + @Field(() => UserCreateNestedManyWithoutFollowingInput, { nullable: true }) + followers?: UserCreateNestedManyWithoutFollowingInput; - @Field(() => ArticleCreateNestedManyWithoutFavoritedByInput, { nullable: true }) - favoriteArticles?: ArticleCreateNestedManyWithoutFavoritedByInput; + @Field(() => ArticleCreateNestedManyWithoutFavoritedByInput, { nullable: true }) + favoriteArticles?: ArticleCreateNestedManyWithoutFavoritedByInput; - @Field(() => CommentCreateNestedManyWithoutAuthorInput, { nullable: true }) - comments?: CommentCreateNestedManyWithoutAuthorInput; + @Field(() => CommentCreateNestedManyWithoutAuthorInput, { nullable: true }) + comments?: CommentCreateNestedManyWithoutAuthorInput; - @Field(() => Int, { nullable: true }) - countComments?: number; + @Field(() => Int, { nullable: true }) + countComments?: number; - @Field(() => Float, { nullable: true }) - rating?: number; + @Field(() => Float, { nullable: true }) + rating?: number; - @Field(() => Role, { nullable: true }) - role?: keyof typeof Role; + @Field(() => Role, { nullable: true }) + role?: keyof typeof Role; - @Field(() => ProfileCreateNestedOneWithoutUserInput, { nullable: true }) - profile?: ProfileCreateNestedOneWithoutUserInput; + @Field(() => ProfileCreateNestedOneWithoutUserInput, { nullable: true }) + profile?: ProfileCreateNestedOneWithoutUserInput; } diff --git a/@generated/user/user-create-without-comments.input.ts b/@generated/user/user-create-without-comments.input.ts index 9c31cd23..78c6c835 100644 --- a/@generated/user/user-create-without-comments.input.ts +++ b/@generated/user/user-create-without-comments.input.ts @@ -13,47 +13,47 @@ import { ProfileCreateNestedOneWithoutUserInput } from '../profile/profile-creat @InputType() export class UserCreateWithoutCommentsInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => Scalars.GraphQLEmailAddress, { nullable: false }) - email!: string; + @Field(() => Scalars.GraphQLEmailAddress, { nullable: false }) + email!: string; - @Field(() => String, { nullable: false }) - @Validator.MinLength(3) - @Validator.MaxLength(50) - name!: string; + @Field(() => String, { nullable: false }) + @Validator.MinLength(3) + @Validator.MaxLength(50) + name!: string; - @Field(() => String, { nullable: false }) - password!: string; + @Field(() => String, { nullable: false }) + password!: string; - @Field(() => String, { nullable: true }) - bio?: string; + @Field(() => String, { nullable: true }) + bio?: string; - @Field(() => String, { nullable: true }) - image?: string; + @Field(() => String, { nullable: true }) + image?: string; - @Field(() => UserCreateNestedManyWithoutFollowersInput, { nullable: true }) - following?: UserCreateNestedManyWithoutFollowersInput; + @Field(() => UserCreateNestedManyWithoutFollowersInput, { nullable: true }) + following?: UserCreateNestedManyWithoutFollowersInput; - @Field(() => UserCreateNestedManyWithoutFollowingInput, { nullable: true }) - followers?: UserCreateNestedManyWithoutFollowingInput; + @Field(() => UserCreateNestedManyWithoutFollowingInput, { nullable: true }) + followers?: UserCreateNestedManyWithoutFollowingInput; - @Field(() => ArticleCreateNestedManyWithoutFavoritedByInput, { nullable: true }) - favoriteArticles?: ArticleCreateNestedManyWithoutFavoritedByInput; + @Field(() => ArticleCreateNestedManyWithoutFavoritedByInput, { nullable: true }) + favoriteArticles?: ArticleCreateNestedManyWithoutFavoritedByInput; - @Field(() => ArticleCreateNestedManyWithoutAuthorInput, { nullable: true }) - articles?: ArticleCreateNestedManyWithoutAuthorInput; + @Field(() => ArticleCreateNestedManyWithoutAuthorInput, { nullable: true }) + articles?: ArticleCreateNestedManyWithoutAuthorInput; - @Field(() => Int, { nullable: true }) - countComments?: number; + @Field(() => Int, { nullable: true }) + countComments?: number; - @Field(() => Float, { nullable: true }) - rating?: number; + @Field(() => Float, { nullable: true }) + rating?: number; - @Field(() => Role, { nullable: true }) - role?: keyof typeof Role; + @Field(() => Role, { nullable: true }) + role?: keyof typeof Role; - @Field(() => ProfileCreateNestedOneWithoutUserInput, { nullable: true }) - profile?: ProfileCreateNestedOneWithoutUserInput; + @Field(() => ProfileCreateNestedOneWithoutUserInput, { nullable: true }) + profile?: ProfileCreateNestedOneWithoutUserInput; } diff --git a/@generated/user/user-create-without-favorite-articles.input.ts b/@generated/user/user-create-without-favorite-articles.input.ts index d9e188ae..3837e938 100644 --- a/@generated/user/user-create-without-favorite-articles.input.ts +++ b/@generated/user/user-create-without-favorite-articles.input.ts @@ -13,47 +13,47 @@ import { ProfileCreateNestedOneWithoutUserInput } from '../profile/profile-creat @InputType() export class UserCreateWithoutFavoriteArticlesInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => Scalars.GraphQLEmailAddress, { nullable: false }) - email!: string; + @Field(() => Scalars.GraphQLEmailAddress, { nullable: false }) + email!: string; - @Field(() => String, { nullable: false }) - @Validator.MinLength(3) - @Validator.MaxLength(50) - name!: string; + @Field(() => String, { nullable: false }) + @Validator.MinLength(3) + @Validator.MaxLength(50) + name!: string; - @Field(() => String, { nullable: false }) - password!: string; + @Field(() => String, { nullable: false }) + password!: string; - @Field(() => String, { nullable: true }) - bio?: string; + @Field(() => String, { nullable: true }) + bio?: string; - @Field(() => String, { nullable: true }) - image?: string; + @Field(() => String, { nullable: true }) + image?: string; - @Field(() => UserCreateNestedManyWithoutFollowersInput, { nullable: true }) - following?: UserCreateNestedManyWithoutFollowersInput; + @Field(() => UserCreateNestedManyWithoutFollowersInput, { nullable: true }) + following?: UserCreateNestedManyWithoutFollowersInput; - @Field(() => UserCreateNestedManyWithoutFollowingInput, { nullable: true }) - followers?: UserCreateNestedManyWithoutFollowingInput; + @Field(() => UserCreateNestedManyWithoutFollowingInput, { nullable: true }) + followers?: UserCreateNestedManyWithoutFollowingInput; - @Field(() => ArticleCreateNestedManyWithoutAuthorInput, { nullable: true }) - articles?: ArticleCreateNestedManyWithoutAuthorInput; + @Field(() => ArticleCreateNestedManyWithoutAuthorInput, { nullable: true }) + articles?: ArticleCreateNestedManyWithoutAuthorInput; - @Field(() => CommentCreateNestedManyWithoutAuthorInput, { nullable: true }) - comments?: CommentCreateNestedManyWithoutAuthorInput; + @Field(() => CommentCreateNestedManyWithoutAuthorInput, { nullable: true }) + comments?: CommentCreateNestedManyWithoutAuthorInput; - @Field(() => Int, { nullable: true }) - countComments?: number; + @Field(() => Int, { nullable: true }) + countComments?: number; - @Field(() => Float, { nullable: true }) - rating?: number; + @Field(() => Float, { nullable: true }) + rating?: number; - @Field(() => Role, { nullable: true }) - role?: keyof typeof Role; + @Field(() => Role, { nullable: true }) + role?: keyof typeof Role; - @Field(() => ProfileCreateNestedOneWithoutUserInput, { nullable: true }) - profile?: ProfileCreateNestedOneWithoutUserInput; + @Field(() => ProfileCreateNestedOneWithoutUserInput, { nullable: true }) + profile?: ProfileCreateNestedOneWithoutUserInput; } diff --git a/@generated/user/user-create-without-followers.input.ts b/@generated/user/user-create-without-followers.input.ts index 58f07a70..18015911 100644 --- a/@generated/user/user-create-without-followers.input.ts +++ b/@generated/user/user-create-without-followers.input.ts @@ -13,47 +13,47 @@ import { ProfileCreateNestedOneWithoutUserInput } from '../profile/profile-creat @InputType() export class UserCreateWithoutFollowersInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => Scalars.GraphQLEmailAddress, { nullable: false }) - email!: string; + @Field(() => Scalars.GraphQLEmailAddress, { nullable: false }) + email!: string; - @Field(() => String, { nullable: false }) - @Validator.MinLength(3) - @Validator.MaxLength(50) - name!: string; + @Field(() => String, { nullable: false }) + @Validator.MinLength(3) + @Validator.MaxLength(50) + name!: string; - @Field(() => String, { nullable: false }) - password!: string; + @Field(() => String, { nullable: false }) + password!: string; - @Field(() => String, { nullable: true }) - bio?: string; + @Field(() => String, { nullable: true }) + bio?: string; - @Field(() => String, { nullable: true }) - image?: string; + @Field(() => String, { nullable: true }) + image?: string; - @Field(() => UserCreateNestedManyWithoutFollowersInput, { nullable: true }) - following?: UserCreateNestedManyWithoutFollowersInput; + @Field(() => UserCreateNestedManyWithoutFollowersInput, { nullable: true }) + following?: UserCreateNestedManyWithoutFollowersInput; - @Field(() => ArticleCreateNestedManyWithoutFavoritedByInput, { nullable: true }) - favoriteArticles?: ArticleCreateNestedManyWithoutFavoritedByInput; + @Field(() => ArticleCreateNestedManyWithoutFavoritedByInput, { nullable: true }) + favoriteArticles?: ArticleCreateNestedManyWithoutFavoritedByInput; - @Field(() => ArticleCreateNestedManyWithoutAuthorInput, { nullable: true }) - articles?: ArticleCreateNestedManyWithoutAuthorInput; + @Field(() => ArticleCreateNestedManyWithoutAuthorInput, { nullable: true }) + articles?: ArticleCreateNestedManyWithoutAuthorInput; - @Field(() => CommentCreateNestedManyWithoutAuthorInput, { nullable: true }) - comments?: CommentCreateNestedManyWithoutAuthorInput; + @Field(() => CommentCreateNestedManyWithoutAuthorInput, { nullable: true }) + comments?: CommentCreateNestedManyWithoutAuthorInput; - @Field(() => Int, { nullable: true }) - countComments?: number; + @Field(() => Int, { nullable: true }) + countComments?: number; - @Field(() => Float, { nullable: true }) - rating?: number; + @Field(() => Float, { nullable: true }) + rating?: number; - @Field(() => Role, { nullable: true }) - role?: keyof typeof Role; + @Field(() => Role, { nullable: true }) + role?: keyof typeof Role; - @Field(() => ProfileCreateNestedOneWithoutUserInput, { nullable: true }) - profile?: ProfileCreateNestedOneWithoutUserInput; + @Field(() => ProfileCreateNestedOneWithoutUserInput, { nullable: true }) + profile?: ProfileCreateNestedOneWithoutUserInput; } diff --git a/@generated/user/user-create-without-following.input.ts b/@generated/user/user-create-without-following.input.ts index 1825e014..4e4354f3 100644 --- a/@generated/user/user-create-without-following.input.ts +++ b/@generated/user/user-create-without-following.input.ts @@ -13,47 +13,47 @@ import { ProfileCreateNestedOneWithoutUserInput } from '../profile/profile-creat @InputType() export class UserCreateWithoutFollowingInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => Scalars.GraphQLEmailAddress, { nullable: false }) - email!: string; + @Field(() => Scalars.GraphQLEmailAddress, { nullable: false }) + email!: string; - @Field(() => String, { nullable: false }) - @Validator.MinLength(3) - @Validator.MaxLength(50) - name!: string; + @Field(() => String, { nullable: false }) + @Validator.MinLength(3) + @Validator.MaxLength(50) + name!: string; - @Field(() => String, { nullable: false }) - password!: string; + @Field(() => String, { nullable: false }) + password!: string; - @Field(() => String, { nullable: true }) - bio?: string; + @Field(() => String, { nullable: true }) + bio?: string; - @Field(() => String, { nullable: true }) - image?: string; + @Field(() => String, { nullable: true }) + image?: string; - @Field(() => UserCreateNestedManyWithoutFollowingInput, { nullable: true }) - followers?: UserCreateNestedManyWithoutFollowingInput; + @Field(() => UserCreateNestedManyWithoutFollowingInput, { nullable: true }) + followers?: UserCreateNestedManyWithoutFollowingInput; - @Field(() => ArticleCreateNestedManyWithoutFavoritedByInput, { nullable: true }) - favoriteArticles?: ArticleCreateNestedManyWithoutFavoritedByInput; + @Field(() => ArticleCreateNestedManyWithoutFavoritedByInput, { nullable: true }) + favoriteArticles?: ArticleCreateNestedManyWithoutFavoritedByInput; - @Field(() => ArticleCreateNestedManyWithoutAuthorInput, { nullable: true }) - articles?: ArticleCreateNestedManyWithoutAuthorInput; + @Field(() => ArticleCreateNestedManyWithoutAuthorInput, { nullable: true }) + articles?: ArticleCreateNestedManyWithoutAuthorInput; - @Field(() => CommentCreateNestedManyWithoutAuthorInput, { nullable: true }) - comments?: CommentCreateNestedManyWithoutAuthorInput; + @Field(() => CommentCreateNestedManyWithoutAuthorInput, { nullable: true }) + comments?: CommentCreateNestedManyWithoutAuthorInput; - @Field(() => Int, { nullable: true }) - countComments?: number; + @Field(() => Int, { nullable: true }) + countComments?: number; - @Field(() => Float, { nullable: true }) - rating?: number; + @Field(() => Float, { nullable: true }) + rating?: number; - @Field(() => Role, { nullable: true }) - role?: keyof typeof Role; + @Field(() => Role, { nullable: true }) + role?: keyof typeof Role; - @Field(() => ProfileCreateNestedOneWithoutUserInput, { nullable: true }) - profile?: ProfileCreateNestedOneWithoutUserInput; + @Field(() => ProfileCreateNestedOneWithoutUserInput, { nullable: true }) + profile?: ProfileCreateNestedOneWithoutUserInput; } diff --git a/@generated/user/user-create-without-profile.input.ts b/@generated/user/user-create-without-profile.input.ts index 5a1bcaeb..199e358a 100644 --- a/@generated/user/user-create-without-profile.input.ts +++ b/@generated/user/user-create-without-profile.input.ts @@ -13,47 +13,47 @@ import { Role } from '../prisma/role.enum'; @InputType() export class UserCreateWithoutProfileInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => Scalars.GraphQLEmailAddress, { nullable: false }) - email!: string; + @Field(() => Scalars.GraphQLEmailAddress, { nullable: false }) + email!: string; - @Field(() => String, { nullable: false }) - @Validator.MinLength(3) - @Validator.MaxLength(50) - name!: string; + @Field(() => String, { nullable: false }) + @Validator.MinLength(3) + @Validator.MaxLength(50) + name!: string; - @Field(() => String, { nullable: false }) - password!: string; + @Field(() => String, { nullable: false }) + password!: string; - @Field(() => String, { nullable: true }) - bio?: string; + @Field(() => String, { nullable: true }) + bio?: string; - @Field(() => String, { nullable: true }) - image?: string; + @Field(() => String, { nullable: true }) + image?: string; - @Field(() => UserCreateNestedManyWithoutFollowersInput, { nullable: true }) - following?: UserCreateNestedManyWithoutFollowersInput; + @Field(() => UserCreateNestedManyWithoutFollowersInput, { nullable: true }) + following?: UserCreateNestedManyWithoutFollowersInput; - @Field(() => UserCreateNestedManyWithoutFollowingInput, { nullable: true }) - followers?: UserCreateNestedManyWithoutFollowingInput; + @Field(() => UserCreateNestedManyWithoutFollowingInput, { nullable: true }) + followers?: UserCreateNestedManyWithoutFollowingInput; - @Field(() => ArticleCreateNestedManyWithoutFavoritedByInput, { nullable: true }) - favoriteArticles?: ArticleCreateNestedManyWithoutFavoritedByInput; + @Field(() => ArticleCreateNestedManyWithoutFavoritedByInput, { nullable: true }) + favoriteArticles?: ArticleCreateNestedManyWithoutFavoritedByInput; - @Field(() => ArticleCreateNestedManyWithoutAuthorInput, { nullable: true }) - articles?: ArticleCreateNestedManyWithoutAuthorInput; + @Field(() => ArticleCreateNestedManyWithoutAuthorInput, { nullable: true }) + articles?: ArticleCreateNestedManyWithoutAuthorInput; - @Field(() => CommentCreateNestedManyWithoutAuthorInput, { nullable: true }) - comments?: CommentCreateNestedManyWithoutAuthorInput; + @Field(() => CommentCreateNestedManyWithoutAuthorInput, { nullable: true }) + comments?: CommentCreateNestedManyWithoutAuthorInput; - @Field(() => Int, { nullable: true }) - countComments?: number; + @Field(() => Int, { nullable: true }) + countComments?: number; - @Field(() => Float, { nullable: true }) - rating?: number; + @Field(() => Float, { nullable: true }) + rating?: number; - @Field(() => Role, { nullable: true }) - role?: keyof typeof Role; + @Field(() => Role, { nullable: true }) + role?: keyof typeof Role; } diff --git a/@generated/user/user-create.input.ts b/@generated/user/user-create.input.ts index 237c4c74..182c95d2 100644 --- a/@generated/user/user-create.input.ts +++ b/@generated/user/user-create.input.ts @@ -14,50 +14,50 @@ import { ProfileCreateNestedOneWithoutUserInput } from '../profile/profile-creat @InputType() export class UserCreateInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => Scalars.GraphQLEmailAddress, { nullable: false }) - email!: string; + @Field(() => Scalars.GraphQLEmailAddress, { nullable: false }) + email!: string; - @Field(() => String, { nullable: false }) - @Validator.MinLength(3) - @Validator.MaxLength(50) - name!: string; + @Field(() => String, { nullable: false }) + @Validator.MinLength(3) + @Validator.MaxLength(50) + name!: string; - @Field(() => String, { nullable: false }) - password!: string; + @Field(() => String, { nullable: false }) + password!: string; - @Field(() => String, { nullable: true }) - bio?: string; + @Field(() => String, { nullable: true }) + bio?: string; - @Field(() => String, { nullable: true }) - image?: string; + @Field(() => String, { nullable: true }) + image?: string; - @Field(() => UserCreateNestedManyWithoutFollowersInput, { nullable: true }) - following?: UserCreateNestedManyWithoutFollowersInput; + @Field(() => UserCreateNestedManyWithoutFollowersInput, { nullable: true }) + following?: UserCreateNestedManyWithoutFollowersInput; - @Field(() => UserCreateNestedManyWithoutFollowingInput, { nullable: true }) - followers?: UserCreateNestedManyWithoutFollowingInput; + @Field(() => UserCreateNestedManyWithoutFollowingInput, { nullable: true }) + followers?: UserCreateNestedManyWithoutFollowingInput; - @Field(() => ArticleCreateNestedManyWithoutFavoritedByInput, { nullable: true }) - favoriteArticles?: ArticleCreateNestedManyWithoutFavoritedByInput; + @Field(() => ArticleCreateNestedManyWithoutFavoritedByInput, { nullable: true }) + favoriteArticles?: ArticleCreateNestedManyWithoutFavoritedByInput; - @Field(() => ArticleCreateNestedManyWithoutAuthorInput, { nullable: true }) - articles?: ArticleCreateNestedManyWithoutAuthorInput; + @Field(() => ArticleCreateNestedManyWithoutAuthorInput, { nullable: true }) + articles?: ArticleCreateNestedManyWithoutAuthorInput; - @Field(() => CommentCreateNestedManyWithoutAuthorInput, { nullable: true }) - comments?: CommentCreateNestedManyWithoutAuthorInput; + @Field(() => CommentCreateNestedManyWithoutAuthorInput, { nullable: true }) + comments?: CommentCreateNestedManyWithoutAuthorInput; - @Field(() => Int, { nullable: true }) - countComments?: number; + @Field(() => Int, { nullable: true }) + countComments?: number; - @Field(() => Float, { nullable: true }) - rating?: number; + @Field(() => Float, { nullable: true }) + rating?: number; - @Field(() => Role, { nullable: true }) - role?: keyof typeof Role; + @Field(() => Role, { nullable: true }) + role?: keyof typeof Role; - @Field(() => ProfileCreateNestedOneWithoutUserInput, { nullable: true }) - profile?: ProfileCreateNestedOneWithoutUserInput; + @Field(() => ProfileCreateNestedOneWithoutUserInput, { nullable: true }) + profile?: ProfileCreateNestedOneWithoutUserInput; } diff --git a/@generated/user/user-email-name-compound-unique.input.ts b/@generated/user/user-email-name-compound-unique.input.ts index fc6286e4..ff9c42a2 100644 --- a/@generated/user/user-email-name-compound-unique.input.ts +++ b/@generated/user/user-email-name-compound-unique.input.ts @@ -5,11 +5,11 @@ import * as Validator from 'class-validator'; @InputType() export class UserEmailNameCompoundUniqueInput { - @Field(() => Scalars.GraphQLEmailAddress, { nullable: false }) - email!: string; + @Field(() => Scalars.GraphQLEmailAddress, { nullable: false }) + email!: string; - @Field(() => String, { nullable: false }) - @Validator.MinLength(3) - @Validator.MaxLength(50) - name!: string; + @Field(() => String, { nullable: false }) + @Validator.MinLength(3) + @Validator.MaxLength(50) + name!: string; } diff --git a/@generated/user/user-group-by.args.ts b/@generated/user/user-group-by.args.ts index fd3cdc8d..1b379938 100644 --- a/@generated/user/user-group-by.args.ts +++ b/@generated/user/user-group-by.args.ts @@ -13,36 +13,36 @@ import { UserMaxAggregateInput } from './user-max-aggregate.input'; @ArgsType() export class UserGroupByArgs { - @Field(() => UserWhereInput, { nullable: true }) - where?: UserWhereInput; + @Field(() => UserWhereInput, { nullable: true }) + where?: UserWhereInput; - @Field(() => [UserOrderByWithAggregationInput], { nullable: true }) - orderBy?: Array; + @Field(() => [UserOrderByWithAggregationInput], { nullable: true }) + orderBy?: Array; - @Field(() => [UserScalarFieldEnum], { nullable: false }) - by!: Array; + @Field(() => [UserScalarFieldEnum], { nullable: false }) + by!: Array; - @Field(() => UserScalarWhereWithAggregatesInput, { nullable: true }) - having?: UserScalarWhereWithAggregatesInput; + @Field(() => UserScalarWhereWithAggregatesInput, { nullable: true }) + having?: UserScalarWhereWithAggregatesInput; - @Field(() => Int, { nullable: true }) - take?: number; + @Field(() => Int, { nullable: true }) + take?: number; - @Field(() => Int, { nullable: true }) - skip?: number; + @Field(() => Int, { nullable: true }) + skip?: number; - @Field(() => UserCountAggregateInput, { nullable: true }) - _count?: UserCountAggregateInput; + @Field(() => UserCountAggregateInput, { nullable: true }) + _count?: UserCountAggregateInput; - @Field(() => UserAvgAggregateInput, { nullable: true }) - _avg?: UserAvgAggregateInput; + @Field(() => UserAvgAggregateInput, { nullable: true }) + _avg?: UserAvgAggregateInput; - @Field(() => UserSumAggregateInput, { nullable: true }) - _sum?: UserSumAggregateInput; + @Field(() => UserSumAggregateInput, { nullable: true }) + _sum?: UserSumAggregateInput; - @Field(() => UserMinAggregateInput, { nullable: true }) - _min?: UserMinAggregateInput; + @Field(() => UserMinAggregateInput, { nullable: true }) + _min?: UserMinAggregateInput; - @Field(() => UserMaxAggregateInput, { nullable: true }) - _max?: UserMaxAggregateInput; + @Field(() => UserMaxAggregateInput, { nullable: true }) + _max?: UserMaxAggregateInput; } diff --git a/@generated/user/user-group-by.output.ts b/@generated/user/user-group-by.output.ts index e14dc269..b5ae519f 100644 --- a/@generated/user/user-group-by.output.ts +++ b/@generated/user/user-group-by.output.ts @@ -12,45 +12,45 @@ import { UserMaxAggregate } from './user-max-aggregate.output'; @ObjectType() export class UserGroupBy { - @Field(() => String, { nullable: false }) - id!: string; + @Field(() => String, { nullable: false }) + id!: string; - @Field(() => String, { nullable: false }) - email!: string; + @Field(() => String, { nullable: false }) + email!: string; - @Field(() => String, { nullable: false }) - name!: string; + @Field(() => String, { nullable: false }) + name!: string; - @HideField() - password!: string; + @HideField() + password!: string; - @Field(() => String, { nullable: true }) - bio?: string; + @Field(() => String, { nullable: true }) + bio?: string; - @Field(() => String, { nullable: true }) - image?: string; + @Field(() => String, { nullable: true }) + image?: string; - @Field(() => Int, { nullable: true }) - countComments?: number; + @Field(() => Int, { nullable: true }) + countComments?: number; - @Field(() => Float, { nullable: true }) - rating?: number; + @Field(() => Float, { nullable: true }) + rating?: number; - @Field(() => Role, { nullable: true }) - role?: keyof typeof Role; + @Field(() => Role, { nullable: true }) + role?: keyof typeof Role; - @Field(() => UserCountAggregate, { nullable: true }) - _count?: UserCountAggregate; + @Field(() => UserCountAggregate, { nullable: true }) + _count?: UserCountAggregate; - @Field(() => UserAvgAggregate, { nullable: true }) - _avg?: UserAvgAggregate; + @Field(() => UserAvgAggregate, { nullable: true }) + _avg?: UserAvgAggregate; - @Field(() => UserSumAggregate, { nullable: true }) - _sum?: UserSumAggregate; + @Field(() => UserSumAggregate, { nullable: true }) + _sum?: UserSumAggregate; - @Field(() => UserMinAggregate, { nullable: true }) - _min?: UserMinAggregate; + @Field(() => UserMinAggregate, { nullable: true }) + _min?: UserMinAggregate; - @Field(() => UserMaxAggregate, { nullable: true }) - _max?: UserMaxAggregate; + @Field(() => UserMaxAggregate, { nullable: true }) + _max?: UserMaxAggregate; } diff --git a/@generated/user/user-list-relation-filter.input.ts b/@generated/user/user-list-relation-filter.input.ts index 77efe72f..bbb1acce 100644 --- a/@generated/user/user-list-relation-filter.input.ts +++ b/@generated/user/user-list-relation-filter.input.ts @@ -4,12 +4,12 @@ import { UserWhereInput } from './user-where.input'; @InputType() export class UserListRelationFilter { - @Field(() => UserWhereInput, { nullable: true }) - every?: UserWhereInput; + @Field(() => UserWhereInput, { nullable: true }) + every?: UserWhereInput; - @Field(() => UserWhereInput, { nullable: true }) - some?: UserWhereInput; + @Field(() => UserWhereInput, { nullable: true }) + some?: UserWhereInput; - @Field(() => UserWhereInput, { nullable: true }) - none?: UserWhereInput; + @Field(() => UserWhereInput, { nullable: true }) + none?: UserWhereInput; } diff --git a/@generated/user/user-max-aggregate.input.ts b/@generated/user/user-max-aggregate.input.ts index 955f4d8b..1bcb9121 100644 --- a/@generated/user/user-max-aggregate.input.ts +++ b/@generated/user/user-max-aggregate.input.ts @@ -3,30 +3,30 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class UserMaxAggregateInput { - @Field(() => Boolean, { nullable: true }) - id?: true; + @Field(() => Boolean, { nullable: true }) + id?: true; - @Field(() => Boolean, { nullable: true }) - email?: true; + @Field(() => Boolean, { nullable: true }) + email?: true; - @Field(() => Boolean, { nullable: true }) - name?: true; + @Field(() => Boolean, { nullable: true }) + name?: true; - @Field(() => Boolean, { nullable: true }) - password?: true; + @Field(() => Boolean, { nullable: true }) + password?: true; - @Field(() => Boolean, { nullable: true }) - bio?: true; + @Field(() => Boolean, { nullable: true }) + bio?: true; - @Field(() => Boolean, { nullable: true }) - image?: true; + @Field(() => Boolean, { nullable: true }) + image?: true; - @Field(() => Boolean, { nullable: true }) - countComments?: true; + @Field(() => Boolean, { nullable: true }) + countComments?: true; - @Field(() => Boolean, { nullable: true }) - rating?: true; + @Field(() => Boolean, { nullable: true }) + rating?: true; - @Field(() => Boolean, { nullable: true }) - role?: true; + @Field(() => Boolean, { nullable: true }) + role?: true; } diff --git a/@generated/user/user-max-aggregate.output.ts b/@generated/user/user-max-aggregate.output.ts index e8a95bcb..d2981bc2 100644 --- a/@generated/user/user-max-aggregate.output.ts +++ b/@generated/user/user-max-aggregate.output.ts @@ -7,30 +7,30 @@ import { Role } from '../prisma/role.enum'; @ObjectType() export class UserMaxAggregate { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => String, { nullable: true }) - email?: string; + @Field(() => String, { nullable: true }) + email?: string; - @Field(() => String, { nullable: true }) - name?: string; + @Field(() => String, { nullable: true }) + name?: string; - @HideField() - password?: string; + @HideField() + password?: string; - @Field(() => String, { nullable: true }) - bio?: string; + @Field(() => String, { nullable: true }) + bio?: string; - @Field(() => String, { nullable: true }) - image?: string; + @Field(() => String, { nullable: true }) + image?: string; - @Field(() => Int, { nullable: true }) - countComments?: number; + @Field(() => Int, { nullable: true }) + countComments?: number; - @Field(() => Float, { nullable: true }) - rating?: number; + @Field(() => Float, { nullable: true }) + rating?: number; - @Field(() => Role, { nullable: true }) - role?: keyof typeof Role; + @Field(() => Role, { nullable: true }) + role?: keyof typeof Role; } diff --git a/@generated/user/user-max-order-by-aggregate.input.ts b/@generated/user/user-max-order-by-aggregate.input.ts index 333d4da8..00e224b1 100644 --- a/@generated/user/user-max-order-by-aggregate.input.ts +++ b/@generated/user/user-max-order-by-aggregate.input.ts @@ -4,30 +4,30 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class UserMaxOrderByAggregateInput { - @Field(() => SortOrder, { nullable: true }) - id?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + id?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - email?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + email?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - name?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + name?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - password?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + password?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - bio?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + bio?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - image?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + image?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - countComments?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + countComments?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - rating?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + rating?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - role?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + role?: keyof typeof SortOrder; } diff --git a/@generated/user/user-min-aggregate.input.ts b/@generated/user/user-min-aggregate.input.ts index 72dd14da..3b401c0a 100644 --- a/@generated/user/user-min-aggregate.input.ts +++ b/@generated/user/user-min-aggregate.input.ts @@ -3,30 +3,30 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class UserMinAggregateInput { - @Field(() => Boolean, { nullable: true }) - id?: true; + @Field(() => Boolean, { nullable: true }) + id?: true; - @Field(() => Boolean, { nullable: true }) - email?: true; + @Field(() => Boolean, { nullable: true }) + email?: true; - @Field(() => Boolean, { nullable: true }) - name?: true; + @Field(() => Boolean, { nullable: true }) + name?: true; - @Field(() => Boolean, { nullable: true }) - password?: true; + @Field(() => Boolean, { nullable: true }) + password?: true; - @Field(() => Boolean, { nullable: true }) - bio?: true; + @Field(() => Boolean, { nullable: true }) + bio?: true; - @Field(() => Boolean, { nullable: true }) - image?: true; + @Field(() => Boolean, { nullable: true }) + image?: true; - @Field(() => Boolean, { nullable: true }) - countComments?: true; + @Field(() => Boolean, { nullable: true }) + countComments?: true; - @Field(() => Boolean, { nullable: true }) - rating?: true; + @Field(() => Boolean, { nullable: true }) + rating?: true; - @Field(() => Boolean, { nullable: true }) - role?: true; + @Field(() => Boolean, { nullable: true }) + role?: true; } diff --git a/@generated/user/user-min-aggregate.output.ts b/@generated/user/user-min-aggregate.output.ts index 39a494f5..47c5e984 100644 --- a/@generated/user/user-min-aggregate.output.ts +++ b/@generated/user/user-min-aggregate.output.ts @@ -7,30 +7,30 @@ import { Role } from '../prisma/role.enum'; @ObjectType() export class UserMinAggregate { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => String, { nullable: true }) - email?: string; + @Field(() => String, { nullable: true }) + email?: string; - @Field(() => String, { nullable: true }) - name?: string; + @Field(() => String, { nullable: true }) + name?: string; - @HideField() - password?: string; + @HideField() + password?: string; - @Field(() => String, { nullable: true }) - bio?: string; + @Field(() => String, { nullable: true }) + bio?: string; - @Field(() => String, { nullable: true }) - image?: string; + @Field(() => String, { nullable: true }) + image?: string; - @Field(() => Int, { nullable: true }) - countComments?: number; + @Field(() => Int, { nullable: true }) + countComments?: number; - @Field(() => Float, { nullable: true }) - rating?: number; + @Field(() => Float, { nullable: true }) + rating?: number; - @Field(() => Role, { nullable: true }) - role?: keyof typeof Role; + @Field(() => Role, { nullable: true }) + role?: keyof typeof Role; } diff --git a/@generated/user/user-min-order-by-aggregate.input.ts b/@generated/user/user-min-order-by-aggregate.input.ts index e1e35f00..7d509556 100644 --- a/@generated/user/user-min-order-by-aggregate.input.ts +++ b/@generated/user/user-min-order-by-aggregate.input.ts @@ -4,30 +4,30 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class UserMinOrderByAggregateInput { - @Field(() => SortOrder, { nullable: true }) - id?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + id?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - email?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + email?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - name?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + name?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - password?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + password?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - bio?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + bio?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - image?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + image?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - countComments?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + countComments?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - rating?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + rating?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - role?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + role?: keyof typeof SortOrder; } diff --git a/@generated/user/user-order-by-relation-aggregate.input.ts b/@generated/user/user-order-by-relation-aggregate.input.ts index 7dad5fa3..58cb846b 100644 --- a/@generated/user/user-order-by-relation-aggregate.input.ts +++ b/@generated/user/user-order-by-relation-aggregate.input.ts @@ -4,6 +4,6 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class UserOrderByRelationAggregateInput { - @Field(() => SortOrder, { nullable: true }) - _count?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + _count?: keyof typeof SortOrder; } diff --git a/@generated/user/user-order-by-relevance-field.enum.ts b/@generated/user/user-order-by-relevance-field.enum.ts index 8d6cd6c3..f993dae0 100644 --- a/@generated/user/user-order-by-relevance-field.enum.ts +++ b/@generated/user/user-order-by-relevance-field.enum.ts @@ -1,15 +1,15 @@ import { registerEnumType } from '@nestjs/graphql'; export enum UserOrderByRelevanceFieldEnum { - id = 'id', - email = 'email', - name = 'name', - password = 'password', - bio = 'bio', - image = 'image', + id = 'id', + email = 'email', + name = 'name', + password = 'password', + bio = 'bio', + image = 'image', } registerEnumType(UserOrderByRelevanceFieldEnum, { - name: 'UserOrderByRelevanceFieldEnum', - description: undefined, + name: 'UserOrderByRelevanceFieldEnum', + description: undefined, }); diff --git a/@generated/user/user-order-by-relevance.input.ts b/@generated/user/user-order-by-relevance.input.ts index f7ab63da..12d1566f 100644 --- a/@generated/user/user-order-by-relevance.input.ts +++ b/@generated/user/user-order-by-relevance.input.ts @@ -5,12 +5,12 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class UserOrderByRelevanceInput { - @Field(() => [UserOrderByRelevanceFieldEnum], { nullable: false }) - fields!: Array; + @Field(() => [UserOrderByRelevanceFieldEnum], { nullable: false }) + fields!: Array; - @Field(() => SortOrder, { nullable: false }) - sort!: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: false }) + sort!: keyof typeof SortOrder; - @Field(() => String, { nullable: false }) - search!: string; + @Field(() => String, { nullable: false }) + search!: string; } diff --git a/@generated/user/user-order-by-with-aggregation.input.ts b/@generated/user/user-order-by-with-aggregation.input.ts index 0568d166..2a9bb3b7 100644 --- a/@generated/user/user-order-by-with-aggregation.input.ts +++ b/@generated/user/user-order-by-with-aggregation.input.ts @@ -9,45 +9,45 @@ import { UserSumOrderByAggregateInput } from './user-sum-order-by-aggregate.inpu @InputType() export class UserOrderByWithAggregationInput { - @Field(() => SortOrder, { nullable: true }) - id?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + id?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - email?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + email?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - name?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + name?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - password?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + password?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - bio?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + bio?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - image?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + image?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - countComments?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + countComments?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - rating?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + rating?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - role?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + role?: keyof typeof SortOrder; - @Field(() => UserCountOrderByAggregateInput, { nullable: true }) - _count?: UserCountOrderByAggregateInput; + @Field(() => UserCountOrderByAggregateInput, { nullable: true }) + _count?: UserCountOrderByAggregateInput; - @Field(() => UserAvgOrderByAggregateInput, { nullable: true }) - _avg?: UserAvgOrderByAggregateInput; + @Field(() => UserAvgOrderByAggregateInput, { nullable: true }) + _avg?: UserAvgOrderByAggregateInput; - @Field(() => UserMaxOrderByAggregateInput, { nullable: true }) - _max?: UserMaxOrderByAggregateInput; + @Field(() => UserMaxOrderByAggregateInput, { nullable: true }) + _max?: UserMaxOrderByAggregateInput; - @Field(() => UserMinOrderByAggregateInput, { nullable: true }) - _min?: UserMinOrderByAggregateInput; + @Field(() => UserMinOrderByAggregateInput, { nullable: true }) + _min?: UserMinOrderByAggregateInput; - @Field(() => UserSumOrderByAggregateInput, { nullable: true }) - _sum?: UserSumOrderByAggregateInput; + @Field(() => UserSumOrderByAggregateInput, { nullable: true }) + _sum?: UserSumOrderByAggregateInput; } diff --git a/@generated/user/user-order-by-with-relation-and-search-relevance.input.ts b/@generated/user/user-order-by-with-relation-and-search-relevance.input.ts index d52bebce..8a07d3bf 100644 --- a/@generated/user/user-order-by-with-relation-and-search-relevance.input.ts +++ b/@generated/user/user-order-by-with-relation-and-search-relevance.input.ts @@ -9,51 +9,51 @@ import { UserOrderByRelevanceInput } from './user-order-by-relevance.input'; @InputType() export class UserOrderByWithRelationAndSearchRelevanceInput { - @Field(() => SortOrder, { nullable: true }) - id?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + id?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - email?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + email?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - name?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + name?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - password?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + password?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - bio?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + bio?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - image?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + image?: keyof typeof SortOrder; - @Field(() => UserOrderByRelationAggregateInput, { nullable: true }) - following?: UserOrderByRelationAggregateInput; + @Field(() => UserOrderByRelationAggregateInput, { nullable: true }) + following?: UserOrderByRelationAggregateInput; - @Field(() => UserOrderByRelationAggregateInput, { nullable: true }) - followers?: UserOrderByRelationAggregateInput; + @Field(() => UserOrderByRelationAggregateInput, { nullable: true }) + followers?: UserOrderByRelationAggregateInput; - @Field(() => ArticleOrderByRelationAggregateInput, { nullable: true }) - favoriteArticles?: ArticleOrderByRelationAggregateInput; + @Field(() => ArticleOrderByRelationAggregateInput, { nullable: true }) + favoriteArticles?: ArticleOrderByRelationAggregateInput; - @Field(() => ArticleOrderByRelationAggregateInput, { nullable: true }) - articles?: ArticleOrderByRelationAggregateInput; + @Field(() => ArticleOrderByRelationAggregateInput, { nullable: true }) + articles?: ArticleOrderByRelationAggregateInput; - @Field(() => CommentOrderByRelationAggregateInput, { nullable: true }) - comments?: CommentOrderByRelationAggregateInput; + @Field(() => CommentOrderByRelationAggregateInput, { nullable: true }) + comments?: CommentOrderByRelationAggregateInput; - @Field(() => SortOrder, { nullable: true }) - countComments?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + countComments?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - rating?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + rating?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - role?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + role?: keyof typeof SortOrder; - @Field(() => ProfileOrderByWithRelationAndSearchRelevanceInput, { nullable: true }) - profile?: ProfileOrderByWithRelationAndSearchRelevanceInput; + @Field(() => ProfileOrderByWithRelationAndSearchRelevanceInput, { nullable: true }) + profile?: ProfileOrderByWithRelationAndSearchRelevanceInput; - @Field(() => UserOrderByRelevanceInput, { nullable: true }) - _relevance?: UserOrderByRelevanceInput; + @Field(() => UserOrderByRelevanceInput, { nullable: true }) + _relevance?: UserOrderByRelevanceInput; } diff --git a/@generated/user/user-relation-filter.input.ts b/@generated/user/user-relation-filter.input.ts index 035c116f..c9c5bcdd 100644 --- a/@generated/user/user-relation-filter.input.ts +++ b/@generated/user/user-relation-filter.input.ts @@ -4,9 +4,9 @@ import { UserWhereInput } from './user-where.input'; @InputType() export class UserRelationFilter { - @Field(() => UserWhereInput, { nullable: true }) - is?: UserWhereInput; + @Field(() => UserWhereInput, { nullable: true }) + is?: UserWhereInput; - @Field(() => UserWhereInput, { nullable: true }) - isNot?: UserWhereInput; + @Field(() => UserWhereInput, { nullable: true }) + isNot?: UserWhereInput; } diff --git a/@generated/user/user-scalar-field.enum.ts b/@generated/user/user-scalar-field.enum.ts index 8dbed57d..ef817745 100644 --- a/@generated/user/user-scalar-field.enum.ts +++ b/@generated/user/user-scalar-field.enum.ts @@ -1,18 +1,18 @@ import { registerEnumType } from '@nestjs/graphql'; export enum UserScalarFieldEnum { - id = 'id', - email = 'email', - name = 'name', - password = 'password', - bio = 'bio', - image = 'image', - countComments = 'countComments', - rating = 'rating', - role = 'role', + id = 'id', + email = 'email', + name = 'name', + password = 'password', + bio = 'bio', + image = 'image', + countComments = 'countComments', + rating = 'rating', + role = 'role', } registerEnumType(UserScalarFieldEnum, { - name: 'UserScalarFieldEnum', - description: undefined, + name: 'UserScalarFieldEnum', + description: undefined, }); diff --git a/@generated/user/user-scalar-where-with-aggregates.input.ts b/@generated/user/user-scalar-where-with-aggregates.input.ts index 2b1dedbe..3e8a9cca 100644 --- a/@generated/user/user-scalar-where-with-aggregates.input.ts +++ b/@generated/user/user-scalar-where-with-aggregates.input.ts @@ -8,39 +8,39 @@ import { EnumRoleNullableWithAggregatesFilter } from '../prisma/enum-role-nullab @InputType() export class UserScalarWhereWithAggregatesInput { - @Field(() => [UserScalarWhereWithAggregatesInput], { nullable: true }) - AND?: Array; + @Field(() => [UserScalarWhereWithAggregatesInput], { nullable: true }) + AND?: Array; - @Field(() => [UserScalarWhereWithAggregatesInput], { nullable: true }) - OR?: Array; + @Field(() => [UserScalarWhereWithAggregatesInput], { nullable: true }) + OR?: Array; - @Field(() => [UserScalarWhereWithAggregatesInput], { nullable: true }) - NOT?: Array; + @Field(() => [UserScalarWhereWithAggregatesInput], { nullable: true }) + NOT?: Array; - @Field(() => StringWithAggregatesFilter, { nullable: true }) - id?: StringWithAggregatesFilter; + @Field(() => StringWithAggregatesFilter, { nullable: true }) + id?: StringWithAggregatesFilter; - @Field(() => StringWithAggregatesFilter, { nullable: true }) - email?: StringWithAggregatesFilter; + @Field(() => StringWithAggregatesFilter, { nullable: true }) + email?: StringWithAggregatesFilter; - @Field(() => StringWithAggregatesFilter, { nullable: true }) - name?: StringWithAggregatesFilter; + @Field(() => StringWithAggregatesFilter, { nullable: true }) + name?: StringWithAggregatesFilter; - @Field(() => StringWithAggregatesFilter, { nullable: true }) - password?: StringWithAggregatesFilter; + @Field(() => StringWithAggregatesFilter, { nullable: true }) + password?: StringWithAggregatesFilter; - @Field(() => StringNullableWithAggregatesFilter, { nullable: true }) - bio?: StringNullableWithAggregatesFilter; + @Field(() => StringNullableWithAggregatesFilter, { nullable: true }) + bio?: StringNullableWithAggregatesFilter; - @Field(() => StringNullableWithAggregatesFilter, { nullable: true }) - image?: StringNullableWithAggregatesFilter; + @Field(() => StringNullableWithAggregatesFilter, { nullable: true }) + image?: StringNullableWithAggregatesFilter; - @Field(() => IntNullableWithAggregatesFilter, { nullable: true }) - countComments?: IntNullableWithAggregatesFilter; + @Field(() => IntNullableWithAggregatesFilter, { nullable: true }) + countComments?: IntNullableWithAggregatesFilter; - @Field(() => FloatNullableWithAggregatesFilter, { nullable: true }) - rating?: FloatNullableWithAggregatesFilter; + @Field(() => FloatNullableWithAggregatesFilter, { nullable: true }) + rating?: FloatNullableWithAggregatesFilter; - @Field(() => EnumRoleNullableWithAggregatesFilter, { nullable: true }) - role?: EnumRoleNullableWithAggregatesFilter; + @Field(() => EnumRoleNullableWithAggregatesFilter, { nullable: true }) + role?: EnumRoleNullableWithAggregatesFilter; } diff --git a/@generated/user/user-scalar-where.input.ts b/@generated/user/user-scalar-where.input.ts index bc5012c6..0da30445 100644 --- a/@generated/user/user-scalar-where.input.ts +++ b/@generated/user/user-scalar-where.input.ts @@ -8,39 +8,39 @@ import { EnumRoleNullableFilter } from '../prisma/enum-role-nullable-filter.inpu @InputType() export class UserScalarWhereInput { - @Field(() => [UserScalarWhereInput], { nullable: true }) - AND?: Array; + @Field(() => [UserScalarWhereInput], { nullable: true }) + AND?: Array; - @Field(() => [UserScalarWhereInput], { nullable: true }) - OR?: Array; + @Field(() => [UserScalarWhereInput], { nullable: true }) + OR?: Array; - @Field(() => [UserScalarWhereInput], { nullable: true }) - NOT?: Array; + @Field(() => [UserScalarWhereInput], { nullable: true }) + NOT?: Array; - @Field(() => StringFilter, { nullable: true }) - id?: StringFilter; + @Field(() => StringFilter, { nullable: true }) + id?: StringFilter; - @Field(() => StringFilter, { nullable: true }) - email?: StringFilter; + @Field(() => StringFilter, { nullable: true }) + email?: StringFilter; - @Field(() => StringFilter, { nullable: true }) - name?: StringFilter; + @Field(() => StringFilter, { nullable: true }) + name?: StringFilter; - @Field(() => StringFilter, { nullable: true }) - password?: StringFilter; + @Field(() => StringFilter, { nullable: true }) + password?: StringFilter; - @Field(() => StringNullableFilter, { nullable: true }) - bio?: StringNullableFilter; + @Field(() => StringNullableFilter, { nullable: true }) + bio?: StringNullableFilter; - @Field(() => StringNullableFilter, { nullable: true }) - image?: StringNullableFilter; + @Field(() => StringNullableFilter, { nullable: true }) + image?: StringNullableFilter; - @Field(() => IntNullableFilter, { nullable: true }) - countComments?: IntNullableFilter; + @Field(() => IntNullableFilter, { nullable: true }) + countComments?: IntNullableFilter; - @Field(() => FloatNullableFilter, { nullable: true }) - rating?: FloatNullableFilter; + @Field(() => FloatNullableFilter, { nullable: true }) + rating?: FloatNullableFilter; - @Field(() => EnumRoleNullableFilter, { nullable: true }) - role?: EnumRoleNullableFilter; + @Field(() => EnumRoleNullableFilter, { nullable: true }) + role?: EnumRoleNullableFilter; } diff --git a/@generated/user/user-sum-aggregate.input.ts b/@generated/user/user-sum-aggregate.input.ts index 77a66419..8a7b8775 100644 --- a/@generated/user/user-sum-aggregate.input.ts +++ b/@generated/user/user-sum-aggregate.input.ts @@ -3,9 +3,9 @@ import { InputType } from '@nestjs/graphql'; @InputType() export class UserSumAggregateInput { - @Field(() => Boolean, { nullable: true }) - countComments?: true; + @Field(() => Boolean, { nullable: true }) + countComments?: true; - @Field(() => Boolean, { nullable: true }) - rating?: true; + @Field(() => Boolean, { nullable: true }) + rating?: true; } diff --git a/@generated/user/user-sum-aggregate.output.ts b/@generated/user/user-sum-aggregate.output.ts index 6d716c54..14d4b288 100644 --- a/@generated/user/user-sum-aggregate.output.ts +++ b/@generated/user/user-sum-aggregate.output.ts @@ -5,9 +5,9 @@ import { Float } from '@nestjs/graphql'; @ObjectType() export class UserSumAggregate { - @Field(() => Int, { nullable: true }) - countComments?: number; + @Field(() => Int, { nullable: true }) + countComments?: number; - @Field(() => Float, { nullable: true }) - rating?: number; + @Field(() => Float, { nullable: true }) + rating?: number; } diff --git a/@generated/user/user-sum-order-by-aggregate.input.ts b/@generated/user/user-sum-order-by-aggregate.input.ts index 30aafbef..891cab73 100644 --- a/@generated/user/user-sum-order-by-aggregate.input.ts +++ b/@generated/user/user-sum-order-by-aggregate.input.ts @@ -4,9 +4,9 @@ import { SortOrder } from '../prisma/sort-order.enum'; @InputType() export class UserSumOrderByAggregateInput { - @Field(() => SortOrder, { nullable: true }) - countComments?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + countComments?: keyof typeof SortOrder; - @Field(() => SortOrder, { nullable: true }) - rating?: keyof typeof SortOrder; + @Field(() => SortOrder, { nullable: true }) + rating?: keyof typeof SortOrder; } diff --git a/@generated/user/user-unchecked-create-nested-many-without-favorite-articles.input.ts b/@generated/user/user-unchecked-create-nested-many-without-favorite-articles.input.ts index 87857ed0..bd4e4709 100644 --- a/@generated/user/user-unchecked-create-nested-many-without-favorite-articles.input.ts +++ b/@generated/user/user-unchecked-create-nested-many-without-favorite-articles.input.ts @@ -6,12 +6,12 @@ import { UserWhereUniqueInput } from './user-where-unique.input'; @InputType() export class UserUncheckedCreateNestedManyWithoutFavoriteArticlesInput { - @Field(() => [UserCreateWithoutFavoriteArticlesInput], { nullable: true }) - create?: Array; + @Field(() => [UserCreateWithoutFavoriteArticlesInput], { nullable: true }) + create?: Array; - @Field(() => [UserCreateOrConnectWithoutFavoriteArticlesInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [UserCreateOrConnectWithoutFavoriteArticlesInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => [UserWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [UserWhereUniqueInput], { nullable: true }) + connect?: Array; } diff --git a/@generated/user/user-unchecked-create-nested-many-without-followers.input.ts b/@generated/user/user-unchecked-create-nested-many-without-followers.input.ts index b946cd7b..54876525 100644 --- a/@generated/user/user-unchecked-create-nested-many-without-followers.input.ts +++ b/@generated/user/user-unchecked-create-nested-many-without-followers.input.ts @@ -6,12 +6,12 @@ import { UserWhereUniqueInput } from './user-where-unique.input'; @InputType() export class UserUncheckedCreateNestedManyWithoutFollowersInput { - @Field(() => [UserCreateWithoutFollowersInput], { nullable: true }) - create?: Array; + @Field(() => [UserCreateWithoutFollowersInput], { nullable: true }) + create?: Array; - @Field(() => [UserCreateOrConnectWithoutFollowersInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [UserCreateOrConnectWithoutFollowersInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => [UserWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [UserWhereUniqueInput], { nullable: true }) + connect?: Array; } diff --git a/@generated/user/user-unchecked-create-nested-many-without-following.input.ts b/@generated/user/user-unchecked-create-nested-many-without-following.input.ts index edd935d7..d81ac986 100644 --- a/@generated/user/user-unchecked-create-nested-many-without-following.input.ts +++ b/@generated/user/user-unchecked-create-nested-many-without-following.input.ts @@ -6,12 +6,12 @@ import { UserWhereUniqueInput } from './user-where-unique.input'; @InputType() export class UserUncheckedCreateNestedManyWithoutFollowingInput { - @Field(() => [UserCreateWithoutFollowingInput], { nullable: true }) - create?: Array; + @Field(() => [UserCreateWithoutFollowingInput], { nullable: true }) + create?: Array; - @Field(() => [UserCreateOrConnectWithoutFollowingInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [UserCreateOrConnectWithoutFollowingInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => [UserWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [UserWhereUniqueInput], { nullable: true }) + connect?: Array; } diff --git a/@generated/user/user-unchecked-create-without-articles.input.ts b/@generated/user/user-unchecked-create-without-articles.input.ts index b324daa2..4a338110 100644 --- a/@generated/user/user-unchecked-create-without-articles.input.ts +++ b/@generated/user/user-unchecked-create-without-articles.input.ts @@ -13,49 +13,49 @@ import { ProfileUncheckedCreateNestedOneWithoutUserInput } from '../profile/prof @InputType() export class UserUncheckedCreateWithoutArticlesInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => Scalars.GraphQLEmailAddress, { nullable: false }) - email!: string; + @Field(() => Scalars.GraphQLEmailAddress, { nullable: false }) + email!: string; - @Field(() => String, { nullable: false }) - @Validator.MinLength(3) - @Validator.MaxLength(50) - name!: string; + @Field(() => String, { nullable: false }) + @Validator.MinLength(3) + @Validator.MaxLength(50) + name!: string; - @Field(() => String, { nullable: false }) - password!: string; + @Field(() => String, { nullable: false }) + password!: string; - @Field(() => String, { nullable: true }) - bio?: string; + @Field(() => String, { nullable: true }) + bio?: string; - @Field(() => String, { nullable: true }) - image?: string; + @Field(() => String, { nullable: true }) + image?: string; - @Field(() => UserUncheckedCreateNestedManyWithoutFollowersInput, { nullable: true }) - following?: UserUncheckedCreateNestedManyWithoutFollowersInput; + @Field(() => UserUncheckedCreateNestedManyWithoutFollowersInput, { nullable: true }) + following?: UserUncheckedCreateNestedManyWithoutFollowersInput; - @Field(() => UserUncheckedCreateNestedManyWithoutFollowingInput, { nullable: true }) - followers?: UserUncheckedCreateNestedManyWithoutFollowingInput; + @Field(() => UserUncheckedCreateNestedManyWithoutFollowingInput, { nullable: true }) + followers?: UserUncheckedCreateNestedManyWithoutFollowingInput; - @Field(() => ArticleUncheckedCreateNestedManyWithoutFavoritedByInput, { - nullable: true, - }) - favoriteArticles?: ArticleUncheckedCreateNestedManyWithoutFavoritedByInput; + @Field(() => ArticleUncheckedCreateNestedManyWithoutFavoritedByInput, { + nullable: true, + }) + favoriteArticles?: ArticleUncheckedCreateNestedManyWithoutFavoritedByInput; - @Field(() => CommentUncheckedCreateNestedManyWithoutAuthorInput, { nullable: true }) - comments?: CommentUncheckedCreateNestedManyWithoutAuthorInput; + @Field(() => CommentUncheckedCreateNestedManyWithoutAuthorInput, { nullable: true }) + comments?: CommentUncheckedCreateNestedManyWithoutAuthorInput; - @Field(() => Int, { nullable: true }) - countComments?: number; + @Field(() => Int, { nullable: true }) + countComments?: number; - @Field(() => Float, { nullable: true }) - rating?: number; + @Field(() => Float, { nullable: true }) + rating?: number; - @Field(() => Role, { nullable: true }) - role?: keyof typeof Role; + @Field(() => Role, { nullable: true }) + role?: keyof typeof Role; - @Field(() => ProfileUncheckedCreateNestedOneWithoutUserInput, { nullable: true }) - profile?: ProfileUncheckedCreateNestedOneWithoutUserInput; + @Field(() => ProfileUncheckedCreateNestedOneWithoutUserInput, { nullable: true }) + profile?: ProfileUncheckedCreateNestedOneWithoutUserInput; } diff --git a/@generated/user/user-unchecked-create-without-comments.input.ts b/@generated/user/user-unchecked-create-without-comments.input.ts index 3fcc5aa9..79f999fc 100644 --- a/@generated/user/user-unchecked-create-without-comments.input.ts +++ b/@generated/user/user-unchecked-create-without-comments.input.ts @@ -13,49 +13,49 @@ import { ProfileUncheckedCreateNestedOneWithoutUserInput } from '../profile/prof @InputType() export class UserUncheckedCreateWithoutCommentsInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => Scalars.GraphQLEmailAddress, { nullable: false }) - email!: string; + @Field(() => Scalars.GraphQLEmailAddress, { nullable: false }) + email!: string; - @Field(() => String, { nullable: false }) - @Validator.MinLength(3) - @Validator.MaxLength(50) - name!: string; + @Field(() => String, { nullable: false }) + @Validator.MinLength(3) + @Validator.MaxLength(50) + name!: string; - @Field(() => String, { nullable: false }) - password!: string; + @Field(() => String, { nullable: false }) + password!: string; - @Field(() => String, { nullable: true }) - bio?: string; + @Field(() => String, { nullable: true }) + bio?: string; - @Field(() => String, { nullable: true }) - image?: string; + @Field(() => String, { nullable: true }) + image?: string; - @Field(() => UserUncheckedCreateNestedManyWithoutFollowersInput, { nullable: true }) - following?: UserUncheckedCreateNestedManyWithoutFollowersInput; + @Field(() => UserUncheckedCreateNestedManyWithoutFollowersInput, { nullable: true }) + following?: UserUncheckedCreateNestedManyWithoutFollowersInput; - @Field(() => UserUncheckedCreateNestedManyWithoutFollowingInput, { nullable: true }) - followers?: UserUncheckedCreateNestedManyWithoutFollowingInput; + @Field(() => UserUncheckedCreateNestedManyWithoutFollowingInput, { nullable: true }) + followers?: UserUncheckedCreateNestedManyWithoutFollowingInput; - @Field(() => ArticleUncheckedCreateNestedManyWithoutFavoritedByInput, { - nullable: true, - }) - favoriteArticles?: ArticleUncheckedCreateNestedManyWithoutFavoritedByInput; + @Field(() => ArticleUncheckedCreateNestedManyWithoutFavoritedByInput, { + nullable: true, + }) + favoriteArticles?: ArticleUncheckedCreateNestedManyWithoutFavoritedByInput; - @Field(() => ArticleUncheckedCreateNestedManyWithoutAuthorInput, { nullable: true }) - articles?: ArticleUncheckedCreateNestedManyWithoutAuthorInput; + @Field(() => ArticleUncheckedCreateNestedManyWithoutAuthorInput, { nullable: true }) + articles?: ArticleUncheckedCreateNestedManyWithoutAuthorInput; - @Field(() => Int, { nullable: true }) - countComments?: number; + @Field(() => Int, { nullable: true }) + countComments?: number; - @Field(() => Float, { nullable: true }) - rating?: number; + @Field(() => Float, { nullable: true }) + rating?: number; - @Field(() => Role, { nullable: true }) - role?: keyof typeof Role; + @Field(() => Role, { nullable: true }) + role?: keyof typeof Role; - @Field(() => ProfileUncheckedCreateNestedOneWithoutUserInput, { nullable: true }) - profile?: ProfileUncheckedCreateNestedOneWithoutUserInput; + @Field(() => ProfileUncheckedCreateNestedOneWithoutUserInput, { nullable: true }) + profile?: ProfileUncheckedCreateNestedOneWithoutUserInput; } diff --git a/@generated/user/user-unchecked-create-without-favorite-articles.input.ts b/@generated/user/user-unchecked-create-without-favorite-articles.input.ts index c6e9ed07..97d90af0 100644 --- a/@generated/user/user-unchecked-create-without-favorite-articles.input.ts +++ b/@generated/user/user-unchecked-create-without-favorite-articles.input.ts @@ -13,47 +13,47 @@ import { ProfileUncheckedCreateNestedOneWithoutUserInput } from '../profile/prof @InputType() export class UserUncheckedCreateWithoutFavoriteArticlesInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => Scalars.GraphQLEmailAddress, { nullable: false }) - email!: string; + @Field(() => Scalars.GraphQLEmailAddress, { nullable: false }) + email!: string; - @Field(() => String, { nullable: false }) - @Validator.MinLength(3) - @Validator.MaxLength(50) - name!: string; + @Field(() => String, { nullable: false }) + @Validator.MinLength(3) + @Validator.MaxLength(50) + name!: string; - @Field(() => String, { nullable: false }) - password!: string; + @Field(() => String, { nullable: false }) + password!: string; - @Field(() => String, { nullable: true }) - bio?: string; + @Field(() => String, { nullable: true }) + bio?: string; - @Field(() => String, { nullable: true }) - image?: string; + @Field(() => String, { nullable: true }) + image?: string; - @Field(() => UserUncheckedCreateNestedManyWithoutFollowersInput, { nullable: true }) - following?: UserUncheckedCreateNestedManyWithoutFollowersInput; + @Field(() => UserUncheckedCreateNestedManyWithoutFollowersInput, { nullable: true }) + following?: UserUncheckedCreateNestedManyWithoutFollowersInput; - @Field(() => UserUncheckedCreateNestedManyWithoutFollowingInput, { nullable: true }) - followers?: UserUncheckedCreateNestedManyWithoutFollowingInput; + @Field(() => UserUncheckedCreateNestedManyWithoutFollowingInput, { nullable: true }) + followers?: UserUncheckedCreateNestedManyWithoutFollowingInput; - @Field(() => ArticleUncheckedCreateNestedManyWithoutAuthorInput, { nullable: true }) - articles?: ArticleUncheckedCreateNestedManyWithoutAuthorInput; + @Field(() => ArticleUncheckedCreateNestedManyWithoutAuthorInput, { nullable: true }) + articles?: ArticleUncheckedCreateNestedManyWithoutAuthorInput; - @Field(() => CommentUncheckedCreateNestedManyWithoutAuthorInput, { nullable: true }) - comments?: CommentUncheckedCreateNestedManyWithoutAuthorInput; + @Field(() => CommentUncheckedCreateNestedManyWithoutAuthorInput, { nullable: true }) + comments?: CommentUncheckedCreateNestedManyWithoutAuthorInput; - @Field(() => Int, { nullable: true }) - countComments?: number; + @Field(() => Int, { nullable: true }) + countComments?: number; - @Field(() => Float, { nullable: true }) - rating?: number; + @Field(() => Float, { nullable: true }) + rating?: number; - @Field(() => Role, { nullable: true }) - role?: keyof typeof Role; + @Field(() => Role, { nullable: true }) + role?: keyof typeof Role; - @Field(() => ProfileUncheckedCreateNestedOneWithoutUserInput, { nullable: true }) - profile?: ProfileUncheckedCreateNestedOneWithoutUserInput; + @Field(() => ProfileUncheckedCreateNestedOneWithoutUserInput, { nullable: true }) + profile?: ProfileUncheckedCreateNestedOneWithoutUserInput; } diff --git a/@generated/user/user-unchecked-create-without-followers.input.ts b/@generated/user/user-unchecked-create-without-followers.input.ts index c28dfd14..597a1a51 100644 --- a/@generated/user/user-unchecked-create-without-followers.input.ts +++ b/@generated/user/user-unchecked-create-without-followers.input.ts @@ -13,49 +13,49 @@ import { ProfileUncheckedCreateNestedOneWithoutUserInput } from '../profile/prof @InputType() export class UserUncheckedCreateWithoutFollowersInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => Scalars.GraphQLEmailAddress, { nullable: false }) - email!: string; + @Field(() => Scalars.GraphQLEmailAddress, { nullable: false }) + email!: string; - @Field(() => String, { nullable: false }) - @Validator.MinLength(3) - @Validator.MaxLength(50) - name!: string; + @Field(() => String, { nullable: false }) + @Validator.MinLength(3) + @Validator.MaxLength(50) + name!: string; - @Field(() => String, { nullable: false }) - password!: string; + @Field(() => String, { nullable: false }) + password!: string; - @Field(() => String, { nullable: true }) - bio?: string; + @Field(() => String, { nullable: true }) + bio?: string; - @Field(() => String, { nullable: true }) - image?: string; + @Field(() => String, { nullable: true }) + image?: string; - @Field(() => UserUncheckedCreateNestedManyWithoutFollowersInput, { nullable: true }) - following?: UserUncheckedCreateNestedManyWithoutFollowersInput; + @Field(() => UserUncheckedCreateNestedManyWithoutFollowersInput, { nullable: true }) + following?: UserUncheckedCreateNestedManyWithoutFollowersInput; - @Field(() => ArticleUncheckedCreateNestedManyWithoutFavoritedByInput, { - nullable: true, - }) - favoriteArticles?: ArticleUncheckedCreateNestedManyWithoutFavoritedByInput; + @Field(() => ArticleUncheckedCreateNestedManyWithoutFavoritedByInput, { + nullable: true, + }) + favoriteArticles?: ArticleUncheckedCreateNestedManyWithoutFavoritedByInput; - @Field(() => ArticleUncheckedCreateNestedManyWithoutAuthorInput, { nullable: true }) - articles?: ArticleUncheckedCreateNestedManyWithoutAuthorInput; + @Field(() => ArticleUncheckedCreateNestedManyWithoutAuthorInput, { nullable: true }) + articles?: ArticleUncheckedCreateNestedManyWithoutAuthorInput; - @Field(() => CommentUncheckedCreateNestedManyWithoutAuthorInput, { nullable: true }) - comments?: CommentUncheckedCreateNestedManyWithoutAuthorInput; + @Field(() => CommentUncheckedCreateNestedManyWithoutAuthorInput, { nullable: true }) + comments?: CommentUncheckedCreateNestedManyWithoutAuthorInput; - @Field(() => Int, { nullable: true }) - countComments?: number; + @Field(() => Int, { nullable: true }) + countComments?: number; - @Field(() => Float, { nullable: true }) - rating?: number; + @Field(() => Float, { nullable: true }) + rating?: number; - @Field(() => Role, { nullable: true }) - role?: keyof typeof Role; + @Field(() => Role, { nullable: true }) + role?: keyof typeof Role; - @Field(() => ProfileUncheckedCreateNestedOneWithoutUserInput, { nullable: true }) - profile?: ProfileUncheckedCreateNestedOneWithoutUserInput; + @Field(() => ProfileUncheckedCreateNestedOneWithoutUserInput, { nullable: true }) + profile?: ProfileUncheckedCreateNestedOneWithoutUserInput; } diff --git a/@generated/user/user-unchecked-create-without-following.input.ts b/@generated/user/user-unchecked-create-without-following.input.ts index f47c862b..fcdec53f 100644 --- a/@generated/user/user-unchecked-create-without-following.input.ts +++ b/@generated/user/user-unchecked-create-without-following.input.ts @@ -13,49 +13,49 @@ import { ProfileUncheckedCreateNestedOneWithoutUserInput } from '../profile/prof @InputType() export class UserUncheckedCreateWithoutFollowingInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => Scalars.GraphQLEmailAddress, { nullable: false }) - email!: string; + @Field(() => Scalars.GraphQLEmailAddress, { nullable: false }) + email!: string; - @Field(() => String, { nullable: false }) - @Validator.MinLength(3) - @Validator.MaxLength(50) - name!: string; + @Field(() => String, { nullable: false }) + @Validator.MinLength(3) + @Validator.MaxLength(50) + name!: string; - @Field(() => String, { nullable: false }) - password!: string; + @Field(() => String, { nullable: false }) + password!: string; - @Field(() => String, { nullable: true }) - bio?: string; + @Field(() => String, { nullable: true }) + bio?: string; - @Field(() => String, { nullable: true }) - image?: string; + @Field(() => String, { nullable: true }) + image?: string; - @Field(() => UserUncheckedCreateNestedManyWithoutFollowingInput, { nullable: true }) - followers?: UserUncheckedCreateNestedManyWithoutFollowingInput; + @Field(() => UserUncheckedCreateNestedManyWithoutFollowingInput, { nullable: true }) + followers?: UserUncheckedCreateNestedManyWithoutFollowingInput; - @Field(() => ArticleUncheckedCreateNestedManyWithoutFavoritedByInput, { - nullable: true, - }) - favoriteArticles?: ArticleUncheckedCreateNestedManyWithoutFavoritedByInput; + @Field(() => ArticleUncheckedCreateNestedManyWithoutFavoritedByInput, { + nullable: true, + }) + favoriteArticles?: ArticleUncheckedCreateNestedManyWithoutFavoritedByInput; - @Field(() => ArticleUncheckedCreateNestedManyWithoutAuthorInput, { nullable: true }) - articles?: ArticleUncheckedCreateNestedManyWithoutAuthorInput; + @Field(() => ArticleUncheckedCreateNestedManyWithoutAuthorInput, { nullable: true }) + articles?: ArticleUncheckedCreateNestedManyWithoutAuthorInput; - @Field(() => CommentUncheckedCreateNestedManyWithoutAuthorInput, { nullable: true }) - comments?: CommentUncheckedCreateNestedManyWithoutAuthorInput; + @Field(() => CommentUncheckedCreateNestedManyWithoutAuthorInput, { nullable: true }) + comments?: CommentUncheckedCreateNestedManyWithoutAuthorInput; - @Field(() => Int, { nullable: true }) - countComments?: number; + @Field(() => Int, { nullable: true }) + countComments?: number; - @Field(() => Float, { nullable: true }) - rating?: number; + @Field(() => Float, { nullable: true }) + rating?: number; - @Field(() => Role, { nullable: true }) - role?: keyof typeof Role; + @Field(() => Role, { nullable: true }) + role?: keyof typeof Role; - @Field(() => ProfileUncheckedCreateNestedOneWithoutUserInput, { nullable: true }) - profile?: ProfileUncheckedCreateNestedOneWithoutUserInput; + @Field(() => ProfileUncheckedCreateNestedOneWithoutUserInput, { nullable: true }) + profile?: ProfileUncheckedCreateNestedOneWithoutUserInput; } diff --git a/@generated/user/user-unchecked-create-without-profile.input.ts b/@generated/user/user-unchecked-create-without-profile.input.ts index 2b99e99d..60792861 100644 --- a/@generated/user/user-unchecked-create-without-profile.input.ts +++ b/@generated/user/user-unchecked-create-without-profile.input.ts @@ -13,49 +13,49 @@ import { Role } from '../prisma/role.enum'; @InputType() export class UserUncheckedCreateWithoutProfileInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => Scalars.GraphQLEmailAddress, { nullable: false }) - email!: string; + @Field(() => Scalars.GraphQLEmailAddress, { nullable: false }) + email!: string; - @Field(() => String, { nullable: false }) - @Validator.MinLength(3) - @Validator.MaxLength(50) - name!: string; + @Field(() => String, { nullable: false }) + @Validator.MinLength(3) + @Validator.MaxLength(50) + name!: string; - @Field(() => String, { nullable: false }) - password!: string; + @Field(() => String, { nullable: false }) + password!: string; - @Field(() => String, { nullable: true }) - bio?: string; + @Field(() => String, { nullable: true }) + bio?: string; - @Field(() => String, { nullable: true }) - image?: string; + @Field(() => String, { nullable: true }) + image?: string; - @Field(() => UserUncheckedCreateNestedManyWithoutFollowersInput, { nullable: true }) - following?: UserUncheckedCreateNestedManyWithoutFollowersInput; + @Field(() => UserUncheckedCreateNestedManyWithoutFollowersInput, { nullable: true }) + following?: UserUncheckedCreateNestedManyWithoutFollowersInput; - @Field(() => UserUncheckedCreateNestedManyWithoutFollowingInput, { nullable: true }) - followers?: UserUncheckedCreateNestedManyWithoutFollowingInput; + @Field(() => UserUncheckedCreateNestedManyWithoutFollowingInput, { nullable: true }) + followers?: UserUncheckedCreateNestedManyWithoutFollowingInput; - @Field(() => ArticleUncheckedCreateNestedManyWithoutFavoritedByInput, { - nullable: true, - }) - favoriteArticles?: ArticleUncheckedCreateNestedManyWithoutFavoritedByInput; + @Field(() => ArticleUncheckedCreateNestedManyWithoutFavoritedByInput, { + nullable: true, + }) + favoriteArticles?: ArticleUncheckedCreateNestedManyWithoutFavoritedByInput; - @Field(() => ArticleUncheckedCreateNestedManyWithoutAuthorInput, { nullable: true }) - articles?: ArticleUncheckedCreateNestedManyWithoutAuthorInput; + @Field(() => ArticleUncheckedCreateNestedManyWithoutAuthorInput, { nullable: true }) + articles?: ArticleUncheckedCreateNestedManyWithoutAuthorInput; - @Field(() => CommentUncheckedCreateNestedManyWithoutAuthorInput, { nullable: true }) - comments?: CommentUncheckedCreateNestedManyWithoutAuthorInput; + @Field(() => CommentUncheckedCreateNestedManyWithoutAuthorInput, { nullable: true }) + comments?: CommentUncheckedCreateNestedManyWithoutAuthorInput; - @Field(() => Int, { nullable: true }) - countComments?: number; + @Field(() => Int, { nullable: true }) + countComments?: number; - @Field(() => Float, { nullable: true }) - rating?: number; + @Field(() => Float, { nullable: true }) + rating?: number; - @Field(() => Role, { nullable: true }) - role?: keyof typeof Role; + @Field(() => Role, { nullable: true }) + role?: keyof typeof Role; } diff --git a/@generated/user/user-unchecked-create.input.ts b/@generated/user/user-unchecked-create.input.ts index fadb7089..6db21b3d 100644 --- a/@generated/user/user-unchecked-create.input.ts +++ b/@generated/user/user-unchecked-create.input.ts @@ -14,52 +14,52 @@ import { ProfileUncheckedCreateNestedOneWithoutUserInput } from '../profile/prof @InputType() export class UserUncheckedCreateInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => Scalars.GraphQLEmailAddress, { nullable: false }) - email!: string; + @Field(() => Scalars.GraphQLEmailAddress, { nullable: false }) + email!: string; - @Field(() => String, { nullable: false }) - @Validator.MinLength(3) - @Validator.MaxLength(50) - name!: string; + @Field(() => String, { nullable: false }) + @Validator.MinLength(3) + @Validator.MaxLength(50) + name!: string; - @Field(() => String, { nullable: false }) - password!: string; + @Field(() => String, { nullable: false }) + password!: string; - @Field(() => String, { nullable: true }) - bio?: string; + @Field(() => String, { nullable: true }) + bio?: string; - @Field(() => String, { nullable: true }) - image?: string; + @Field(() => String, { nullable: true }) + image?: string; - @Field(() => UserUncheckedCreateNestedManyWithoutFollowersInput, { nullable: true }) - following?: UserUncheckedCreateNestedManyWithoutFollowersInput; + @Field(() => UserUncheckedCreateNestedManyWithoutFollowersInput, { nullable: true }) + following?: UserUncheckedCreateNestedManyWithoutFollowersInput; - @Field(() => UserUncheckedCreateNestedManyWithoutFollowingInput, { nullable: true }) - followers?: UserUncheckedCreateNestedManyWithoutFollowingInput; + @Field(() => UserUncheckedCreateNestedManyWithoutFollowingInput, { nullable: true }) + followers?: UserUncheckedCreateNestedManyWithoutFollowingInput; - @Field(() => ArticleUncheckedCreateNestedManyWithoutFavoritedByInput, { - nullable: true, - }) - favoriteArticles?: ArticleUncheckedCreateNestedManyWithoutFavoritedByInput; + @Field(() => ArticleUncheckedCreateNestedManyWithoutFavoritedByInput, { + nullable: true, + }) + favoriteArticles?: ArticleUncheckedCreateNestedManyWithoutFavoritedByInput; - @Field(() => ArticleUncheckedCreateNestedManyWithoutAuthorInput, { nullable: true }) - articles?: ArticleUncheckedCreateNestedManyWithoutAuthorInput; + @Field(() => ArticleUncheckedCreateNestedManyWithoutAuthorInput, { nullable: true }) + articles?: ArticleUncheckedCreateNestedManyWithoutAuthorInput; - @Field(() => CommentUncheckedCreateNestedManyWithoutAuthorInput, { nullable: true }) - comments?: CommentUncheckedCreateNestedManyWithoutAuthorInput; + @Field(() => CommentUncheckedCreateNestedManyWithoutAuthorInput, { nullable: true }) + comments?: CommentUncheckedCreateNestedManyWithoutAuthorInput; - @Field(() => Int, { nullable: true }) - countComments?: number; + @Field(() => Int, { nullable: true }) + countComments?: number; - @Field(() => Float, { nullable: true }) - rating?: number; + @Field(() => Float, { nullable: true }) + rating?: number; - @Field(() => Role, { nullable: true }) - role?: keyof typeof Role; + @Field(() => Role, { nullable: true }) + role?: keyof typeof Role; - @Field(() => ProfileUncheckedCreateNestedOneWithoutUserInput, { nullable: true }) - profile?: ProfileUncheckedCreateNestedOneWithoutUserInput; + @Field(() => ProfileUncheckedCreateNestedOneWithoutUserInput, { nullable: true }) + profile?: ProfileUncheckedCreateNestedOneWithoutUserInput; } diff --git a/@generated/user/user-unchecked-update-many-without-favorite-articles.input.ts b/@generated/user/user-unchecked-update-many-without-favorite-articles.input.ts index dbebfa9f..b7fc1397 100644 --- a/@generated/user/user-unchecked-update-many-without-favorite-articles.input.ts +++ b/@generated/user/user-unchecked-update-many-without-favorite-articles.input.ts @@ -10,39 +10,39 @@ import { UserScalarWhereInput } from './user-scalar-where.input'; @InputType() export class UserUncheckedUpdateManyWithoutFavoriteArticlesInput { - @Field(() => [UserCreateWithoutFavoriteArticlesInput], { nullable: true }) - create?: Array; + @Field(() => [UserCreateWithoutFavoriteArticlesInput], { nullable: true }) + create?: Array; - @Field(() => [UserCreateOrConnectWithoutFavoriteArticlesInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [UserCreateOrConnectWithoutFavoriteArticlesInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => [UserUpsertWithWhereUniqueWithoutFavoriteArticlesInput], { - nullable: true, - }) - upsert?: Array; + @Field(() => [UserUpsertWithWhereUniqueWithoutFavoriteArticlesInput], { + nullable: true, + }) + upsert?: Array; - @Field(() => [UserWhereUniqueInput], { nullable: true }) - set?: Array; + @Field(() => [UserWhereUniqueInput], { nullable: true }) + set?: Array; - @Field(() => [UserWhereUniqueInput], { nullable: true }) - disconnect?: Array; + @Field(() => [UserWhereUniqueInput], { nullable: true }) + disconnect?: Array; - @Field(() => [UserWhereUniqueInput], { nullable: true }) - delete?: Array; + @Field(() => [UserWhereUniqueInput], { nullable: true }) + delete?: Array; - @Field(() => [UserWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [UserWhereUniqueInput], { nullable: true }) + connect?: Array; - @Field(() => [UserUpdateWithWhereUniqueWithoutFavoriteArticlesInput], { - nullable: true, - }) - update?: Array; + @Field(() => [UserUpdateWithWhereUniqueWithoutFavoriteArticlesInput], { + nullable: true, + }) + update?: Array; - @Field(() => [UserUpdateManyWithWhereWithoutFavoriteArticlesInput], { - nullable: true, - }) - updateMany?: Array; + @Field(() => [UserUpdateManyWithWhereWithoutFavoriteArticlesInput], { + nullable: true, + }) + updateMany?: Array; - @Field(() => [UserScalarWhereInput], { nullable: true }) - deleteMany?: Array; + @Field(() => [UserScalarWhereInput], { nullable: true }) + deleteMany?: Array; } diff --git a/@generated/user/user-unchecked-update-many-without-favorited-by.input.ts b/@generated/user/user-unchecked-update-many-without-favorited-by.input.ts index d66c3ecb..e71e11ba 100644 --- a/@generated/user/user-unchecked-update-many-without-favorited-by.input.ts +++ b/@generated/user/user-unchecked-update-many-without-favorited-by.input.ts @@ -8,30 +8,30 @@ import { NullableEnumRoleFieldUpdateOperationsInput } from '../prisma/nullable-e @InputType() export class UserUncheckedUpdateManyWithoutFavoritedByInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - email?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + email?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - name?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + name?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - password?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + password?: StringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - bio?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + bio?: NullableStringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - image?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + image?: NullableStringFieldUpdateOperationsInput; - @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) - countComments?: NullableIntFieldUpdateOperationsInput; + @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) + countComments?: NullableIntFieldUpdateOperationsInput; - @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) - rating?: NullableFloatFieldUpdateOperationsInput; + @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) + rating?: NullableFloatFieldUpdateOperationsInput; - @Field(() => NullableEnumRoleFieldUpdateOperationsInput, { nullable: true }) - role?: NullableEnumRoleFieldUpdateOperationsInput; + @Field(() => NullableEnumRoleFieldUpdateOperationsInput, { nullable: true }) + role?: NullableEnumRoleFieldUpdateOperationsInput; } diff --git a/@generated/user/user-unchecked-update-many-without-followers.input.ts b/@generated/user/user-unchecked-update-many-without-followers.input.ts index af242bfb..5cf14d08 100644 --- a/@generated/user/user-unchecked-update-many-without-followers.input.ts +++ b/@generated/user/user-unchecked-update-many-without-followers.input.ts @@ -10,33 +10,33 @@ import { UserScalarWhereInput } from './user-scalar-where.input'; @InputType() export class UserUncheckedUpdateManyWithoutFollowersInput { - @Field(() => [UserCreateWithoutFollowersInput], { nullable: true }) - create?: Array; + @Field(() => [UserCreateWithoutFollowersInput], { nullable: true }) + create?: Array; - @Field(() => [UserCreateOrConnectWithoutFollowersInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [UserCreateOrConnectWithoutFollowersInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => [UserUpsertWithWhereUniqueWithoutFollowersInput], { nullable: true }) - upsert?: Array; + @Field(() => [UserUpsertWithWhereUniqueWithoutFollowersInput], { nullable: true }) + upsert?: Array; - @Field(() => [UserWhereUniqueInput], { nullable: true }) - set?: Array; + @Field(() => [UserWhereUniqueInput], { nullable: true }) + set?: Array; - @Field(() => [UserWhereUniqueInput], { nullable: true }) - disconnect?: Array; + @Field(() => [UserWhereUniqueInput], { nullable: true }) + disconnect?: Array; - @Field(() => [UserWhereUniqueInput], { nullable: true }) - delete?: Array; + @Field(() => [UserWhereUniqueInput], { nullable: true }) + delete?: Array; - @Field(() => [UserWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [UserWhereUniqueInput], { nullable: true }) + connect?: Array; - @Field(() => [UserUpdateWithWhereUniqueWithoutFollowersInput], { nullable: true }) - update?: Array; + @Field(() => [UserUpdateWithWhereUniqueWithoutFollowersInput], { nullable: true }) + update?: Array; - @Field(() => [UserUpdateManyWithWhereWithoutFollowersInput], { nullable: true }) - updateMany?: Array; + @Field(() => [UserUpdateManyWithWhereWithoutFollowersInput], { nullable: true }) + updateMany?: Array; - @Field(() => [UserScalarWhereInput], { nullable: true }) - deleteMany?: Array; + @Field(() => [UserScalarWhereInput], { nullable: true }) + deleteMany?: Array; } diff --git a/@generated/user/user-unchecked-update-many-without-following.input.ts b/@generated/user/user-unchecked-update-many-without-following.input.ts index dd1ae007..5139b5aa 100644 --- a/@generated/user/user-unchecked-update-many-without-following.input.ts +++ b/@generated/user/user-unchecked-update-many-without-following.input.ts @@ -10,33 +10,33 @@ import { UserScalarWhereInput } from './user-scalar-where.input'; @InputType() export class UserUncheckedUpdateManyWithoutFollowingInput { - @Field(() => [UserCreateWithoutFollowingInput], { nullable: true }) - create?: Array; + @Field(() => [UserCreateWithoutFollowingInput], { nullable: true }) + create?: Array; - @Field(() => [UserCreateOrConnectWithoutFollowingInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [UserCreateOrConnectWithoutFollowingInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => [UserUpsertWithWhereUniqueWithoutFollowingInput], { nullable: true }) - upsert?: Array; + @Field(() => [UserUpsertWithWhereUniqueWithoutFollowingInput], { nullable: true }) + upsert?: Array; - @Field(() => [UserWhereUniqueInput], { nullable: true }) - set?: Array; + @Field(() => [UserWhereUniqueInput], { nullable: true }) + set?: Array; - @Field(() => [UserWhereUniqueInput], { nullable: true }) - disconnect?: Array; + @Field(() => [UserWhereUniqueInput], { nullable: true }) + disconnect?: Array; - @Field(() => [UserWhereUniqueInput], { nullable: true }) - delete?: Array; + @Field(() => [UserWhereUniqueInput], { nullable: true }) + delete?: Array; - @Field(() => [UserWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [UserWhereUniqueInput], { nullable: true }) + connect?: Array; - @Field(() => [UserUpdateWithWhereUniqueWithoutFollowingInput], { nullable: true }) - update?: Array; + @Field(() => [UserUpdateWithWhereUniqueWithoutFollowingInput], { nullable: true }) + update?: Array; - @Field(() => [UserUpdateManyWithWhereWithoutFollowingInput], { nullable: true }) - updateMany?: Array; + @Field(() => [UserUpdateManyWithWhereWithoutFollowingInput], { nullable: true }) + updateMany?: Array; - @Field(() => [UserScalarWhereInput], { nullable: true }) - deleteMany?: Array; + @Field(() => [UserScalarWhereInput], { nullable: true }) + deleteMany?: Array; } diff --git a/@generated/user/user-unchecked-update-many.input.ts b/@generated/user/user-unchecked-update-many.input.ts index a2dfd4a5..ef2b0842 100644 --- a/@generated/user/user-unchecked-update-many.input.ts +++ b/@generated/user/user-unchecked-update-many.input.ts @@ -8,30 +8,30 @@ import { NullableEnumRoleFieldUpdateOperationsInput } from '../prisma/nullable-e @InputType() export class UserUncheckedUpdateManyInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - email?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + email?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - name?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + name?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - password?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + password?: StringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - bio?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + bio?: NullableStringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - image?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + image?: NullableStringFieldUpdateOperationsInput; - @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) - countComments?: NullableIntFieldUpdateOperationsInput; + @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) + countComments?: NullableIntFieldUpdateOperationsInput; - @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) - rating?: NullableFloatFieldUpdateOperationsInput; + @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) + rating?: NullableFloatFieldUpdateOperationsInput; - @Field(() => NullableEnumRoleFieldUpdateOperationsInput, { nullable: true }) - role?: NullableEnumRoleFieldUpdateOperationsInput; + @Field(() => NullableEnumRoleFieldUpdateOperationsInput, { nullable: true }) + role?: NullableEnumRoleFieldUpdateOperationsInput; } diff --git a/@generated/user/user-unchecked-update-without-articles.input.ts b/@generated/user/user-unchecked-update-without-articles.input.ts index 120cdb76..12576eac 100644 --- a/@generated/user/user-unchecked-update-without-articles.input.ts +++ b/@generated/user/user-unchecked-update-without-articles.input.ts @@ -13,45 +13,45 @@ import { ProfileUncheckedUpdateOneWithoutUserInput } from '../profile/profile-un @InputType() export class UserUncheckedUpdateWithoutArticlesInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - email?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + email?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - name?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + name?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - password?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + password?: StringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - bio?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + bio?: NullableStringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - image?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + image?: NullableStringFieldUpdateOperationsInput; - @Field(() => UserUncheckedUpdateManyWithoutFollowersInput, { nullable: true }) - following?: UserUncheckedUpdateManyWithoutFollowersInput; + @Field(() => UserUncheckedUpdateManyWithoutFollowersInput, { nullable: true }) + following?: UserUncheckedUpdateManyWithoutFollowersInput; - @Field(() => UserUncheckedUpdateManyWithoutFollowingInput, { nullable: true }) - followers?: UserUncheckedUpdateManyWithoutFollowingInput; + @Field(() => UserUncheckedUpdateManyWithoutFollowingInput, { nullable: true }) + followers?: UserUncheckedUpdateManyWithoutFollowingInput; - @Field(() => ArticleUncheckedUpdateManyWithoutFavoritedByInput, { nullable: true }) - favoriteArticles?: ArticleUncheckedUpdateManyWithoutFavoritedByInput; + @Field(() => ArticleUncheckedUpdateManyWithoutFavoritedByInput, { nullable: true }) + favoriteArticles?: ArticleUncheckedUpdateManyWithoutFavoritedByInput; - @Field(() => CommentUncheckedUpdateManyWithoutAuthorInput, { nullable: true }) - comments?: CommentUncheckedUpdateManyWithoutAuthorInput; + @Field(() => CommentUncheckedUpdateManyWithoutAuthorInput, { nullable: true }) + comments?: CommentUncheckedUpdateManyWithoutAuthorInput; - @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) - countComments?: NullableIntFieldUpdateOperationsInput; + @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) + countComments?: NullableIntFieldUpdateOperationsInput; - @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) - rating?: NullableFloatFieldUpdateOperationsInput; + @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) + rating?: NullableFloatFieldUpdateOperationsInput; - @Field(() => NullableEnumRoleFieldUpdateOperationsInput, { nullable: true }) - role?: NullableEnumRoleFieldUpdateOperationsInput; + @Field(() => NullableEnumRoleFieldUpdateOperationsInput, { nullable: true }) + role?: NullableEnumRoleFieldUpdateOperationsInput; - @Field(() => ProfileUncheckedUpdateOneWithoutUserInput, { nullable: true }) - profile?: ProfileUncheckedUpdateOneWithoutUserInput; + @Field(() => ProfileUncheckedUpdateOneWithoutUserInput, { nullable: true }) + profile?: ProfileUncheckedUpdateOneWithoutUserInput; } diff --git a/@generated/user/user-unchecked-update-without-comments.input.ts b/@generated/user/user-unchecked-update-without-comments.input.ts index 822ff08a..015f60a6 100644 --- a/@generated/user/user-unchecked-update-without-comments.input.ts +++ b/@generated/user/user-unchecked-update-without-comments.input.ts @@ -13,45 +13,45 @@ import { ProfileUncheckedUpdateOneWithoutUserInput } from '../profile/profile-un @InputType() export class UserUncheckedUpdateWithoutCommentsInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - email?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + email?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - name?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + name?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - password?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + password?: StringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - bio?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + bio?: NullableStringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - image?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + image?: NullableStringFieldUpdateOperationsInput; - @Field(() => UserUncheckedUpdateManyWithoutFollowersInput, { nullable: true }) - following?: UserUncheckedUpdateManyWithoutFollowersInput; + @Field(() => UserUncheckedUpdateManyWithoutFollowersInput, { nullable: true }) + following?: UserUncheckedUpdateManyWithoutFollowersInput; - @Field(() => UserUncheckedUpdateManyWithoutFollowingInput, { nullable: true }) - followers?: UserUncheckedUpdateManyWithoutFollowingInput; + @Field(() => UserUncheckedUpdateManyWithoutFollowingInput, { nullable: true }) + followers?: UserUncheckedUpdateManyWithoutFollowingInput; - @Field(() => ArticleUncheckedUpdateManyWithoutFavoritedByInput, { nullable: true }) - favoriteArticles?: ArticleUncheckedUpdateManyWithoutFavoritedByInput; + @Field(() => ArticleUncheckedUpdateManyWithoutFavoritedByInput, { nullable: true }) + favoriteArticles?: ArticleUncheckedUpdateManyWithoutFavoritedByInput; - @Field(() => ArticleUncheckedUpdateManyWithoutAuthorInput, { nullable: true }) - articles?: ArticleUncheckedUpdateManyWithoutAuthorInput; + @Field(() => ArticleUncheckedUpdateManyWithoutAuthorInput, { nullable: true }) + articles?: ArticleUncheckedUpdateManyWithoutAuthorInput; - @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) - countComments?: NullableIntFieldUpdateOperationsInput; + @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) + countComments?: NullableIntFieldUpdateOperationsInput; - @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) - rating?: NullableFloatFieldUpdateOperationsInput; + @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) + rating?: NullableFloatFieldUpdateOperationsInput; - @Field(() => NullableEnumRoleFieldUpdateOperationsInput, { nullable: true }) - role?: NullableEnumRoleFieldUpdateOperationsInput; + @Field(() => NullableEnumRoleFieldUpdateOperationsInput, { nullable: true }) + role?: NullableEnumRoleFieldUpdateOperationsInput; - @Field(() => ProfileUncheckedUpdateOneWithoutUserInput, { nullable: true }) - profile?: ProfileUncheckedUpdateOneWithoutUserInput; + @Field(() => ProfileUncheckedUpdateOneWithoutUserInput, { nullable: true }) + profile?: ProfileUncheckedUpdateOneWithoutUserInput; } diff --git a/@generated/user/user-unchecked-update-without-favorite-articles.input.ts b/@generated/user/user-unchecked-update-without-favorite-articles.input.ts index aeafb2b6..c4b303c2 100644 --- a/@generated/user/user-unchecked-update-without-favorite-articles.input.ts +++ b/@generated/user/user-unchecked-update-without-favorite-articles.input.ts @@ -13,45 +13,45 @@ import { ProfileUncheckedUpdateOneWithoutUserInput } from '../profile/profile-un @InputType() export class UserUncheckedUpdateWithoutFavoriteArticlesInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - email?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + email?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - name?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + name?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - password?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + password?: StringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - bio?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + bio?: NullableStringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - image?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + image?: NullableStringFieldUpdateOperationsInput; - @Field(() => UserUncheckedUpdateManyWithoutFollowersInput, { nullable: true }) - following?: UserUncheckedUpdateManyWithoutFollowersInput; + @Field(() => UserUncheckedUpdateManyWithoutFollowersInput, { nullable: true }) + following?: UserUncheckedUpdateManyWithoutFollowersInput; - @Field(() => UserUncheckedUpdateManyWithoutFollowingInput, { nullable: true }) - followers?: UserUncheckedUpdateManyWithoutFollowingInput; + @Field(() => UserUncheckedUpdateManyWithoutFollowingInput, { nullable: true }) + followers?: UserUncheckedUpdateManyWithoutFollowingInput; - @Field(() => ArticleUncheckedUpdateManyWithoutAuthorInput, { nullable: true }) - articles?: ArticleUncheckedUpdateManyWithoutAuthorInput; + @Field(() => ArticleUncheckedUpdateManyWithoutAuthorInput, { nullable: true }) + articles?: ArticleUncheckedUpdateManyWithoutAuthorInput; - @Field(() => CommentUncheckedUpdateManyWithoutAuthorInput, { nullable: true }) - comments?: CommentUncheckedUpdateManyWithoutAuthorInput; + @Field(() => CommentUncheckedUpdateManyWithoutAuthorInput, { nullable: true }) + comments?: CommentUncheckedUpdateManyWithoutAuthorInput; - @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) - countComments?: NullableIntFieldUpdateOperationsInput; + @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) + countComments?: NullableIntFieldUpdateOperationsInput; - @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) - rating?: NullableFloatFieldUpdateOperationsInput; + @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) + rating?: NullableFloatFieldUpdateOperationsInput; - @Field(() => NullableEnumRoleFieldUpdateOperationsInput, { nullable: true }) - role?: NullableEnumRoleFieldUpdateOperationsInput; + @Field(() => NullableEnumRoleFieldUpdateOperationsInput, { nullable: true }) + role?: NullableEnumRoleFieldUpdateOperationsInput; - @Field(() => ProfileUncheckedUpdateOneWithoutUserInput, { nullable: true }) - profile?: ProfileUncheckedUpdateOneWithoutUserInput; + @Field(() => ProfileUncheckedUpdateOneWithoutUserInput, { nullable: true }) + profile?: ProfileUncheckedUpdateOneWithoutUserInput; } diff --git a/@generated/user/user-unchecked-update-without-followers.input.ts b/@generated/user/user-unchecked-update-without-followers.input.ts index 13128d39..184bd172 100644 --- a/@generated/user/user-unchecked-update-without-followers.input.ts +++ b/@generated/user/user-unchecked-update-without-followers.input.ts @@ -13,45 +13,45 @@ import { ProfileUncheckedUpdateOneWithoutUserInput } from '../profile/profile-un @InputType() export class UserUncheckedUpdateWithoutFollowersInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - email?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + email?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - name?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + name?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - password?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + password?: StringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - bio?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + bio?: NullableStringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - image?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + image?: NullableStringFieldUpdateOperationsInput; - @Field(() => UserUncheckedUpdateManyWithoutFollowersInput, { nullable: true }) - following?: UserUncheckedUpdateManyWithoutFollowersInput; + @Field(() => UserUncheckedUpdateManyWithoutFollowersInput, { nullable: true }) + following?: UserUncheckedUpdateManyWithoutFollowersInput; - @Field(() => ArticleUncheckedUpdateManyWithoutFavoritedByInput, { nullable: true }) - favoriteArticles?: ArticleUncheckedUpdateManyWithoutFavoritedByInput; + @Field(() => ArticleUncheckedUpdateManyWithoutFavoritedByInput, { nullable: true }) + favoriteArticles?: ArticleUncheckedUpdateManyWithoutFavoritedByInput; - @Field(() => ArticleUncheckedUpdateManyWithoutAuthorInput, { nullable: true }) - articles?: ArticleUncheckedUpdateManyWithoutAuthorInput; + @Field(() => ArticleUncheckedUpdateManyWithoutAuthorInput, { nullable: true }) + articles?: ArticleUncheckedUpdateManyWithoutAuthorInput; - @Field(() => CommentUncheckedUpdateManyWithoutAuthorInput, { nullable: true }) - comments?: CommentUncheckedUpdateManyWithoutAuthorInput; + @Field(() => CommentUncheckedUpdateManyWithoutAuthorInput, { nullable: true }) + comments?: CommentUncheckedUpdateManyWithoutAuthorInput; - @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) - countComments?: NullableIntFieldUpdateOperationsInput; + @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) + countComments?: NullableIntFieldUpdateOperationsInput; - @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) - rating?: NullableFloatFieldUpdateOperationsInput; + @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) + rating?: NullableFloatFieldUpdateOperationsInput; - @Field(() => NullableEnumRoleFieldUpdateOperationsInput, { nullable: true }) - role?: NullableEnumRoleFieldUpdateOperationsInput; + @Field(() => NullableEnumRoleFieldUpdateOperationsInput, { nullable: true }) + role?: NullableEnumRoleFieldUpdateOperationsInput; - @Field(() => ProfileUncheckedUpdateOneWithoutUserInput, { nullable: true }) - profile?: ProfileUncheckedUpdateOneWithoutUserInput; + @Field(() => ProfileUncheckedUpdateOneWithoutUserInput, { nullable: true }) + profile?: ProfileUncheckedUpdateOneWithoutUserInput; } diff --git a/@generated/user/user-unchecked-update-without-following.input.ts b/@generated/user/user-unchecked-update-without-following.input.ts index 7e148919..51ca2f3b 100644 --- a/@generated/user/user-unchecked-update-without-following.input.ts +++ b/@generated/user/user-unchecked-update-without-following.input.ts @@ -13,45 +13,45 @@ import { ProfileUncheckedUpdateOneWithoutUserInput } from '../profile/profile-un @InputType() export class UserUncheckedUpdateWithoutFollowingInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - email?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + email?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - name?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + name?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - password?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + password?: StringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - bio?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + bio?: NullableStringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - image?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + image?: NullableStringFieldUpdateOperationsInput; - @Field(() => UserUncheckedUpdateManyWithoutFollowingInput, { nullable: true }) - followers?: UserUncheckedUpdateManyWithoutFollowingInput; + @Field(() => UserUncheckedUpdateManyWithoutFollowingInput, { nullable: true }) + followers?: UserUncheckedUpdateManyWithoutFollowingInput; - @Field(() => ArticleUncheckedUpdateManyWithoutFavoritedByInput, { nullable: true }) - favoriteArticles?: ArticleUncheckedUpdateManyWithoutFavoritedByInput; + @Field(() => ArticleUncheckedUpdateManyWithoutFavoritedByInput, { nullable: true }) + favoriteArticles?: ArticleUncheckedUpdateManyWithoutFavoritedByInput; - @Field(() => ArticleUncheckedUpdateManyWithoutAuthorInput, { nullable: true }) - articles?: ArticleUncheckedUpdateManyWithoutAuthorInput; + @Field(() => ArticleUncheckedUpdateManyWithoutAuthorInput, { nullable: true }) + articles?: ArticleUncheckedUpdateManyWithoutAuthorInput; - @Field(() => CommentUncheckedUpdateManyWithoutAuthorInput, { nullable: true }) - comments?: CommentUncheckedUpdateManyWithoutAuthorInput; + @Field(() => CommentUncheckedUpdateManyWithoutAuthorInput, { nullable: true }) + comments?: CommentUncheckedUpdateManyWithoutAuthorInput; - @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) - countComments?: NullableIntFieldUpdateOperationsInput; + @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) + countComments?: NullableIntFieldUpdateOperationsInput; - @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) - rating?: NullableFloatFieldUpdateOperationsInput; + @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) + rating?: NullableFloatFieldUpdateOperationsInput; - @Field(() => NullableEnumRoleFieldUpdateOperationsInput, { nullable: true }) - role?: NullableEnumRoleFieldUpdateOperationsInput; + @Field(() => NullableEnumRoleFieldUpdateOperationsInput, { nullable: true }) + role?: NullableEnumRoleFieldUpdateOperationsInput; - @Field(() => ProfileUncheckedUpdateOneWithoutUserInput, { nullable: true }) - profile?: ProfileUncheckedUpdateOneWithoutUserInput; + @Field(() => ProfileUncheckedUpdateOneWithoutUserInput, { nullable: true }) + profile?: ProfileUncheckedUpdateOneWithoutUserInput; } diff --git a/@generated/user/user-unchecked-update-without-profile.input.ts b/@generated/user/user-unchecked-update-without-profile.input.ts index a1399796..68ee8cd4 100644 --- a/@generated/user/user-unchecked-update-without-profile.input.ts +++ b/@generated/user/user-unchecked-update-without-profile.input.ts @@ -13,45 +13,45 @@ import { NullableEnumRoleFieldUpdateOperationsInput } from '../prisma/nullable-e @InputType() export class UserUncheckedUpdateWithoutProfileInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - email?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + email?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - name?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + name?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - password?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + password?: StringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - bio?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + bio?: NullableStringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - image?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + image?: NullableStringFieldUpdateOperationsInput; - @Field(() => UserUncheckedUpdateManyWithoutFollowersInput, { nullable: true }) - following?: UserUncheckedUpdateManyWithoutFollowersInput; + @Field(() => UserUncheckedUpdateManyWithoutFollowersInput, { nullable: true }) + following?: UserUncheckedUpdateManyWithoutFollowersInput; - @Field(() => UserUncheckedUpdateManyWithoutFollowingInput, { nullable: true }) - followers?: UserUncheckedUpdateManyWithoutFollowingInput; + @Field(() => UserUncheckedUpdateManyWithoutFollowingInput, { nullable: true }) + followers?: UserUncheckedUpdateManyWithoutFollowingInput; - @Field(() => ArticleUncheckedUpdateManyWithoutFavoritedByInput, { nullable: true }) - favoriteArticles?: ArticleUncheckedUpdateManyWithoutFavoritedByInput; + @Field(() => ArticleUncheckedUpdateManyWithoutFavoritedByInput, { nullable: true }) + favoriteArticles?: ArticleUncheckedUpdateManyWithoutFavoritedByInput; - @Field(() => ArticleUncheckedUpdateManyWithoutAuthorInput, { nullable: true }) - articles?: ArticleUncheckedUpdateManyWithoutAuthorInput; + @Field(() => ArticleUncheckedUpdateManyWithoutAuthorInput, { nullable: true }) + articles?: ArticleUncheckedUpdateManyWithoutAuthorInput; - @Field(() => CommentUncheckedUpdateManyWithoutAuthorInput, { nullable: true }) - comments?: CommentUncheckedUpdateManyWithoutAuthorInput; + @Field(() => CommentUncheckedUpdateManyWithoutAuthorInput, { nullable: true }) + comments?: CommentUncheckedUpdateManyWithoutAuthorInput; - @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) - countComments?: NullableIntFieldUpdateOperationsInput; + @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) + countComments?: NullableIntFieldUpdateOperationsInput; - @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) - rating?: NullableFloatFieldUpdateOperationsInput; + @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) + rating?: NullableFloatFieldUpdateOperationsInput; - @Field(() => NullableEnumRoleFieldUpdateOperationsInput, { nullable: true }) - role?: NullableEnumRoleFieldUpdateOperationsInput; + @Field(() => NullableEnumRoleFieldUpdateOperationsInput, { nullable: true }) + role?: NullableEnumRoleFieldUpdateOperationsInput; } diff --git a/@generated/user/user-unchecked-update.input.ts b/@generated/user/user-unchecked-update.input.ts index 0bf885d0..9d9a14f6 100644 --- a/@generated/user/user-unchecked-update.input.ts +++ b/@generated/user/user-unchecked-update.input.ts @@ -14,48 +14,48 @@ import { ProfileUncheckedUpdateOneWithoutUserInput } from '../profile/profile-un @InputType() export class UserUncheckedUpdateInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - email?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + email?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - name?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + name?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - password?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + password?: StringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - bio?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + bio?: NullableStringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - image?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + image?: NullableStringFieldUpdateOperationsInput; - @Field(() => UserUncheckedUpdateManyWithoutFollowersInput, { nullable: true }) - following?: UserUncheckedUpdateManyWithoutFollowersInput; + @Field(() => UserUncheckedUpdateManyWithoutFollowersInput, { nullable: true }) + following?: UserUncheckedUpdateManyWithoutFollowersInput; - @Field(() => UserUncheckedUpdateManyWithoutFollowingInput, { nullable: true }) - followers?: UserUncheckedUpdateManyWithoutFollowingInput; + @Field(() => UserUncheckedUpdateManyWithoutFollowingInput, { nullable: true }) + followers?: UserUncheckedUpdateManyWithoutFollowingInput; - @Field(() => ArticleUncheckedUpdateManyWithoutFavoritedByInput, { nullable: true }) - favoriteArticles?: ArticleUncheckedUpdateManyWithoutFavoritedByInput; + @Field(() => ArticleUncheckedUpdateManyWithoutFavoritedByInput, { nullable: true }) + favoriteArticles?: ArticleUncheckedUpdateManyWithoutFavoritedByInput; - @Field(() => ArticleUncheckedUpdateManyWithoutAuthorInput, { nullable: true }) - articles?: ArticleUncheckedUpdateManyWithoutAuthorInput; + @Field(() => ArticleUncheckedUpdateManyWithoutAuthorInput, { nullable: true }) + articles?: ArticleUncheckedUpdateManyWithoutAuthorInput; - @Field(() => CommentUncheckedUpdateManyWithoutAuthorInput, { nullable: true }) - comments?: CommentUncheckedUpdateManyWithoutAuthorInput; + @Field(() => CommentUncheckedUpdateManyWithoutAuthorInput, { nullable: true }) + comments?: CommentUncheckedUpdateManyWithoutAuthorInput; - @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) - countComments?: NullableIntFieldUpdateOperationsInput; + @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) + countComments?: NullableIntFieldUpdateOperationsInput; - @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) - rating?: NullableFloatFieldUpdateOperationsInput; + @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) + rating?: NullableFloatFieldUpdateOperationsInput; - @Field(() => NullableEnumRoleFieldUpdateOperationsInput, { nullable: true }) - role?: NullableEnumRoleFieldUpdateOperationsInput; + @Field(() => NullableEnumRoleFieldUpdateOperationsInput, { nullable: true }) + role?: NullableEnumRoleFieldUpdateOperationsInput; - @Field(() => ProfileUncheckedUpdateOneWithoutUserInput, { nullable: true }) - profile?: ProfileUncheckedUpdateOneWithoutUserInput; + @Field(() => ProfileUncheckedUpdateOneWithoutUserInput, { nullable: true }) + profile?: ProfileUncheckedUpdateOneWithoutUserInput; } diff --git a/@generated/user/user-update-many-mutation.input.ts b/@generated/user/user-update-many-mutation.input.ts index 41102f19..ca9eb66e 100644 --- a/@generated/user/user-update-many-mutation.input.ts +++ b/@generated/user/user-update-many-mutation.input.ts @@ -8,30 +8,30 @@ import { NullableEnumRoleFieldUpdateOperationsInput } from '../prisma/nullable-e @InputType() export class UserUpdateManyMutationInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - email?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + email?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - name?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + name?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - password?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + password?: StringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - bio?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + bio?: NullableStringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - image?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + image?: NullableStringFieldUpdateOperationsInput; - @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) - countComments?: NullableIntFieldUpdateOperationsInput; + @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) + countComments?: NullableIntFieldUpdateOperationsInput; - @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) - rating?: NullableFloatFieldUpdateOperationsInput; + @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) + rating?: NullableFloatFieldUpdateOperationsInput; - @Field(() => NullableEnumRoleFieldUpdateOperationsInput, { nullable: true }) - role?: NullableEnumRoleFieldUpdateOperationsInput; + @Field(() => NullableEnumRoleFieldUpdateOperationsInput, { nullable: true }) + role?: NullableEnumRoleFieldUpdateOperationsInput; } diff --git a/@generated/user/user-update-many-with-where-without-favorite-articles.input.ts b/@generated/user/user-update-many-with-where-without-favorite-articles.input.ts index 0b55ab3a..5f75ab6f 100644 --- a/@generated/user/user-update-many-with-where-without-favorite-articles.input.ts +++ b/@generated/user/user-update-many-with-where-without-favorite-articles.input.ts @@ -5,9 +5,9 @@ import { UserUpdateManyMutationInput } from './user-update-many-mutation.input'; @InputType() export class UserUpdateManyWithWhereWithoutFavoriteArticlesInput { - @Field(() => UserScalarWhereInput, { nullable: false }) - where!: UserScalarWhereInput; + @Field(() => UserScalarWhereInput, { nullable: false }) + where!: UserScalarWhereInput; - @Field(() => UserUpdateManyMutationInput, { nullable: false }) - data!: UserUpdateManyMutationInput; + @Field(() => UserUpdateManyMutationInput, { nullable: false }) + data!: UserUpdateManyMutationInput; } diff --git a/@generated/user/user-update-many-with-where-without-followers.input.ts b/@generated/user/user-update-many-with-where-without-followers.input.ts index 989ac300..93aab2b0 100644 --- a/@generated/user/user-update-many-with-where-without-followers.input.ts +++ b/@generated/user/user-update-many-with-where-without-followers.input.ts @@ -5,9 +5,9 @@ import { UserUpdateManyMutationInput } from './user-update-many-mutation.input'; @InputType() export class UserUpdateManyWithWhereWithoutFollowersInput { - @Field(() => UserScalarWhereInput, { nullable: false }) - where!: UserScalarWhereInput; + @Field(() => UserScalarWhereInput, { nullable: false }) + where!: UserScalarWhereInput; - @Field(() => UserUpdateManyMutationInput, { nullable: false }) - data!: UserUpdateManyMutationInput; + @Field(() => UserUpdateManyMutationInput, { nullable: false }) + data!: UserUpdateManyMutationInput; } diff --git a/@generated/user/user-update-many-with-where-without-following.input.ts b/@generated/user/user-update-many-with-where-without-following.input.ts index 73555edf..88c49d0a 100644 --- a/@generated/user/user-update-many-with-where-without-following.input.ts +++ b/@generated/user/user-update-many-with-where-without-following.input.ts @@ -5,9 +5,9 @@ import { UserUpdateManyMutationInput } from './user-update-many-mutation.input'; @InputType() export class UserUpdateManyWithWhereWithoutFollowingInput { - @Field(() => UserScalarWhereInput, { nullable: false }) - where!: UserScalarWhereInput; + @Field(() => UserScalarWhereInput, { nullable: false }) + where!: UserScalarWhereInput; - @Field(() => UserUpdateManyMutationInput, { nullable: false }) - data!: UserUpdateManyMutationInput; + @Field(() => UserUpdateManyMutationInput, { nullable: false }) + data!: UserUpdateManyMutationInput; } diff --git a/@generated/user/user-update-many-without-favorite-articles.input.ts b/@generated/user/user-update-many-without-favorite-articles.input.ts index 82b58331..9a8e1cba 100644 --- a/@generated/user/user-update-many-without-favorite-articles.input.ts +++ b/@generated/user/user-update-many-without-favorite-articles.input.ts @@ -10,39 +10,39 @@ import { UserScalarWhereInput } from './user-scalar-where.input'; @InputType() export class UserUpdateManyWithoutFavoriteArticlesInput { - @Field(() => [UserCreateWithoutFavoriteArticlesInput], { nullable: true }) - create?: Array; + @Field(() => [UserCreateWithoutFavoriteArticlesInput], { nullable: true }) + create?: Array; - @Field(() => [UserCreateOrConnectWithoutFavoriteArticlesInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [UserCreateOrConnectWithoutFavoriteArticlesInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => [UserUpsertWithWhereUniqueWithoutFavoriteArticlesInput], { - nullable: true, - }) - upsert?: Array; + @Field(() => [UserUpsertWithWhereUniqueWithoutFavoriteArticlesInput], { + nullable: true, + }) + upsert?: Array; - @Field(() => [UserWhereUniqueInput], { nullable: true }) - set?: Array; + @Field(() => [UserWhereUniqueInput], { nullable: true }) + set?: Array; - @Field(() => [UserWhereUniqueInput], { nullable: true }) - disconnect?: Array; + @Field(() => [UserWhereUniqueInput], { nullable: true }) + disconnect?: Array; - @Field(() => [UserWhereUniqueInput], { nullable: true }) - delete?: Array; + @Field(() => [UserWhereUniqueInput], { nullable: true }) + delete?: Array; - @Field(() => [UserWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [UserWhereUniqueInput], { nullable: true }) + connect?: Array; - @Field(() => [UserUpdateWithWhereUniqueWithoutFavoriteArticlesInput], { - nullable: true, - }) - update?: Array; + @Field(() => [UserUpdateWithWhereUniqueWithoutFavoriteArticlesInput], { + nullable: true, + }) + update?: Array; - @Field(() => [UserUpdateManyWithWhereWithoutFavoriteArticlesInput], { - nullable: true, - }) - updateMany?: Array; + @Field(() => [UserUpdateManyWithWhereWithoutFavoriteArticlesInput], { + nullable: true, + }) + updateMany?: Array; - @Field(() => [UserScalarWhereInput], { nullable: true }) - deleteMany?: Array; + @Field(() => [UserScalarWhereInput], { nullable: true }) + deleteMany?: Array; } diff --git a/@generated/user/user-update-many-without-followers.input.ts b/@generated/user/user-update-many-without-followers.input.ts index 1add679e..f131ffd2 100644 --- a/@generated/user/user-update-many-without-followers.input.ts +++ b/@generated/user/user-update-many-without-followers.input.ts @@ -10,33 +10,33 @@ import { UserScalarWhereInput } from './user-scalar-where.input'; @InputType() export class UserUpdateManyWithoutFollowersInput { - @Field(() => [UserCreateWithoutFollowersInput], { nullable: true }) - create?: Array; + @Field(() => [UserCreateWithoutFollowersInput], { nullable: true }) + create?: Array; - @Field(() => [UserCreateOrConnectWithoutFollowersInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [UserCreateOrConnectWithoutFollowersInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => [UserUpsertWithWhereUniqueWithoutFollowersInput], { nullable: true }) - upsert?: Array; + @Field(() => [UserUpsertWithWhereUniqueWithoutFollowersInput], { nullable: true }) + upsert?: Array; - @Field(() => [UserWhereUniqueInput], { nullable: true }) - set?: Array; + @Field(() => [UserWhereUniqueInput], { nullable: true }) + set?: Array; - @Field(() => [UserWhereUniqueInput], { nullable: true }) - disconnect?: Array; + @Field(() => [UserWhereUniqueInput], { nullable: true }) + disconnect?: Array; - @Field(() => [UserWhereUniqueInput], { nullable: true }) - delete?: Array; + @Field(() => [UserWhereUniqueInput], { nullable: true }) + delete?: Array; - @Field(() => [UserWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [UserWhereUniqueInput], { nullable: true }) + connect?: Array; - @Field(() => [UserUpdateWithWhereUniqueWithoutFollowersInput], { nullable: true }) - update?: Array; + @Field(() => [UserUpdateWithWhereUniqueWithoutFollowersInput], { nullable: true }) + update?: Array; - @Field(() => [UserUpdateManyWithWhereWithoutFollowersInput], { nullable: true }) - updateMany?: Array; + @Field(() => [UserUpdateManyWithWhereWithoutFollowersInput], { nullable: true }) + updateMany?: Array; - @Field(() => [UserScalarWhereInput], { nullable: true }) - deleteMany?: Array; + @Field(() => [UserScalarWhereInput], { nullable: true }) + deleteMany?: Array; } diff --git a/@generated/user/user-update-many-without-following.input.ts b/@generated/user/user-update-many-without-following.input.ts index 213ae640..9ad70d93 100644 --- a/@generated/user/user-update-many-without-following.input.ts +++ b/@generated/user/user-update-many-without-following.input.ts @@ -10,33 +10,33 @@ import { UserScalarWhereInput } from './user-scalar-where.input'; @InputType() export class UserUpdateManyWithoutFollowingInput { - @Field(() => [UserCreateWithoutFollowingInput], { nullable: true }) - create?: Array; + @Field(() => [UserCreateWithoutFollowingInput], { nullable: true }) + create?: Array; - @Field(() => [UserCreateOrConnectWithoutFollowingInput], { nullable: true }) - connectOrCreate?: Array; + @Field(() => [UserCreateOrConnectWithoutFollowingInput], { nullable: true }) + connectOrCreate?: Array; - @Field(() => [UserUpsertWithWhereUniqueWithoutFollowingInput], { nullable: true }) - upsert?: Array; + @Field(() => [UserUpsertWithWhereUniqueWithoutFollowingInput], { nullable: true }) + upsert?: Array; - @Field(() => [UserWhereUniqueInput], { nullable: true }) - set?: Array; + @Field(() => [UserWhereUniqueInput], { nullable: true }) + set?: Array; - @Field(() => [UserWhereUniqueInput], { nullable: true }) - disconnect?: Array; + @Field(() => [UserWhereUniqueInput], { nullable: true }) + disconnect?: Array; - @Field(() => [UserWhereUniqueInput], { nullable: true }) - delete?: Array; + @Field(() => [UserWhereUniqueInput], { nullable: true }) + delete?: Array; - @Field(() => [UserWhereUniqueInput], { nullable: true }) - connect?: Array; + @Field(() => [UserWhereUniqueInput], { nullable: true }) + connect?: Array; - @Field(() => [UserUpdateWithWhereUniqueWithoutFollowingInput], { nullable: true }) - update?: Array; + @Field(() => [UserUpdateWithWhereUniqueWithoutFollowingInput], { nullable: true }) + update?: Array; - @Field(() => [UserUpdateManyWithWhereWithoutFollowingInput], { nullable: true }) - updateMany?: Array; + @Field(() => [UserUpdateManyWithWhereWithoutFollowingInput], { nullable: true }) + updateMany?: Array; - @Field(() => [UserScalarWhereInput], { nullable: true }) - deleteMany?: Array; + @Field(() => [UserScalarWhereInput], { nullable: true }) + deleteMany?: Array; } diff --git a/@generated/user/user-update-one-required-without-articles.input.ts b/@generated/user/user-update-one-required-without-articles.input.ts index 2b4de024..dd9dde63 100644 --- a/@generated/user/user-update-one-required-without-articles.input.ts +++ b/@generated/user/user-update-one-required-without-articles.input.ts @@ -8,18 +8,18 @@ import { UserUpdateWithoutArticlesInput } from './user-update-without-articles.i @InputType() export class UserUpdateOneRequiredWithoutArticlesInput { - @Field(() => UserCreateWithoutArticlesInput, { nullable: true }) - create?: UserCreateWithoutArticlesInput; + @Field(() => UserCreateWithoutArticlesInput, { nullable: true }) + create?: UserCreateWithoutArticlesInput; - @Field(() => UserCreateOrConnectWithoutArticlesInput, { nullable: true }) - connectOrCreate?: UserCreateOrConnectWithoutArticlesInput; + @Field(() => UserCreateOrConnectWithoutArticlesInput, { nullable: true }) + connectOrCreate?: UserCreateOrConnectWithoutArticlesInput; - @Field(() => UserUpsertWithoutArticlesInput, { nullable: true }) - upsert?: UserUpsertWithoutArticlesInput; + @Field(() => UserUpsertWithoutArticlesInput, { nullable: true }) + upsert?: UserUpsertWithoutArticlesInput; - @Field(() => UserWhereUniqueInput, { nullable: true }) - connect?: UserWhereUniqueInput; + @Field(() => UserWhereUniqueInput, { nullable: true }) + connect?: UserWhereUniqueInput; - @Field(() => UserUpdateWithoutArticlesInput, { nullable: true }) - update?: UserUpdateWithoutArticlesInput; + @Field(() => UserUpdateWithoutArticlesInput, { nullable: true }) + update?: UserUpdateWithoutArticlesInput; } diff --git a/@generated/user/user-update-one-required-without-comments.input.ts b/@generated/user/user-update-one-required-without-comments.input.ts index a30ce7a6..5bec71e1 100644 --- a/@generated/user/user-update-one-required-without-comments.input.ts +++ b/@generated/user/user-update-one-required-without-comments.input.ts @@ -8,18 +8,18 @@ import { UserUpdateWithoutCommentsInput } from './user-update-without-comments.i @InputType() export class UserUpdateOneRequiredWithoutCommentsInput { - @Field(() => UserCreateWithoutCommentsInput, { nullable: true }) - create?: UserCreateWithoutCommentsInput; + @Field(() => UserCreateWithoutCommentsInput, { nullable: true }) + create?: UserCreateWithoutCommentsInput; - @Field(() => UserCreateOrConnectWithoutCommentsInput, { nullable: true }) - connectOrCreate?: UserCreateOrConnectWithoutCommentsInput; + @Field(() => UserCreateOrConnectWithoutCommentsInput, { nullable: true }) + connectOrCreate?: UserCreateOrConnectWithoutCommentsInput; - @Field(() => UserUpsertWithoutCommentsInput, { nullable: true }) - upsert?: UserUpsertWithoutCommentsInput; + @Field(() => UserUpsertWithoutCommentsInput, { nullable: true }) + upsert?: UserUpsertWithoutCommentsInput; - @Field(() => UserWhereUniqueInput, { nullable: true }) - connect?: UserWhereUniqueInput; + @Field(() => UserWhereUniqueInput, { nullable: true }) + connect?: UserWhereUniqueInput; - @Field(() => UserUpdateWithoutCommentsInput, { nullable: true }) - update?: UserUpdateWithoutCommentsInput; + @Field(() => UserUpdateWithoutCommentsInput, { nullable: true }) + update?: UserUpdateWithoutCommentsInput; } diff --git a/@generated/user/user-update-one-required-without-profile.input.ts b/@generated/user/user-update-one-required-without-profile.input.ts index 811e9dcc..eab2e742 100644 --- a/@generated/user/user-update-one-required-without-profile.input.ts +++ b/@generated/user/user-update-one-required-without-profile.input.ts @@ -8,18 +8,18 @@ import { UserUpdateWithoutProfileInput } from './user-update-without-profile.inp @InputType() export class UserUpdateOneRequiredWithoutProfileInput { - @Field(() => UserCreateWithoutProfileInput, { nullable: true }) - create?: UserCreateWithoutProfileInput; + @Field(() => UserCreateWithoutProfileInput, { nullable: true }) + create?: UserCreateWithoutProfileInput; - @Field(() => UserCreateOrConnectWithoutProfileInput, { nullable: true }) - connectOrCreate?: UserCreateOrConnectWithoutProfileInput; + @Field(() => UserCreateOrConnectWithoutProfileInput, { nullable: true }) + connectOrCreate?: UserCreateOrConnectWithoutProfileInput; - @Field(() => UserUpsertWithoutProfileInput, { nullable: true }) - upsert?: UserUpsertWithoutProfileInput; + @Field(() => UserUpsertWithoutProfileInput, { nullable: true }) + upsert?: UserUpsertWithoutProfileInput; - @Field(() => UserWhereUniqueInput, { nullable: true }) - connect?: UserWhereUniqueInput; + @Field(() => UserWhereUniqueInput, { nullable: true }) + connect?: UserWhereUniqueInput; - @Field(() => UserUpdateWithoutProfileInput, { nullable: true }) - update?: UserUpdateWithoutProfileInput; + @Field(() => UserUpdateWithoutProfileInput, { nullable: true }) + update?: UserUpdateWithoutProfileInput; } diff --git a/@generated/user/user-update-with-where-unique-without-favorite-articles.input.ts b/@generated/user/user-update-with-where-unique-without-favorite-articles.input.ts index 44484026..c9ee2235 100644 --- a/@generated/user/user-update-with-where-unique-without-favorite-articles.input.ts +++ b/@generated/user/user-update-with-where-unique-without-favorite-articles.input.ts @@ -5,9 +5,9 @@ import { UserUpdateWithoutFavoriteArticlesInput } from './user-update-without-fa @InputType() export class UserUpdateWithWhereUniqueWithoutFavoriteArticlesInput { - @Field(() => UserWhereUniqueInput, { nullable: false }) - where!: UserWhereUniqueInput; + @Field(() => UserWhereUniqueInput, { nullable: false }) + where!: UserWhereUniqueInput; - @Field(() => UserUpdateWithoutFavoriteArticlesInput, { nullable: false }) - data!: UserUpdateWithoutFavoriteArticlesInput; + @Field(() => UserUpdateWithoutFavoriteArticlesInput, { nullable: false }) + data!: UserUpdateWithoutFavoriteArticlesInput; } diff --git a/@generated/user/user-update-with-where-unique-without-followers.input.ts b/@generated/user/user-update-with-where-unique-without-followers.input.ts index 2a4157aa..79ad1c1c 100644 --- a/@generated/user/user-update-with-where-unique-without-followers.input.ts +++ b/@generated/user/user-update-with-where-unique-without-followers.input.ts @@ -5,9 +5,9 @@ import { UserUpdateWithoutFollowersInput } from './user-update-without-followers @InputType() export class UserUpdateWithWhereUniqueWithoutFollowersInput { - @Field(() => UserWhereUniqueInput, { nullable: false }) - where!: UserWhereUniqueInput; + @Field(() => UserWhereUniqueInput, { nullable: false }) + where!: UserWhereUniqueInput; - @Field(() => UserUpdateWithoutFollowersInput, { nullable: false }) - data!: UserUpdateWithoutFollowersInput; + @Field(() => UserUpdateWithoutFollowersInput, { nullable: false }) + data!: UserUpdateWithoutFollowersInput; } diff --git a/@generated/user/user-update-with-where-unique-without-following.input.ts b/@generated/user/user-update-with-where-unique-without-following.input.ts index bc07ee25..402dd0e9 100644 --- a/@generated/user/user-update-with-where-unique-without-following.input.ts +++ b/@generated/user/user-update-with-where-unique-without-following.input.ts @@ -5,9 +5,9 @@ import { UserUpdateWithoutFollowingInput } from './user-update-without-following @InputType() export class UserUpdateWithWhereUniqueWithoutFollowingInput { - @Field(() => UserWhereUniqueInput, { nullable: false }) - where!: UserWhereUniqueInput; + @Field(() => UserWhereUniqueInput, { nullable: false }) + where!: UserWhereUniqueInput; - @Field(() => UserUpdateWithoutFollowingInput, { nullable: false }) - data!: UserUpdateWithoutFollowingInput; + @Field(() => UserUpdateWithoutFollowingInput, { nullable: false }) + data!: UserUpdateWithoutFollowingInput; } diff --git a/@generated/user/user-update-without-articles.input.ts b/@generated/user/user-update-without-articles.input.ts index a7cc55c7..b2578ef6 100644 --- a/@generated/user/user-update-without-articles.input.ts +++ b/@generated/user/user-update-without-articles.input.ts @@ -13,45 +13,45 @@ import { ProfileUpdateOneWithoutUserInput } from '../profile/profile-update-one- @InputType() export class UserUpdateWithoutArticlesInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - email?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + email?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - name?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + name?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - password?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + password?: StringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - bio?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + bio?: NullableStringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - image?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + image?: NullableStringFieldUpdateOperationsInput; - @Field(() => UserUpdateManyWithoutFollowersInput, { nullable: true }) - following?: UserUpdateManyWithoutFollowersInput; + @Field(() => UserUpdateManyWithoutFollowersInput, { nullable: true }) + following?: UserUpdateManyWithoutFollowersInput; - @Field(() => UserUpdateManyWithoutFollowingInput, { nullable: true }) - followers?: UserUpdateManyWithoutFollowingInput; + @Field(() => UserUpdateManyWithoutFollowingInput, { nullable: true }) + followers?: UserUpdateManyWithoutFollowingInput; - @Field(() => ArticleUpdateManyWithoutFavoritedByInput, { nullable: true }) - favoriteArticles?: ArticleUpdateManyWithoutFavoritedByInput; + @Field(() => ArticleUpdateManyWithoutFavoritedByInput, { nullable: true }) + favoriteArticles?: ArticleUpdateManyWithoutFavoritedByInput; - @Field(() => CommentUpdateManyWithoutAuthorInput, { nullable: true }) - comments?: CommentUpdateManyWithoutAuthorInput; + @Field(() => CommentUpdateManyWithoutAuthorInput, { nullable: true }) + comments?: CommentUpdateManyWithoutAuthorInput; - @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) - countComments?: NullableIntFieldUpdateOperationsInput; + @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) + countComments?: NullableIntFieldUpdateOperationsInput; - @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) - rating?: NullableFloatFieldUpdateOperationsInput; + @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) + rating?: NullableFloatFieldUpdateOperationsInput; - @Field(() => NullableEnumRoleFieldUpdateOperationsInput, { nullable: true }) - role?: NullableEnumRoleFieldUpdateOperationsInput; + @Field(() => NullableEnumRoleFieldUpdateOperationsInput, { nullable: true }) + role?: NullableEnumRoleFieldUpdateOperationsInput; - @Field(() => ProfileUpdateOneWithoutUserInput, { nullable: true }) - profile?: ProfileUpdateOneWithoutUserInput; + @Field(() => ProfileUpdateOneWithoutUserInput, { nullable: true }) + profile?: ProfileUpdateOneWithoutUserInput; } diff --git a/@generated/user/user-update-without-comments.input.ts b/@generated/user/user-update-without-comments.input.ts index 5e8caab7..bf357159 100644 --- a/@generated/user/user-update-without-comments.input.ts +++ b/@generated/user/user-update-without-comments.input.ts @@ -13,45 +13,45 @@ import { ProfileUpdateOneWithoutUserInput } from '../profile/profile-update-one- @InputType() export class UserUpdateWithoutCommentsInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - email?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + email?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - name?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + name?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - password?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + password?: StringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - bio?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + bio?: NullableStringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - image?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + image?: NullableStringFieldUpdateOperationsInput; - @Field(() => UserUpdateManyWithoutFollowersInput, { nullable: true }) - following?: UserUpdateManyWithoutFollowersInput; + @Field(() => UserUpdateManyWithoutFollowersInput, { nullable: true }) + following?: UserUpdateManyWithoutFollowersInput; - @Field(() => UserUpdateManyWithoutFollowingInput, { nullable: true }) - followers?: UserUpdateManyWithoutFollowingInput; + @Field(() => UserUpdateManyWithoutFollowingInput, { nullable: true }) + followers?: UserUpdateManyWithoutFollowingInput; - @Field(() => ArticleUpdateManyWithoutFavoritedByInput, { nullable: true }) - favoriteArticles?: ArticleUpdateManyWithoutFavoritedByInput; + @Field(() => ArticleUpdateManyWithoutFavoritedByInput, { nullable: true }) + favoriteArticles?: ArticleUpdateManyWithoutFavoritedByInput; - @Field(() => ArticleUpdateManyWithoutAuthorInput, { nullable: true }) - articles?: ArticleUpdateManyWithoutAuthorInput; + @Field(() => ArticleUpdateManyWithoutAuthorInput, { nullable: true }) + articles?: ArticleUpdateManyWithoutAuthorInput; - @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) - countComments?: NullableIntFieldUpdateOperationsInput; + @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) + countComments?: NullableIntFieldUpdateOperationsInput; - @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) - rating?: NullableFloatFieldUpdateOperationsInput; + @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) + rating?: NullableFloatFieldUpdateOperationsInput; - @Field(() => NullableEnumRoleFieldUpdateOperationsInput, { nullable: true }) - role?: NullableEnumRoleFieldUpdateOperationsInput; + @Field(() => NullableEnumRoleFieldUpdateOperationsInput, { nullable: true }) + role?: NullableEnumRoleFieldUpdateOperationsInput; - @Field(() => ProfileUpdateOneWithoutUserInput, { nullable: true }) - profile?: ProfileUpdateOneWithoutUserInput; + @Field(() => ProfileUpdateOneWithoutUserInput, { nullable: true }) + profile?: ProfileUpdateOneWithoutUserInput; } diff --git a/@generated/user/user-update-without-favorite-articles.input.ts b/@generated/user/user-update-without-favorite-articles.input.ts index f1617445..52040036 100644 --- a/@generated/user/user-update-without-favorite-articles.input.ts +++ b/@generated/user/user-update-without-favorite-articles.input.ts @@ -13,45 +13,45 @@ import { ProfileUpdateOneWithoutUserInput } from '../profile/profile-update-one- @InputType() export class UserUpdateWithoutFavoriteArticlesInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - email?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + email?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - name?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + name?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - password?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + password?: StringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - bio?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + bio?: NullableStringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - image?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + image?: NullableStringFieldUpdateOperationsInput; - @Field(() => UserUpdateManyWithoutFollowersInput, { nullable: true }) - following?: UserUpdateManyWithoutFollowersInput; + @Field(() => UserUpdateManyWithoutFollowersInput, { nullable: true }) + following?: UserUpdateManyWithoutFollowersInput; - @Field(() => UserUpdateManyWithoutFollowingInput, { nullable: true }) - followers?: UserUpdateManyWithoutFollowingInput; + @Field(() => UserUpdateManyWithoutFollowingInput, { nullable: true }) + followers?: UserUpdateManyWithoutFollowingInput; - @Field(() => ArticleUpdateManyWithoutAuthorInput, { nullable: true }) - articles?: ArticleUpdateManyWithoutAuthorInput; + @Field(() => ArticleUpdateManyWithoutAuthorInput, { nullable: true }) + articles?: ArticleUpdateManyWithoutAuthorInput; - @Field(() => CommentUpdateManyWithoutAuthorInput, { nullable: true }) - comments?: CommentUpdateManyWithoutAuthorInput; + @Field(() => CommentUpdateManyWithoutAuthorInput, { nullable: true }) + comments?: CommentUpdateManyWithoutAuthorInput; - @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) - countComments?: NullableIntFieldUpdateOperationsInput; + @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) + countComments?: NullableIntFieldUpdateOperationsInput; - @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) - rating?: NullableFloatFieldUpdateOperationsInput; + @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) + rating?: NullableFloatFieldUpdateOperationsInput; - @Field(() => NullableEnumRoleFieldUpdateOperationsInput, { nullable: true }) - role?: NullableEnumRoleFieldUpdateOperationsInput; + @Field(() => NullableEnumRoleFieldUpdateOperationsInput, { nullable: true }) + role?: NullableEnumRoleFieldUpdateOperationsInput; - @Field(() => ProfileUpdateOneWithoutUserInput, { nullable: true }) - profile?: ProfileUpdateOneWithoutUserInput; + @Field(() => ProfileUpdateOneWithoutUserInput, { nullable: true }) + profile?: ProfileUpdateOneWithoutUserInput; } diff --git a/@generated/user/user-update-without-followers.input.ts b/@generated/user/user-update-without-followers.input.ts index 0968ece1..ffbf0af8 100644 --- a/@generated/user/user-update-without-followers.input.ts +++ b/@generated/user/user-update-without-followers.input.ts @@ -13,45 +13,45 @@ import { ProfileUpdateOneWithoutUserInput } from '../profile/profile-update-one- @InputType() export class UserUpdateWithoutFollowersInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - email?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + email?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - name?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + name?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - password?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + password?: StringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - bio?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + bio?: NullableStringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - image?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + image?: NullableStringFieldUpdateOperationsInput; - @Field(() => UserUpdateManyWithoutFollowersInput, { nullable: true }) - following?: UserUpdateManyWithoutFollowersInput; + @Field(() => UserUpdateManyWithoutFollowersInput, { nullable: true }) + following?: UserUpdateManyWithoutFollowersInput; - @Field(() => ArticleUpdateManyWithoutFavoritedByInput, { nullable: true }) - favoriteArticles?: ArticleUpdateManyWithoutFavoritedByInput; + @Field(() => ArticleUpdateManyWithoutFavoritedByInput, { nullable: true }) + favoriteArticles?: ArticleUpdateManyWithoutFavoritedByInput; - @Field(() => ArticleUpdateManyWithoutAuthorInput, { nullable: true }) - articles?: ArticleUpdateManyWithoutAuthorInput; + @Field(() => ArticleUpdateManyWithoutAuthorInput, { nullable: true }) + articles?: ArticleUpdateManyWithoutAuthorInput; - @Field(() => CommentUpdateManyWithoutAuthorInput, { nullable: true }) - comments?: CommentUpdateManyWithoutAuthorInput; + @Field(() => CommentUpdateManyWithoutAuthorInput, { nullable: true }) + comments?: CommentUpdateManyWithoutAuthorInput; - @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) - countComments?: NullableIntFieldUpdateOperationsInput; + @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) + countComments?: NullableIntFieldUpdateOperationsInput; - @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) - rating?: NullableFloatFieldUpdateOperationsInput; + @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) + rating?: NullableFloatFieldUpdateOperationsInput; - @Field(() => NullableEnumRoleFieldUpdateOperationsInput, { nullable: true }) - role?: NullableEnumRoleFieldUpdateOperationsInput; + @Field(() => NullableEnumRoleFieldUpdateOperationsInput, { nullable: true }) + role?: NullableEnumRoleFieldUpdateOperationsInput; - @Field(() => ProfileUpdateOneWithoutUserInput, { nullable: true }) - profile?: ProfileUpdateOneWithoutUserInput; + @Field(() => ProfileUpdateOneWithoutUserInput, { nullable: true }) + profile?: ProfileUpdateOneWithoutUserInput; } diff --git a/@generated/user/user-update-without-following.input.ts b/@generated/user/user-update-without-following.input.ts index 45b97a2b..5c679bfe 100644 --- a/@generated/user/user-update-without-following.input.ts +++ b/@generated/user/user-update-without-following.input.ts @@ -13,45 +13,45 @@ import { ProfileUpdateOneWithoutUserInput } from '../profile/profile-update-one- @InputType() export class UserUpdateWithoutFollowingInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - email?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + email?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - name?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + name?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - password?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + password?: StringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - bio?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + bio?: NullableStringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - image?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + image?: NullableStringFieldUpdateOperationsInput; - @Field(() => UserUpdateManyWithoutFollowingInput, { nullable: true }) - followers?: UserUpdateManyWithoutFollowingInput; + @Field(() => UserUpdateManyWithoutFollowingInput, { nullable: true }) + followers?: UserUpdateManyWithoutFollowingInput; - @Field(() => ArticleUpdateManyWithoutFavoritedByInput, { nullable: true }) - favoriteArticles?: ArticleUpdateManyWithoutFavoritedByInput; + @Field(() => ArticleUpdateManyWithoutFavoritedByInput, { nullable: true }) + favoriteArticles?: ArticleUpdateManyWithoutFavoritedByInput; - @Field(() => ArticleUpdateManyWithoutAuthorInput, { nullable: true }) - articles?: ArticleUpdateManyWithoutAuthorInput; + @Field(() => ArticleUpdateManyWithoutAuthorInput, { nullable: true }) + articles?: ArticleUpdateManyWithoutAuthorInput; - @Field(() => CommentUpdateManyWithoutAuthorInput, { nullable: true }) - comments?: CommentUpdateManyWithoutAuthorInput; + @Field(() => CommentUpdateManyWithoutAuthorInput, { nullable: true }) + comments?: CommentUpdateManyWithoutAuthorInput; - @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) - countComments?: NullableIntFieldUpdateOperationsInput; + @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) + countComments?: NullableIntFieldUpdateOperationsInput; - @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) - rating?: NullableFloatFieldUpdateOperationsInput; + @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) + rating?: NullableFloatFieldUpdateOperationsInput; - @Field(() => NullableEnumRoleFieldUpdateOperationsInput, { nullable: true }) - role?: NullableEnumRoleFieldUpdateOperationsInput; + @Field(() => NullableEnumRoleFieldUpdateOperationsInput, { nullable: true }) + role?: NullableEnumRoleFieldUpdateOperationsInput; - @Field(() => ProfileUpdateOneWithoutUserInput, { nullable: true }) - profile?: ProfileUpdateOneWithoutUserInput; + @Field(() => ProfileUpdateOneWithoutUserInput, { nullable: true }) + profile?: ProfileUpdateOneWithoutUserInput; } diff --git a/@generated/user/user-update-without-profile.input.ts b/@generated/user/user-update-without-profile.input.ts index 07698a7b..93d79b7b 100644 --- a/@generated/user/user-update-without-profile.input.ts +++ b/@generated/user/user-update-without-profile.input.ts @@ -13,45 +13,45 @@ import { NullableEnumRoleFieldUpdateOperationsInput } from '../prisma/nullable-e @InputType() export class UserUpdateWithoutProfileInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - email?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + email?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - name?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + name?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - password?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + password?: StringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - bio?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + bio?: NullableStringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - image?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + image?: NullableStringFieldUpdateOperationsInput; - @Field(() => UserUpdateManyWithoutFollowersInput, { nullable: true }) - following?: UserUpdateManyWithoutFollowersInput; + @Field(() => UserUpdateManyWithoutFollowersInput, { nullable: true }) + following?: UserUpdateManyWithoutFollowersInput; - @Field(() => UserUpdateManyWithoutFollowingInput, { nullable: true }) - followers?: UserUpdateManyWithoutFollowingInput; + @Field(() => UserUpdateManyWithoutFollowingInput, { nullable: true }) + followers?: UserUpdateManyWithoutFollowingInput; - @Field(() => ArticleUpdateManyWithoutFavoritedByInput, { nullable: true }) - favoriteArticles?: ArticleUpdateManyWithoutFavoritedByInput; + @Field(() => ArticleUpdateManyWithoutFavoritedByInput, { nullable: true }) + favoriteArticles?: ArticleUpdateManyWithoutFavoritedByInput; - @Field(() => ArticleUpdateManyWithoutAuthorInput, { nullable: true }) - articles?: ArticleUpdateManyWithoutAuthorInput; + @Field(() => ArticleUpdateManyWithoutAuthorInput, { nullable: true }) + articles?: ArticleUpdateManyWithoutAuthorInput; - @Field(() => CommentUpdateManyWithoutAuthorInput, { nullable: true }) - comments?: CommentUpdateManyWithoutAuthorInput; + @Field(() => CommentUpdateManyWithoutAuthorInput, { nullable: true }) + comments?: CommentUpdateManyWithoutAuthorInput; - @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) - countComments?: NullableIntFieldUpdateOperationsInput; + @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) + countComments?: NullableIntFieldUpdateOperationsInput; - @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) - rating?: NullableFloatFieldUpdateOperationsInput; + @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) + rating?: NullableFloatFieldUpdateOperationsInput; - @Field(() => NullableEnumRoleFieldUpdateOperationsInput, { nullable: true }) - role?: NullableEnumRoleFieldUpdateOperationsInput; + @Field(() => NullableEnumRoleFieldUpdateOperationsInput, { nullable: true }) + role?: NullableEnumRoleFieldUpdateOperationsInput; } diff --git a/@generated/user/user-update.input.ts b/@generated/user/user-update.input.ts index 9a0cb993..a404b4a6 100644 --- a/@generated/user/user-update.input.ts +++ b/@generated/user/user-update.input.ts @@ -14,48 +14,48 @@ import { ProfileUpdateOneWithoutUserInput } from '../profile/profile-update-one- @InputType() export class UserUpdateInput { - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - id?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + id?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - email?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + email?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - name?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + name?: StringFieldUpdateOperationsInput; - @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) - password?: StringFieldUpdateOperationsInput; + @Field(() => StringFieldUpdateOperationsInput, { nullable: true }) + password?: StringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - bio?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + bio?: NullableStringFieldUpdateOperationsInput; - @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) - image?: NullableStringFieldUpdateOperationsInput; + @Field(() => NullableStringFieldUpdateOperationsInput, { nullable: true }) + image?: NullableStringFieldUpdateOperationsInput; - @Field(() => UserUpdateManyWithoutFollowersInput, { nullable: true }) - following?: UserUpdateManyWithoutFollowersInput; + @Field(() => UserUpdateManyWithoutFollowersInput, { nullable: true }) + following?: UserUpdateManyWithoutFollowersInput; - @Field(() => UserUpdateManyWithoutFollowingInput, { nullable: true }) - followers?: UserUpdateManyWithoutFollowingInput; + @Field(() => UserUpdateManyWithoutFollowingInput, { nullable: true }) + followers?: UserUpdateManyWithoutFollowingInput; - @Field(() => ArticleUpdateManyWithoutFavoritedByInput, { nullable: true }) - favoriteArticles?: ArticleUpdateManyWithoutFavoritedByInput; + @Field(() => ArticleUpdateManyWithoutFavoritedByInput, { nullable: true }) + favoriteArticles?: ArticleUpdateManyWithoutFavoritedByInput; - @Field(() => ArticleUpdateManyWithoutAuthorInput, { nullable: true }) - articles?: ArticleUpdateManyWithoutAuthorInput; + @Field(() => ArticleUpdateManyWithoutAuthorInput, { nullable: true }) + articles?: ArticleUpdateManyWithoutAuthorInput; - @Field(() => CommentUpdateManyWithoutAuthorInput, { nullable: true }) - comments?: CommentUpdateManyWithoutAuthorInput; + @Field(() => CommentUpdateManyWithoutAuthorInput, { nullable: true }) + comments?: CommentUpdateManyWithoutAuthorInput; - @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) - countComments?: NullableIntFieldUpdateOperationsInput; + @Field(() => NullableIntFieldUpdateOperationsInput, { nullable: true }) + countComments?: NullableIntFieldUpdateOperationsInput; - @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) - rating?: NullableFloatFieldUpdateOperationsInput; + @Field(() => NullableFloatFieldUpdateOperationsInput, { nullable: true }) + rating?: NullableFloatFieldUpdateOperationsInput; - @Field(() => NullableEnumRoleFieldUpdateOperationsInput, { nullable: true }) - role?: NullableEnumRoleFieldUpdateOperationsInput; + @Field(() => NullableEnumRoleFieldUpdateOperationsInput, { nullable: true }) + role?: NullableEnumRoleFieldUpdateOperationsInput; - @Field(() => ProfileUpdateOneWithoutUserInput, { nullable: true }) - profile?: ProfileUpdateOneWithoutUserInput; + @Field(() => ProfileUpdateOneWithoutUserInput, { nullable: true }) + profile?: ProfileUpdateOneWithoutUserInput; } diff --git a/@generated/user/user-upsert-with-where-unique-without-favorite-articles.input.ts b/@generated/user/user-upsert-with-where-unique-without-favorite-articles.input.ts index 6a0a97f1..ce32df1f 100644 --- a/@generated/user/user-upsert-with-where-unique-without-favorite-articles.input.ts +++ b/@generated/user/user-upsert-with-where-unique-without-favorite-articles.input.ts @@ -6,12 +6,12 @@ import { UserCreateWithoutFavoriteArticlesInput } from './user-create-without-fa @InputType() export class UserUpsertWithWhereUniqueWithoutFavoriteArticlesInput { - @Field(() => UserWhereUniqueInput, { nullable: false }) - where!: UserWhereUniqueInput; + @Field(() => UserWhereUniqueInput, { nullable: false }) + where!: UserWhereUniqueInput; - @Field(() => UserUpdateWithoutFavoriteArticlesInput, { nullable: false }) - update!: UserUpdateWithoutFavoriteArticlesInput; + @Field(() => UserUpdateWithoutFavoriteArticlesInput, { nullable: false }) + update!: UserUpdateWithoutFavoriteArticlesInput; - @Field(() => UserCreateWithoutFavoriteArticlesInput, { nullable: false }) - create!: UserCreateWithoutFavoriteArticlesInput; + @Field(() => UserCreateWithoutFavoriteArticlesInput, { nullable: false }) + create!: UserCreateWithoutFavoriteArticlesInput; } diff --git a/@generated/user/user-upsert-with-where-unique-without-followers.input.ts b/@generated/user/user-upsert-with-where-unique-without-followers.input.ts index 26a58d0c..cbeb6fda 100644 --- a/@generated/user/user-upsert-with-where-unique-without-followers.input.ts +++ b/@generated/user/user-upsert-with-where-unique-without-followers.input.ts @@ -6,12 +6,12 @@ import { UserCreateWithoutFollowersInput } from './user-create-without-followers @InputType() export class UserUpsertWithWhereUniqueWithoutFollowersInput { - @Field(() => UserWhereUniqueInput, { nullable: false }) - where!: UserWhereUniqueInput; + @Field(() => UserWhereUniqueInput, { nullable: false }) + where!: UserWhereUniqueInput; - @Field(() => UserUpdateWithoutFollowersInput, { nullable: false }) - update!: UserUpdateWithoutFollowersInput; + @Field(() => UserUpdateWithoutFollowersInput, { nullable: false }) + update!: UserUpdateWithoutFollowersInput; - @Field(() => UserCreateWithoutFollowersInput, { nullable: false }) - create!: UserCreateWithoutFollowersInput; + @Field(() => UserCreateWithoutFollowersInput, { nullable: false }) + create!: UserCreateWithoutFollowersInput; } diff --git a/@generated/user/user-upsert-with-where-unique-without-following.input.ts b/@generated/user/user-upsert-with-where-unique-without-following.input.ts index 6b613150..0fad3114 100644 --- a/@generated/user/user-upsert-with-where-unique-without-following.input.ts +++ b/@generated/user/user-upsert-with-where-unique-without-following.input.ts @@ -6,12 +6,12 @@ import { UserCreateWithoutFollowingInput } from './user-create-without-following @InputType() export class UserUpsertWithWhereUniqueWithoutFollowingInput { - @Field(() => UserWhereUniqueInput, { nullable: false }) - where!: UserWhereUniqueInput; + @Field(() => UserWhereUniqueInput, { nullable: false }) + where!: UserWhereUniqueInput; - @Field(() => UserUpdateWithoutFollowingInput, { nullable: false }) - update!: UserUpdateWithoutFollowingInput; + @Field(() => UserUpdateWithoutFollowingInput, { nullable: false }) + update!: UserUpdateWithoutFollowingInput; - @Field(() => UserCreateWithoutFollowingInput, { nullable: false }) - create!: UserCreateWithoutFollowingInput; + @Field(() => UserCreateWithoutFollowingInput, { nullable: false }) + create!: UserCreateWithoutFollowingInput; } diff --git a/@generated/user/user-upsert-without-articles.input.ts b/@generated/user/user-upsert-without-articles.input.ts index d31972d3..46bb1129 100644 --- a/@generated/user/user-upsert-without-articles.input.ts +++ b/@generated/user/user-upsert-without-articles.input.ts @@ -5,9 +5,9 @@ import { UserCreateWithoutArticlesInput } from './user-create-without-articles.i @InputType() export class UserUpsertWithoutArticlesInput { - @Field(() => UserUpdateWithoutArticlesInput, { nullable: false }) - update!: UserUpdateWithoutArticlesInput; + @Field(() => UserUpdateWithoutArticlesInput, { nullable: false }) + update!: UserUpdateWithoutArticlesInput; - @Field(() => UserCreateWithoutArticlesInput, { nullable: false }) - create!: UserCreateWithoutArticlesInput; + @Field(() => UserCreateWithoutArticlesInput, { nullable: false }) + create!: UserCreateWithoutArticlesInput; } diff --git a/@generated/user/user-upsert-without-comments.input.ts b/@generated/user/user-upsert-without-comments.input.ts index 93407fa2..a51cc8a2 100644 --- a/@generated/user/user-upsert-without-comments.input.ts +++ b/@generated/user/user-upsert-without-comments.input.ts @@ -5,9 +5,9 @@ import { UserCreateWithoutCommentsInput } from './user-create-without-comments.i @InputType() export class UserUpsertWithoutCommentsInput { - @Field(() => UserUpdateWithoutCommentsInput, { nullable: false }) - update!: UserUpdateWithoutCommentsInput; + @Field(() => UserUpdateWithoutCommentsInput, { nullable: false }) + update!: UserUpdateWithoutCommentsInput; - @Field(() => UserCreateWithoutCommentsInput, { nullable: false }) - create!: UserCreateWithoutCommentsInput; + @Field(() => UserCreateWithoutCommentsInput, { nullable: false }) + create!: UserCreateWithoutCommentsInput; } diff --git a/@generated/user/user-upsert-without-profile.input.ts b/@generated/user/user-upsert-without-profile.input.ts index bd65cc9e..5a95856f 100644 --- a/@generated/user/user-upsert-without-profile.input.ts +++ b/@generated/user/user-upsert-without-profile.input.ts @@ -5,9 +5,9 @@ import { UserCreateWithoutProfileInput } from './user-create-without-profile.inp @InputType() export class UserUpsertWithoutProfileInput { - @Field(() => UserUpdateWithoutProfileInput, { nullable: false }) - update!: UserUpdateWithoutProfileInput; + @Field(() => UserUpdateWithoutProfileInput, { nullable: false }) + update!: UserUpdateWithoutProfileInput; - @Field(() => UserCreateWithoutProfileInput, { nullable: false }) - create!: UserCreateWithoutProfileInput; + @Field(() => UserCreateWithoutProfileInput, { nullable: false }) + create!: UserCreateWithoutProfileInput; } diff --git a/@generated/user/user-where-unique.input.ts b/@generated/user/user-where-unique.input.ts index 9044bd25..7dbe70e7 100644 --- a/@generated/user/user-where-unique.input.ts +++ b/@generated/user/user-where-unique.input.ts @@ -6,17 +6,17 @@ import { UserEmailNameCompoundUniqueInput } from './user-email-name-compound-uni @InputType() export class UserWhereUniqueInput { - @Field(() => String, { nullable: true }) - id?: string; + @Field(() => String, { nullable: true }) + id?: string; - @Field(() => Scalars.GraphQLEmailAddress, { nullable: true }) - email?: string; + @Field(() => Scalars.GraphQLEmailAddress, { nullable: true }) + email?: string; - @Field(() => String, { nullable: true }) - @Validator.MinLength(3) - @Validator.MaxLength(50) - name?: string; + @Field(() => String, { nullable: true }) + @Validator.MinLength(3) + @Validator.MaxLength(50) + name?: string; - @Field(() => UserEmailNameCompoundUniqueInput, { nullable: true }) - email_name?: UserEmailNameCompoundUniqueInput; + @Field(() => UserEmailNameCompoundUniqueInput, { nullable: true }) + email_name?: UserEmailNameCompoundUniqueInput; } diff --git a/@generated/user/user-where.input.ts b/@generated/user/user-where.input.ts index e46426c2..20d912ed 100644 --- a/@generated/user/user-where.input.ts +++ b/@generated/user/user-where.input.ts @@ -12,57 +12,57 @@ import { ProfileWhereInput } from '../profile/profile-where.input'; @InputType() export class UserWhereInput { - @Field(() => [UserWhereInput], { nullable: true }) - AND?: Array; + @Field(() => [UserWhereInput], { nullable: true }) + AND?: Array; - @Field(() => [UserWhereInput], { nullable: true }) - OR?: Array; + @Field(() => [UserWhereInput], { nullable: true }) + OR?: Array; - @Field(() => [UserWhereInput], { nullable: true }) - NOT?: Array; + @Field(() => [UserWhereInput], { nullable: true }) + NOT?: Array; - @Field(() => StringFilter, { nullable: true }) - id?: StringFilter; + @Field(() => StringFilter, { nullable: true }) + id?: StringFilter; - @Field(() => StringFilter, { nullable: true }) - email?: StringFilter; + @Field(() => StringFilter, { nullable: true }) + email?: StringFilter; - @Field(() => StringFilter, { nullable: true }) - name?: StringFilter; + @Field(() => StringFilter, { nullable: true }) + name?: StringFilter; - @Field(() => StringFilter, { nullable: true }) - password?: StringFilter; + @Field(() => StringFilter, { nullable: true }) + password?: StringFilter; - @Field(() => StringNullableFilter, { nullable: true }) - bio?: StringNullableFilter; + @Field(() => StringNullableFilter, { nullable: true }) + bio?: StringNullableFilter; - @Field(() => StringNullableFilter, { nullable: true }) - image?: StringNullableFilter; + @Field(() => StringNullableFilter, { nullable: true }) + image?: StringNullableFilter; - @Field(() => UserListRelationFilter, { nullable: true }) - following?: UserListRelationFilter; + @Field(() => UserListRelationFilter, { nullable: true }) + following?: UserListRelationFilter; - @Field(() => UserListRelationFilter, { nullable: true }) - followers?: UserListRelationFilter; + @Field(() => UserListRelationFilter, { nullable: true }) + followers?: UserListRelationFilter; - @Field(() => ArticleListRelationFilter, { nullable: true }) - favoriteArticles?: ArticleListRelationFilter; + @Field(() => ArticleListRelationFilter, { nullable: true }) + favoriteArticles?: ArticleListRelationFilter; - @Field(() => ArticleListRelationFilter, { nullable: true }) - articles?: ArticleListRelationFilter; + @Field(() => ArticleListRelationFilter, { nullable: true }) + articles?: ArticleListRelationFilter; - @Field(() => CommentListRelationFilter, { nullable: true }) - comments?: CommentListRelationFilter; + @Field(() => CommentListRelationFilter, { nullable: true }) + comments?: CommentListRelationFilter; - @Field(() => IntNullableFilter, { nullable: true }) - countComments?: IntNullableFilter; + @Field(() => IntNullableFilter, { nullable: true }) + countComments?: IntNullableFilter; - @Field(() => FloatNullableFilter, { nullable: true }) - rating?: FloatNullableFilter; + @Field(() => FloatNullableFilter, { nullable: true }) + rating?: FloatNullableFilter; - @Field(() => EnumRoleNullableFilter, { nullable: true }) - role?: EnumRoleNullableFilter; + @Field(() => EnumRoleNullableFilter, { nullable: true }) + role?: EnumRoleNullableFilter; - @Field(() => ProfileWhereInput, { nullable: true }) - profile?: ProfileWhereInput; + @Field(() => ProfileWhereInput, { nullable: true }) + profile?: ProfileWhereInput; } diff --git a/@generated/user/user.model.ts b/@generated/user/user.model.ts index e671eb83..4c3f8676 100644 --- a/@generated/user/user.model.ts +++ b/@generated/user/user.model.ts @@ -13,52 +13,52 @@ import { UserCount } from './user-count.output'; /** User really */ @ObjectType({ description: 'User really' }) export class User { - @Field(() => ID, { nullable: false }) - id!: string; + @Field(() => ID, { nullable: false }) + id!: string; - @Field(() => String, { nullable: false }) - email!: string; + @Field(() => String, { nullable: false }) + email!: string; - /** User's name */ - @Field(() => String, { nullable: false, description: "User's name" }) - name!: string; + /** User's name */ + @Field(() => String, { nullable: false, description: "User's name" }) + name!: string; - @HideField() - password!: string; + @HideField() + password!: string; - @Field(() => String, { nullable: true }) - bio!: string | null; + @Field(() => String, { nullable: true }) + bio!: string | null; - @Field(() => String, { nullable: true }) - image!: string | null; + @Field(() => String, { nullable: true }) + image!: string | null; - @Field(() => [User], { nullable: true }) - following?: Array; + @Field(() => [User], { nullable: true }) + following?: Array; - @Field(() => [User], { nullable: true }) - followers?: Array; + @Field(() => [User], { nullable: true }) + followers?: Array; - @Field(() => [Article], { nullable: true }) - favoriteArticles?: Array
; + @Field(() => [Article], { nullable: true }) + favoriteArticles?: Array
; - @Field(() => [Article], { nullable: true }) - articles?: Array
; + @Field(() => [Article], { nullable: true }) + articles?: Array
; - @Field(() => [Comment], { nullable: true }) - comments?: Array; + @Field(() => [Comment], { nullable: true }) + comments?: Array; - @Field(() => Int, { nullable: true }) - countComments!: number | null; + @Field(() => Int, { nullable: true }) + countComments!: number | null; - @Field(() => Float, { nullable: true }) - rating!: number | null; + @Field(() => Float, { nullable: true }) + rating!: number | null; - @Field(() => Role, { nullable: true }) - role!: keyof typeof Role | null; + @Field(() => Role, { nullable: true }) + role!: keyof typeof Role | null; - @Field(() => Profile, { nullable: true }) - profile?: Profile | null; + @Field(() => Profile, { nullable: true }) + profile?: Profile | null; - @Field(() => UserCount, { nullable: false }) - _count?: UserCount; + @Field(() => UserCount, { nullable: false }) + _count?: UserCount; } diff --git a/example/app.module.ts b/example/app.module.ts index e2f22125..7051d2f9 100644 --- a/example/app.module.ts +++ b/example/app.module.ts @@ -6,14 +6,14 @@ import { DummyModule } from './dummy/dummy.module'; import { UserModule } from './user/user.module'; @Module({ - imports: [ - UserModule, - DummyModule, - GraphQLModule.forRoot({ - driver: ApolloDriver, - installSubscriptionHandlers: true, - autoSchemaFile: '~schema.gql', - }), - ], + imports: [ + UserModule, + DummyModule, + GraphQLModule.forRoot({ + driver: ApolloDriver, + installSubscriptionHandlers: true, + autoSchemaFile: '~schema.gql', + }), + ], }) export class AppModule {} diff --git a/example/dummy/dummy.module.ts b/example/dummy/dummy.module.ts index 58d86e6e..ba72609c 100644 --- a/example/dummy/dummy.module.ts +++ b/example/dummy/dummy.module.ts @@ -3,7 +3,7 @@ import { Module } from '@nestjs/common'; import { DummyResolver } from './dummy.resolver'; @Module({ - imports: [], - providers: [DummyResolver], + imports: [], + providers: [DummyResolver], }) export class DummyModule {} diff --git a/example/dummy/dummy.resolver.ts b/example/dummy/dummy.resolver.ts index 49898ff3..1f5a4c8a 100644 --- a/example/dummy/dummy.resolver.ts +++ b/example/dummy/dummy.resolver.ts @@ -10,38 +10,38 @@ import { FindManyDummyArgs } from '../../@generated/dummy/find-many-dummy.args'; */ @Resolver(() => Dummy) export class DummyResolver { - /** - * Query for single user. - */ - @Query(() => [Dummy]) - dummies() { - const dummy = new Dummy(); - dummy.json = { - a: 1, - }; - dummy.decimal = new Prisma.Decimal(1.002); - return [dummy]; - } + /** + * Query for single user. + */ + @Query(() => [Dummy]) + dummies() { + const dummy = new Dummy(); + dummy.json = { + a: 1, + }; + dummy.decimal = new Prisma.Decimal(1.002); + return [dummy]; + } - @Query(() => [Dummy]) - // eslint-disable-next-line @typescript-eslint/no-unused-vars - findDummies(@Args() args: FindManyDummyArgs) { - // console.log('args.where.bigInt?.equals', args.where.bigInt?.equals); - const dummy = new Dummy(); - // @ts-ignore - dummy.id = ~~(Math.random() * 1000); - // @ts-ignore - dummy.bigInt = args.where.bigInt?.equals; - return [dummy]; - } + @Query(() => [Dummy]) + // eslint-disable-next-line @typescript-eslint/no-unused-vars + findDummies(@Args() args: FindManyDummyArgs) { + // console.log('args.where.bigInt?.equals', args.where.bigInt?.equals); + const dummy = new Dummy(); + // @ts-ignore + dummy.id = ~~(Math.random() * 1000); + // @ts-ignore + dummy.bigInt = args.where.bigInt?.equals; + return [dummy]; + } - @Mutation(() => Dummy) - createDummy(@Args('data') create: DummyCreateInput) { - console.log('create', create); - const dummy = new Dummy(); + @Mutation(() => Dummy) + createDummy(@Args('data') create: DummyCreateInput) { + console.log('create', create); + const dummy = new Dummy(); - dummy.created = new Date(); + dummy.created = new Date(); - return dummy; - } + return dummy; + } } diff --git a/example/main.ts b/example/main.ts index c1e26916..c86cdac3 100644 --- a/example/main.ts +++ b/example/main.ts @@ -4,10 +4,10 @@ import { NestFactory } from '@nestjs/core'; import { AppModule } from './app.module'; async function bootstrap() { - const app = await NestFactory.create(AppModule); - app.useGlobalPipes(new ValidationPipe()); + const app = await NestFactory.create(AppModule); + app.useGlobalPipes(new ValidationPipe()); - await app.listen(3000); - console.log(`Application is running on: ${await app.getUrl()}`); + await app.listen(3000); + console.log(`Application is running on: ${await app.getUrl()}`); } void bootstrap(); diff --git a/example/user/user-date.input.ts b/example/user/user-date.input.ts index e74cf9ea..a40c88eb 100644 --- a/example/user/user-date.input.ts +++ b/example/user/user-date.input.ts @@ -2,8 +2,8 @@ import { Field, GraphQLISODateTime, InputType } from '@nestjs/graphql'; @InputType() export class UserDateInput { - @Field(() => GraphQLISODateTime, { - nullable: true, - }) - date?: Date; + @Field(() => GraphQLISODateTime, { + nullable: true, + }) + date?: Date; } diff --git a/example/user/user.module.ts b/example/user/user.module.ts index ee4ef85e..c3f48b67 100644 --- a/example/user/user.module.ts +++ b/example/user/user.module.ts @@ -3,7 +3,7 @@ import { Module } from '@nestjs/common'; import { UserResolver } from './user.resolver'; @Module({ - imports: [], - providers: [UserResolver], + imports: [], + providers: [UserResolver], }) export class UserModule {} diff --git a/example/user/user.resolver.ts b/example/user/user.resolver.ts index c8867c92..698e3001 100644 --- a/example/user/user.resolver.ts +++ b/example/user/user.resolver.ts @@ -16,17 +16,17 @@ import { UserDateInput } from './user-date.input'; import { Resolver, Query, Args, Mutation, Info } from '@nestjs/graphql'; const prisma = new PrismaClient({ - errorFormat: 'colorless', - log: [ - { - emit: 'event', - level: 'query', - }, - ], + errorFormat: 'colorless', + log: [ + { + emit: 'event', + level: 'query', + }, + ], }); prisma.$on('query', event => { - console.log(event); + console.log(event); }); /** @@ -34,63 +34,53 @@ prisma.$on('query', event => { */ @Resolver(() => User) export class UserResolver { - /** - * Query for single user. - */ - @Query(() => [User]) - async users( - @Args('where') where: UserWhereInput, - @Info() info: GraphQLResolveInfo, - ) { - const select = new PrismaSelect(info).value; - // console.log('select', select); - return await prisma.user.findMany({ where, ...select }); - } + /** + * Query for single user. + */ + @Query(() => [User]) + async users(@Args('where') where: UserWhereInput, @Info() info: GraphQLResolveInfo) { + const select = new PrismaSelect(info).value; + // console.log('select', select); + return await prisma.user.findMany({ where, ...select }); + } - @Mutation(() => User, { nullable: true }) - async userUpdate(@Args('user') user: UserUpdateInput): Promise { - return; - } + @Mutation(() => User, { nullable: true }) + async userUpdate(@Args('user') user: UserUpdateInput): Promise { + return; + } - @Mutation(() => User, { nullable: true }) - async userCreate(@Args('user') user: UserCreateInput): Promise { - return; - } + @Mutation(() => User, { nullable: true }) + async userCreate(@Args('user') user: UserCreateInput): Promise { + return; + } - @Mutation(() => User, { nullable: true }) - async createOneUser(@Args() args: CreateOneUserArgs): Promise { - console.log('args', args); - return; - } + @Mutation(() => User, { nullable: true }) + async createOneUser(@Args() args: CreateOneUserArgs): Promise { + console.log('args', args); + return; + } - @Mutation(() => User, { nullable: true }) - async userInfo(@Args('user') user: UserDateInput): Promise { - console.log( - 'userInfo Args', - user.date, - typeof user.date, - user.date?.constructor, - ); - return; - } + @Mutation(() => User, { nullable: true }) + async userInfo(@Args('user') user: UserDateInput): Promise { + console.log('userInfo Args', user.date, typeof user.date, user.date?.constructor); + return; + } - @Mutation(() => [User], { nullable: true }) - async createManyUsers( - @Args() createManyUserArgs: CreateManyUserArgs, - ): Promise { - console.log('createManyUserArgs', createManyUserArgs); - return; - } + @Mutation(() => [User], { nullable: true }) + async createManyUsers(@Args() createManyUserArgs: CreateManyUserArgs): Promise { + console.log('createManyUserArgs', createManyUserArgs); + return; + } - @Query(() => AggregateUser) - userAggregate(@Args() args: UserAggregateArgs) { - return prisma.user.aggregate(args); - } + @Query(() => AggregateUser) + userAggregate(@Args() args: UserAggregateArgs) { + return prisma.user.aggregate(args); + } - @Query(() => Profile) - queryProfile() { - const p = new Profile(); - p.id = 1; - return p; - } + @Query(() => Profile) + queryProfile() { + const p = new Profile(); + p.id = 1; + return p; + } } diff --git a/src/generate.ts b/src/generate.ts index 98d635c9..15125532 100644 --- a/src/generate.ts +++ b/src/generate.ts @@ -23,164 +23,164 @@ import { createConfig } from './helpers/create-config'; import { factoryGetSourceFile } from './helpers/factory-get-source-file'; import { createGetModelName } from './helpers/get-model-name'; import { - DMMF, - EventArguments, - Field, - Model, - ObjectSettings, - OutputType, + DMMF, + EventArguments, + Field, + Model, + ObjectSettings, + OutputType, } from './types'; export async function generate( - args: GeneratorOptions & { - skipAddOutputSourceFiles?: boolean; - connectCallback?: ( - emitter: AwaitEventEmitter, - eventArguments: EventArguments, - ) => void | Promise; - }, + args: GeneratorOptions & { + skipAddOutputSourceFiles?: boolean; + connectCallback?: ( + emitter: AwaitEventEmitter, + eventArguments: EventArguments, + ) => void | Promise; + }, ) { - const { connectCallback, generator, skipAddOutputSourceFiles, dmmf } = args; - - const generatorOutputValue = generator.output?.value; - ok(generatorOutputValue, 'Missing generator configuration: output'); - - const eventEmitter = new AwaitEventEmitter(); - eventEmitter.on('Warning', warning); - eventEmitter.on('Model', modelData); - eventEmitter.on('EnumType', registerEnum); - eventEmitter.on('OutputType', outputType); - eventEmitter.on('ModelOutputType', modelOutputType); - eventEmitter.on('AggregateOutput', createAggregateInput); - eventEmitter.on('InputType', inputType); - eventEmitter.on('ArgsType', argsType); - eventEmitter.on('GenerateFiles', generateFiles); - - const config = createConfig(generator.config); - for (const message of config.$warnings) { - eventEmitter.emitSync('Warning', message); + const { connectCallback, generator, skipAddOutputSourceFiles, dmmf } = args; + + const generatorOutputValue = generator.output?.value; + ok(generatorOutputValue, 'Missing generator configuration: output'); + + const eventEmitter = new AwaitEventEmitter(); + eventEmitter.on('Warning', warning); + eventEmitter.on('Model', modelData); + eventEmitter.on('EnumType', registerEnum); + eventEmitter.on('OutputType', outputType); + eventEmitter.on('ModelOutputType', modelOutputType); + eventEmitter.on('AggregateOutput', createAggregateInput); + eventEmitter.on('InputType', inputType); + eventEmitter.on('ArgsType', argsType); + eventEmitter.on('GenerateFiles', generateFiles); + + const config = createConfig(generator.config); + for (const message of config.$warnings) { + eventEmitter.emitSync('Warning', message); + } + + const project = new Project({ + tsConfigFilePath: config.tsConfigFilePath, + skipAddingFilesFromTsConfig: true, + skipLoadingLibFiles: !config.emitCompiled, + manipulationSettings: { + quoteKind: QuoteKind.Single, + }, + }); + + if (!skipAddOutputSourceFiles) { + project.addSourceFilesAtPaths([ + `${generatorOutputValue}/**/*.ts`, + `!${generatorOutputValue}/**/*.d.ts`, + ]); + } + + config.combineScalarFilters && combineScalarFilters(eventEmitter); + config.noAtomicOperations && noAtomicOperations(eventEmitter); + config.reExport !== ReExport.None && reExport(eventEmitter); + config.emitSingle && emitSingle(eventEmitter); + config.purgeOutput && purgeOutput(eventEmitter); + config.requireSingleFieldsInWhereUniqueInput && + requireSingleFieldsInWhereUniqueInput(eventEmitter); + + const models = new Map(); + const modelNames: string[] = []; + const modelFields = new Map>(); + const fieldSettings = new Map>(); + const getModelName = createGetModelName(modelNames); + const getSourceFile = factoryGetSourceFile({ + output: generatorOutputValue, + project, + getModelName, + outputFilePattern: config.outputFilePattern, + eventEmitter, + }); + const { + datamodel, + schema: { inputObjectTypes, outputObjectTypes, enumTypes }, + } = JSON.parse(JSON.stringify(dmmf)) as DMMF.Document; + const removeTypes = new Set(); + const eventArguments: EventArguments = { + models, + config, + modelNames, + modelFields, + fieldSettings, + project, + output: generatorOutputValue, + getSourceFile, + eventEmitter, + typeNames: new Set(), + enums: mapKeys(datamodel.enums, x => x.name), + getModelName, + removeTypes, + }; + + if (connectCallback) { + await connectCallback(eventEmitter, eventArguments); + } + + await eventEmitter.emit('Begin', eventArguments); + + for (const model of datamodel.models) { + await eventEmitter.emit('Model', model, eventArguments); + } + + // Types behaves like model + for (const model of datamodel.types) { + await eventEmitter.emit('Model', model, eventArguments); + } + + await eventEmitter.emit('PostBegin', eventArguments); + + for (const enumType of enumTypes.prisma.concat(enumTypes.model || [])) { + await eventEmitter.emit('EnumType', enumType, eventArguments); + } + + for (const outputType of outputObjectTypes.model) { + await eventEmitter.emit('ModelOutputType', outputType, eventArguments); + } + + const queryOutputTypes: OutputType[] = []; + + for (const outputType of outputObjectTypes.prisma) { + if (['Query', 'Mutation'].includes(outputType.name)) { + queryOutputTypes.push(outputType); + continue; } + await eventEmitter.emit('OutputType', outputType, eventArguments); + } - const project = new Project({ - tsConfigFilePath: config.tsConfigFilePath, - skipAddingFilesFromTsConfig: true, - skipLoadingLibFiles: !config.emitCompiled, - manipulationSettings: { - quoteKind: QuoteKind.Single, - }, - }); - - if (!skipAddOutputSourceFiles) { - project.addSourceFilesAtPaths([ - `${generatorOutputValue}/**/*.ts`, - `!${generatorOutputValue}/**/*.d.ts`, - ]); - } + const inputTypes = inputObjectTypes.prisma.concat(inputObjectTypes.model || []); - config.combineScalarFilters && combineScalarFilters(eventEmitter); - config.noAtomicOperations && noAtomicOperations(eventEmitter); - config.reExport !== ReExport.None && reExport(eventEmitter); - config.emitSingle && emitSingle(eventEmitter); - config.purgeOutput && purgeOutput(eventEmitter); - config.requireSingleFieldsInWhereUniqueInput && - requireSingleFieldsInWhereUniqueInput(eventEmitter); - - const models = new Map(); - const modelNames: string[] = []; - const modelFields = new Map>(); - const fieldSettings = new Map>(); - const getModelName = createGetModelName(modelNames); - const getSourceFile = factoryGetSourceFile({ - output: generatorOutputValue, - project, - getModelName, - outputFilePattern: config.outputFilePattern, - eventEmitter, - }); - const { - datamodel, - schema: { inputObjectTypes, outputObjectTypes, enumTypes }, - } = JSON.parse(JSON.stringify(dmmf)) as DMMF.Document; - const removeTypes = new Set(); - const eventArguments: EventArguments = { - models, - config, - modelNames, - modelFields, - fieldSettings, - project, - output: generatorOutputValue, - getSourceFile, - eventEmitter, - typeNames: new Set(), - enums: mapKeys(datamodel.enums, x => x.name), - getModelName, - removeTypes, + for (const inputType of inputTypes) { + const event = { + ...eventArguments, + inputType, + fileType: 'input', + classDecoratorName: 'InputType', }; - - if (connectCallback) { - await connectCallback(eventEmitter, eventArguments); - } - - await eventEmitter.emit('Begin', eventArguments); - - for (const model of datamodel.models) { - await eventEmitter.emit('Model', model, eventArguments); - } - - // Types behaves like model - for (const model of datamodel.types) { - await eventEmitter.emit('Model', model, eventArguments); - } - - await eventEmitter.emit('PostBegin', eventArguments); - - for (const enumType of enumTypes.prisma.concat(enumTypes.model || [])) { - await eventEmitter.emit('EnumType', enumType, eventArguments); - } - - for (const outputType of outputObjectTypes.model) { - await eventEmitter.emit('ModelOutputType', outputType, eventArguments); - } - - const queryOutputTypes: OutputType[] = []; - - for (const outputType of outputObjectTypes.prisma) { - if (['Query', 'Mutation'].includes(outputType.name)) { - queryOutputTypes.push(outputType); - continue; - } - await eventEmitter.emit('OutputType', outputType, eventArguments); + if (inputType.fields.length === 0) { + removeTypes.add(inputType.name); + continue; } + await eventEmitter.emit('BeforeInputType', event); + await eventEmitter.emit('InputType', event); + } - const inputTypes = inputObjectTypes.prisma.concat(inputObjectTypes.model || []); - - for (const inputType of inputTypes) { - const event = { - ...eventArguments, - inputType, - fileType: 'input', - classDecoratorName: 'InputType', - }; - if (inputType.fields.length === 0) { - removeTypes.add(inputType.name); - continue; - } - await eventEmitter.emit('BeforeInputType', event); - await eventEmitter.emit('InputType', event); + for (const outputType of queryOutputTypes) { + for (const field of outputType.fields) { + await eventEmitter.emit('ArgsType', field, eventArguments); } + } - for (const outputType of queryOutputTypes) { - for (const field of outputType.fields) { - await eventEmitter.emit('ArgsType', field, eventArguments); - } - } + await eventEmitter.emit('BeforeGenerateFiles', eventArguments); + await eventEmitter.emit('GenerateFiles', eventArguments); + await eventEmitter.emit('End', eventArguments); - await eventEmitter.emit('BeforeGenerateFiles', eventArguments); - await eventEmitter.emit('GenerateFiles', eventArguments); - await eventEmitter.emit('End', eventArguments); - - for (const name of Object.keys(eventEmitter._events)) { - eventEmitter.off(name); - } + for (const name of Object.keys(eventEmitter._events)) { + eventEmitter.off(name); + } } diff --git a/src/handlers/args-type.ts b/src/handlers/args-type.ts index 6009d157..89a93b41 100644 --- a/src/handlers/args-type.ts +++ b/src/handlers/args-type.ts @@ -6,67 +6,65 @@ import { EventArguments, InputType, SchemaField } from '../types'; * Subcribes on: 'ArgsType' */ export function argsType(field: SchemaField, args: EventArguments) { - if (['queryRaw', 'executeRaw'].includes(field.name)) { - return; - } - const { eventEmitter, typeNames, getModelName } = args; - let className = pascalCase(`${field.name}Args`); - const modelName = getModelName(className) || ''; + if (['queryRaw', 'executeRaw'].includes(field.name)) { + return; + } + const { eventEmitter, typeNames, getModelName } = args; + let className = pascalCase(`${field.name}Args`); + const modelName = getModelName(className) || ''; - switch (className) { - case `Aggregate${modelName}Args`: - className = `${modelName}AggregateArgs`; - break; - case `GroupBy${modelName}Args`: - className = `${modelName}GroupByArgs`; - break; - } + switch (className) { + case `Aggregate${modelName}Args`: + className = `${modelName}AggregateArgs`; + break; + case `GroupBy${modelName}Args`: + className = `${modelName}GroupByArgs`; + break; + } - const inputType: InputType = { - // eslint-disable-next-line unicorn/no-null - constraints: { maxNumFields: null, minNumFields: null }, - name: className, - fields: [...field.args], - }; + const inputType: InputType = { + // eslint-disable-next-line unicorn/no-null + constraints: { maxNumFields: null, minNumFields: null }, + name: className, + fields: [...field.args], + }; - if ( - !field.args.some(x => x.name === '_count') && - [`${modelName}AggregateArgs`, `${modelName}GroupByArgs`].includes(className) - ) { - const names = ['Count', 'Avg', 'Sum', 'Min', 'Max']; - if (`${modelName}GroupByArgs` === inputType.name) { - // Make `by` property array only, noEnumerable - const byField = inputType.fields.find(f => f.name === 'by'); - if (byField?.inputTypes) { - byField.inputTypes = byField.inputTypes.filter( - inputType => inputType.isList, - ); - } - } - for (const name of names) { - if (!typeNames.has(`${modelName}${name}AggregateInput`)) { - continue; - } + if ( + !field.args.some(x => x.name === '_count') && + [`${modelName}AggregateArgs`, `${modelName}GroupByArgs`].includes(className) + ) { + const names = ['Count', 'Avg', 'Sum', 'Min', 'Max']; + if (`${modelName}GroupByArgs` === inputType.name) { + // Make `by` property array only, noEnumerable + const byField = inputType.fields.find(f => f.name === 'by'); + if (byField?.inputTypes) { + byField.inputTypes = byField.inputTypes.filter(inputType => inputType.isList); + } + } + for (const name of names) { + if (!typeNames.has(`${modelName}${name}AggregateInput`)) { + continue; + } - inputType.fields.push({ - name: `_${name.toLowerCase()}`, - isRequired: false, - isNullable: true, - inputTypes: [ - { - location: 'inputObjectTypes', - type: `${modelName}${name}AggregateInput`, - isList: false, - }, - ], - }); - } + inputType.fields.push({ + name: `_${name.toLowerCase()}`, + isRequired: false, + isNullable: true, + inputTypes: [ + { + location: 'inputObjectTypes', + type: `${modelName}${name}AggregateInput`, + isList: false, + }, + ], + }); } + } - eventEmitter.emitSync('InputType', { - ...args, - inputType, - fileType: 'args', - classDecoratorName: 'ArgsType', - }); + eventEmitter.emitSync('InputType', { + ...args, + inputType, + fileType: 'args', + classDecoratorName: 'ArgsType', + }); } diff --git a/src/handlers/combine-scalar-filters.ts b/src/handlers/combine-scalar-filters.ts index 7307fe64..4bb0753d 100644 --- a/src/handlers/combine-scalar-filters.ts +++ b/src/handlers/combine-scalar-filters.ts @@ -6,58 +6,58 @@ import { DMMF, EventArguments, InputType } from '../types'; * Subscribes on 'BeforeInputType' */ export function combineScalarFilters(eventEmitter: AwaitEventEmitter) { - eventEmitter.on('BeforeInputType', beforeInputType); - eventEmitter.on('BeforeGenerateField', beforeGenerateField); + eventEmitter.on('BeforeInputType', beforeInputType); + eventEmitter.on('BeforeGenerateField', beforeGenerateField); } function beforeInputType( - args: EventArguments & { - inputType: InputType; - fileType: string; - classDecoratorName: string; - }, + args: EventArguments & { + inputType: InputType; + fileType: string; + classDecoratorName: string; + }, ) { - const { inputType } = args; + const { inputType } = args; - if (isContainBogus(inputType.name) && isScalarFilter(inputType)) { - inputType.name = replaceBogus(String(inputType.name)); - } + if (isContainBogus(inputType.name) && isScalarFilter(inputType)) { + inputType.name = replaceBogus(String(inputType.name)); + } } function beforeGenerateField(field: DMMF.SchemaArg): void { - for (const fieldInput of field.inputTypes) { - if (fieldInput.location !== 'inputObjectTypes') { - continue; - } - const fieldInputType = String(fieldInput.type); - if (isContainBogus(fieldInputType)) { - fieldInput.type = replaceBogus(fieldInputType); - } + for (const fieldInput of field.inputTypes) { + if (fieldInput.location !== 'inputObjectTypes') { + continue; + } + const fieldInputType = String(fieldInput.type); + if (isContainBogus(fieldInputType)) { + fieldInput.type = replaceBogus(fieldInputType); } + } } function replaceBogus(name: string) { - return name.replace(/(Nullable|Nested)/g, ''); + return name.replace(/(Nullable|Nested)/g, ''); } function isContainBogus(name: string) { - return ( - name.startsWith('Nested') || - (name.includes('Nullable') && name.endsWith('Filter')) || - name.endsWith('NullableFilter') - ); + return ( + name.startsWith('Nested') || + (name.includes('Nullable') && name.endsWith('Filter')) || + name.endsWith('NullableFilter') + ); } function isScalarFilter(inputType: InputType) { - if (!inputType.name.endsWith('Filter')) { - return false; - } - let result = false; - const equals = inputType.fields.find(f => f.name === 'equals'); - if (equals) { - result = equals.inputTypes.every(x => { - return ['enumTypes', 'scalar'].includes(x.location); - }); - } - return result; + if (!inputType.name.endsWith('Filter')) { + return false; + } + let result = false; + const equals = inputType.fields.find(f => f.name === 'equals'); + if (equals) { + result = equals.inputTypes.every(x => { + return ['enumTypes', 'scalar'].includes(x.location); + }); + } + return result; } diff --git a/src/handlers/create-aggregate-input.ts b/src/handlers/create-aggregate-input.ts index 0ba465e4..8ce3d144 100644 --- a/src/handlers/create-aggregate-input.ts +++ b/src/handlers/create-aggregate-input.ts @@ -6,35 +6,35 @@ import { EventArguments, InputType, OutputType } from '../types'; * Subcribes on: 'AggregateOutput' */ export function createAggregateInput( - args: EventArguments & { outputType: OutputType }, + args: EventArguments & { outputType: OutputType }, ) { - const { eventEmitter, outputType } = args; - const className = `${outputType.name}Input`; + const { eventEmitter, outputType } = args; + const className = `${outputType.name}Input`; - // console.dir({ outputType, className, __filename }, { depth: 5 }); + // console.dir({ outputType, className, __filename }, { depth: 5 }); - const inputType: InputType = { - // eslint-disable-next-line unicorn/no-null - constraints: { maxNumFields: null, minNumFields: null }, - name: className, - fields: outputType.fields.map(x => ({ - name: x.name, - isNullable: x.isNullable ?? true, - isRequired: false, - inputTypes: [ - { - isList: false, - type: 'true', - location: 'scalar', - }, - ], - })), - }; + const inputType: InputType = { + // eslint-disable-next-line unicorn/no-null + constraints: { maxNumFields: null, minNumFields: null }, + name: className, + fields: outputType.fields.map(x => ({ + name: x.name, + isNullable: x.isNullable ?? true, + isRequired: false, + inputTypes: [ + { + isList: false, + type: 'true', + location: 'scalar', + }, + ], + })), + }; - eventEmitter.emitSync('InputType', { - ...args, - inputType, - fileType: 'input', - classDecoratorName: 'InputType', - }); + eventEmitter.emitSync('InputType', { + ...args, + inputType, + fileType: 'input', + classDecoratorName: 'InputType', + }); } diff --git a/src/handlers/emit-single.ts b/src/handlers/emit-single.ts index e88ef822..7b21606d 100644 --- a/src/handlers/emit-single.ts +++ b/src/handlers/emit-single.ts @@ -4,24 +4,24 @@ import { PropertyDeclarationStructure } from 'ts-morph'; import { DMMF } from '../types'; export function emitSingle(emitter: AwaitEventEmitter) { - emitter.on('ClassProperty', classProperty); + emitter.on('ClassProperty', classProperty); } function classProperty( - property: PropertyDeclarationStructure, - eventArguments: { - location: DMMF.FieldLocation; - isList: boolean; - propertyType: string[]; - }, + property: PropertyDeclarationStructure, + eventArguments: { + location: DMMF.FieldLocation; + isList: boolean; + propertyType: string[]; + }, ) { - const { location, isList, propertyType } = eventArguments; - if (['inputObjectTypes', 'outputObjectTypes'].includes(location) && !isList) { - const types = propertyType.filter(t => t !== 'null'); - property.type = types.map(t => `InstanceType`).join(' | '); - if (types.length !== propertyType.length) { - // If null was removed - property.type += ' | null'; - } + const { location, isList, propertyType } = eventArguments; + if (['inputObjectTypes', 'outputObjectTypes'].includes(location) && !isList) { + const types = propertyType.filter(t => t !== 'null'); + property.type = types.map(t => `InstanceType`).join(' | '); + if (types.length !== propertyType.length) { + // If null was removed + property.type += ' | null'; } + } } diff --git a/src/handlers/generate-files.ts b/src/handlers/generate-files.ts index 961147e7..7abf02fe 100644 --- a/src/handlers/generate-files.ts +++ b/src/handlers/generate-files.ts @@ -1,126 +1,123 @@ import { ok } from 'assert'; import { - ClassDeclarationStructure, - ImportSpecifierStructure, - StatementStructures, - StructureKind, + ClassDeclarationStructure, + ImportSpecifierStructure, + StatementStructures, + StructureKind, } from 'ts-morph'; import { ImportDeclarationMap } from '../helpers/import-declaration-map'; import { EventArguments } from '../types'; export async function generateFiles(args: EventArguments) { - const { project, config, output, eventEmitter } = args; + const { project, config, output, eventEmitter } = args; - if (config.emitSingle) { - const rootDirectory = - project.getDirectory(output) || project.createDirectory(output); - const sourceFile = - rootDirectory.getSourceFile('index.ts') || - rootDirectory.createSourceFile('index.ts', undefined, { overwrite: true }); - const statements = project.getSourceFiles().flatMap(s => { - if (s === sourceFile) { - return []; - } - const classDeclaration = s.getClass(() => true); - const statements = s.getStructure().statements; - // Reget decorator full name - // TODO: Check possible bug of ts-morph - if (Array.isArray(statements)) { - for (const statement of statements) { - if ( - !( - typeof statement === 'object' && - statement.kind === StructureKind.Class - ) - ) { - continue; - } - for (const property of statement.properties || []) { - for (const decorator of property.decorators || []) { - const fullName = classDeclaration - ?.getProperty(property.name) - ?.getDecorator(decorator.name) - ?.getFullName(); - ok( - fullName, - `Cannot get full name of decorator of class ${statement.name!}`, - ); - decorator.name = fullName; - } - } - } + if (config.emitSingle) { + const rootDirectory = + project.getDirectory(output) || project.createDirectory(output); + const sourceFile = + rootDirectory.getSourceFile('index.ts') || + rootDirectory.createSourceFile('index.ts', undefined, { overwrite: true }); + const statements = project.getSourceFiles().flatMap(s => { + if (s === sourceFile) { + return []; + } + const classDeclaration = s.getClass(() => true); + const statements = s.getStructure().statements; + // Reget decorator full name + // TODO: Check possible bug of ts-morph + if (Array.isArray(statements)) { + for (const statement of statements) { + if ( + !(typeof statement === 'object' && statement.kind === StructureKind.Class) + ) { + continue; + } + for (const property of statement.properties || []) { + for (const decorator of property.decorators || []) { + const fullName = classDeclaration + ?.getProperty(property.name) + ?.getDecorator(decorator.name) + ?.getFullName(); + ok( + fullName, + `Cannot get full name of decorator of class ${statement.name!}`, + ); + decorator.name = fullName; } + } + } + } - project.removeSourceFile(s); - return statements; - }); - const imports = new ImportDeclarationMap(); - const enums: (StatementStructures | string)[] = []; - const classes: ClassDeclarationStructure[] = []; - for (const statement of statements as (StatementStructures | string)[]) { - if (typeof statement === 'string') { - if (statement.startsWith('registerEnumType')) { - enums.push(statement); - } - continue; - } - switch (statement.kind) { - case StructureKind.ImportDeclaration: - if ( - statement.moduleSpecifier.startsWith('./') || - statement.moduleSpecifier.startsWith('..') - ) { - continue; - } - for (const namedImport of statement.namedImports as ImportSpecifierStructure[]) { - const name = namedImport.alias || namedImport.name; - imports.add(name, statement.moduleSpecifier); - } - if (statement.defaultImport) { - imports.create({ - from: statement.moduleSpecifier, - name: statement.defaultImport, - defaultImport: statement.defaultImport, - }); - } - if (statement.namespaceImport) { - imports.create({ - from: statement.moduleSpecifier, - name: statement.namespaceImport, - namespaceImport: statement.namespaceImport, - }); - } - break; - case StructureKind.Enum: - enums.unshift(statement); - break; - case StructureKind.Class: - classes.push(statement); - break; - } + project.removeSourceFile(s); + return statements; + }); + const imports = new ImportDeclarationMap(); + const enums: (StatementStructures | string)[] = []; + const classes: ClassDeclarationStructure[] = []; + for (const statement of statements as (StatementStructures | string)[]) { + if (typeof statement === 'string') { + if (statement.startsWith('registerEnumType')) { + enums.push(statement); } - sourceFile.set({ - kind: StructureKind.SourceFile, - statements: [...imports.toStatements(), ...enums, ...classes], - }); + continue; + } + switch (statement.kind) { + case StructureKind.ImportDeclaration: + if ( + statement.moduleSpecifier.startsWith('./') || + statement.moduleSpecifier.startsWith('..') + ) { + continue; + } + for (const namedImport of statement.namedImports as ImportSpecifierStructure[]) { + const name = namedImport.alias || namedImport.name; + imports.add(name, statement.moduleSpecifier); + } + if (statement.defaultImport) { + imports.create({ + from: statement.moduleSpecifier, + name: statement.defaultImport, + defaultImport: statement.defaultImport, + }); + } + if (statement.namespaceImport) { + imports.create({ + from: statement.moduleSpecifier, + name: statement.namespaceImport, + namespaceImport: statement.namespaceImport, + }); + } + break; + case StructureKind.Enum: + enums.unshift(statement); + break; + case StructureKind.Class: + classes.push(statement); + break; + } } + sourceFile.set({ + kind: StructureKind.SourceFile, + statements: [...imports.toStatements(), ...enums, ...classes], + }); + } - if (config.emitCompiled) { - project.compilerOptions.set({ - declaration: true, - declarationDir: output, - rootDir: output, - outDir: output, - emitDecoratorMetadata: false, - skipLibCheck: true, - }); - const emitResult = await project.emit(); - const errors = emitResult.getDiagnostics().map(d => String(d.getMessageText())); - if (errors.length > 0) { - eventEmitter.emitSync('Warning', errors); - } - } else { - await project.save(); + if (config.emitCompiled) { + project.compilerOptions.set({ + declaration: true, + declarationDir: output, + rootDir: output, + outDir: output, + emitDecoratorMetadata: false, + skipLibCheck: true, + }); + const emitResult = await project.emit(); + const errors = emitResult.getDiagnostics().map(d => String(d.getMessageText())); + if (errors.length > 0) { + eventEmitter.emitSync('Warning', errors); } + } else { + await project.save(); + } } diff --git a/src/handlers/input-type.ts b/src/handlers/input-type.ts index 1a3cc200..be13d8da 100644 --- a/src/handlers/input-type.ts +++ b/src/handlers/input-type.ts @@ -12,228 +12,216 @@ import { propertyStructure } from '../helpers/property-structure'; import { EventArguments, InputType } from '../types'; export function inputType( - args: EventArguments & { - inputType: InputType; - fileType: string; - classDecoratorName: string; - }, + args: EventArguments & { + inputType: InputType; + fileType: string; + classDecoratorName: string; + }, ) { - const { - inputType, - fileType, - getSourceFile, - config, - eventEmitter, - classDecoratorName, - fieldSettings, - getModelName, - models, - removeTypes, - typeNames, - } = args; - - typeNames.add(inputType.name); - - const importDeclarations = new ImportDeclarationMap(); - const sourceFile = getSourceFile({ - name: inputType.name, - type: fileType, + const { + inputType, + fileType, + getSourceFile, + config, + eventEmitter, + classDecoratorName, + fieldSettings, + getModelName, + models, + removeTypes, + typeNames, + } = args; + + typeNames.add(inputType.name); + + const importDeclarations = new ImportDeclarationMap(); + const sourceFile = getSourceFile({ + name: inputType.name, + type: fileType, + }); + const classStructure: ClassDeclarationStructure = { + kind: StructureKind.Class, + isExported: true, + name: inputType.name, + decorators: [ + { + name: classDecoratorName, + arguments: [], + }, + ], + properties: [], + }; + const modelName = getModelName(inputType.name) || ''; + const model = models.get(modelName); + const modelFieldSettings = model && fieldSettings.get(model.name); + const moduleSpecifier = '@nestjs/graphql'; + + // console.log('sourceFile.getBaseName()', sourceFile.getBaseName()); + + importDeclarations + .set('Field', { + namedImports: [{ name: 'Field' }], + moduleSpecifier, + }) + .set(classDecoratorName, { + namedImports: [{ name: classDecoratorName }], + moduleSpecifier, }); - const classStructure: ClassDeclarationStructure = { - kind: StructureKind.Class, - isExported: true, - name: inputType.name, - decorators: [ - { - name: classDecoratorName, - arguments: [], - }, - ], - properties: [], - }; - const modelName = getModelName(inputType.name) || ''; - const model = models.get(modelName); - const modelFieldSettings = model && fieldSettings.get(model.name); - const moduleSpecifier = '@nestjs/graphql'; - - // console.log('sourceFile.getBaseName()', sourceFile.getBaseName()); - - importDeclarations - .set('Field', { - namedImports: [{ name: 'Field' }], - moduleSpecifier, - }) - .set(classDecoratorName, { - namedImports: [{ name: classDecoratorName }], - moduleSpecifier, - }); - - const useInputType = config.useInputType.find(x => - inputType.name.includes(x.typeName), - ); - for (const field of inputType.fields) { - field.inputTypes = field.inputTypes.filter( - t => !removeTypes.has(String(t.type)), - ); - eventEmitter.emitSync('BeforeGenerateField', field, args); + const useInputType = config.useInputType.find(x => + inputType.name.includes(x.typeName), + ); - const { inputTypes, isRequired, name } = field; + for (const field of inputType.fields) { + field.inputTypes = field.inputTypes.filter(t => !removeTypes.has(String(t.type))); + eventEmitter.emitSync('BeforeGenerateField', field, args); - if (inputTypes.length === 0) { - // No types - continue; - } + const { inputTypes, isRequired, name } = field; - const usePattern = useInputType?.ALL || useInputType?.[name]; - const graphqlInputType = getGraphqlInputType(inputTypes, usePattern); - const { isList, location, type } = graphqlInputType; - const typeName = String(type); - const settings = modelFieldSettings?.get(name); - const propertySettings = settings?.getPropertyType({ - name: inputType.name, - input: true, - }); - const isCustomsApplicable = - typeName === model?.fields.find(f => f.name === name)?.type; - const propertyType = castArray( - propertySettings?.name || - getPropertyType({ - location, - type: typeName, - }), - ); - const property = propertyStructure({ - name, - isNullable: !isRequired, - propertyType, - isList, - }); - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - classStructure.properties!.push(property); - - if (propertySettings) { - importDeclarations.create({ ...propertySettings }); - } else if (propertyType.includes('Decimal')) { - importDeclarations.add('Decimal', '@prisma/client/runtime'); - } + if (inputTypes.length === 0) { + // No types + continue; + } - // Get graphql type - let graphqlType: string; - const shouldHideField = - settings?.shouldHideField({ - name: inputType.name, - input: true, - }) || - config.decorate.some( - d => - d.name === 'HideField' && - d.from === '@nestjs/graphql' && - d.isMatchField(name) && - d.isMatchType(inputType.name), - ); - - const fieldType = settings?.getFieldType({ - name: inputType.name, - input: true, - }); + const usePattern = useInputType?.ALL || useInputType?.[name]; + const graphqlInputType = getGraphqlInputType(inputTypes, usePattern); + const { isList, location, type } = graphqlInputType; + const typeName = String(type); + const settings = modelFieldSettings?.get(name); + const propertySettings = settings?.getPropertyType({ + name: inputType.name, + input: true, + }); + const isCustomsApplicable = + typeName === model?.fields.find(f => f.name === name)?.type; + const propertyType = castArray( + propertySettings?.name || + getPropertyType({ + location, + type: typeName, + }), + ); + const property = propertyStructure({ + name, + isNullable: !isRequired, + propertyType, + isList, + }); + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + classStructure.properties!.push(property); - if (fieldType && isCustomsApplicable && !shouldHideField) { - graphqlType = fieldType.name; - importDeclarations.create({ ...fieldType }); - } else { - // Import property type class - const graphqlImport = getGraphqlImport({ - config, - sourceFile, - location, - typeName, - getSourceFile, - }); + if (propertySettings) { + importDeclarations.create({ ...propertySettings }); + } else if (propertyType.includes('Decimal')) { + importDeclarations.add('Decimal', '@prisma/client/runtime'); + } - graphqlType = graphqlImport.name; - let referenceName = propertyType[0]; - if (location === 'enumTypes') { - referenceName = last(referenceName.split(' ')) as string; - } - - if ( - graphqlImport.specifier && - !importDeclarations.has(graphqlImport.name) && - graphqlImport.name !== inputType.name - // ((graphqlImport.name !== inputType.name && !shouldHideField) || - // (shouldHideField && referenceName === graphqlImport.name)) - ) { - importDeclarations.set(graphqlImport.name, { - namedImports: [{ name: graphqlImport.name }], - moduleSpecifier: graphqlImport.specifier, - }); - } - } + // Get graphql type + let graphqlType: string; + const shouldHideField = + settings?.shouldHideField({ + name: inputType.name, + input: true, + }) || + config.decorate.some( + d => + d.name === 'HideField' && + d.from === '@nestjs/graphql' && + d.isMatchField(name) && + d.isMatchType(inputType.name), + ); + + const fieldType = settings?.getFieldType({ + name: inputType.name, + input: true, + }); - ok(property.decorators, 'property.decorators is undefined'); + if (fieldType && isCustomsApplicable && !shouldHideField) { + graphqlType = fieldType.name; + importDeclarations.create({ ...fieldType }); + } else { + // Import property type class + const graphqlImport = getGraphqlImport({ + config, + sourceFile, + location, + typeName, + getSourceFile, + }); + + graphqlType = graphqlImport.name; + let referenceName = propertyType[0]; + if (location === 'enumTypes') { + referenceName = last(referenceName.split(' ')) as string; + } + + if ( + graphqlImport.specifier && + !importDeclarations.has(graphqlImport.name) && + graphqlImport.name !== inputType.name + // ((graphqlImport.name !== inputType.name && !shouldHideField) || + // (shouldHideField && referenceName === graphqlImport.name)) + ) { + importDeclarations.set(graphqlImport.name, { + namedImports: [{ name: graphqlImport.name }], + moduleSpecifier: graphqlImport.specifier, + }); + } + } - if (shouldHideField) { - importDeclarations.add('HideField', '@nestjs/graphql'); - property.decorators.push({ name: 'HideField', arguments: [] }); - } else { - // Generate `@Field()` decorator + ok(property.decorators, 'property.decorators is undefined'); + + if (shouldHideField) { + importDeclarations.add('HideField', '@nestjs/graphql'); + property.decorators.push({ name: 'HideField', arguments: [] }); + } else { + // Generate `@Field()` decorator + property.decorators.push({ + name: 'Field', + arguments: [ + isList ? `() => [${graphqlType}]` : `() => ${graphqlType}`, + JSON5.stringify({ + ...settings?.fieldArguments(), + nullable: !isRequired, + }), + ], + }); + + if (isCustomsApplicable) { + for (const options of settings || []) { + if ( + (options.kind === 'Decorator' && options.input && options.match?.(name)) ?? + true + ) { property.decorators.push({ - name: 'Field', - arguments: [ - isList ? `() => [${graphqlType}]` : `() => ${graphqlType}`, - JSON5.stringify({ - ...settings?.fieldArguments(), - nullable: !isRequired, - }), - ], + name: options.name, + arguments: options.arguments as string[], }); - - if (isCustomsApplicable) { - for (const options of settings || []) { - if ( - (options.kind === 'Decorator' && - options.input && - options.match?.(name)) ?? - true - ) { - property.decorators.push({ - name: options.name, - arguments: options.arguments as string[], - }); - ok( - options.from, - "Missed 'from' part in configuration or field setting", - ); - importDeclarations.create(options); - } - } - } - - for (const decorate of config.decorate) { - if ( - decorate.isMatchField(name) && - decorate.isMatchType(inputType.name) - ) { - property.decorators.push({ - name: decorate.name, - arguments: decorate.arguments?.map(x => - pupa(x, { propertyType }), - ), - }); - importDeclarations.create(decorate); - } - } + ok(options.from, "Missed 'from' part in configuration or field setting"); + importDeclarations.create(options); + } } - - eventEmitter.emitSync('ClassProperty', property, { - location, - isList, - propertyType, - }); + } + + for (const decorate of config.decorate) { + if (decorate.isMatchField(name) && decorate.isMatchType(inputType.name)) { + property.decorators.push({ + name: decorate.name, + arguments: decorate.arguments?.map(x => pupa(x, { propertyType })), + }); + importDeclarations.create(decorate); + } + } } - sourceFile.set({ - statements: [...importDeclarations.toStatements(), classStructure], + eventEmitter.emitSync('ClassProperty', property, { + location, + isList, + propertyType, }); + } + + sourceFile.set({ + statements: [...importDeclarations.toStatements(), classStructure], + }); } diff --git a/src/handlers/model-data.ts b/src/handlers/model-data.ts index bd30a9ed..0be2aecf 100644 --- a/src/handlers/model-data.ts +++ b/src/handlers/model-data.ts @@ -2,25 +2,25 @@ import { createObjectSettings, ObjectSettings } from '../helpers/object-settings import { DMMF, EventArguments, Field } from '../types'; export function modelData(model: DMMF.Model, args: EventArguments) { - const { config, modelNames, models, modelFields, fieldSettings } = args; - modelNames.push(model.name); - models.set(model.name, model); + const { config, modelNames, models, modelFields, fieldSettings } = args; + modelNames.push(model.name); + models.set(model.name, model); - const modelFieldsValue = new Map(); - modelFields.set(model.name, modelFieldsValue); + const modelFieldsValue = new Map(); + modelFields.set(model.name, modelFieldsValue); - const fieldSettingsValue = new Map(); - fieldSettings.set(model.name, fieldSettingsValue); + const fieldSettingsValue = new Map(); + fieldSettings.set(model.name, fieldSettingsValue); - for (const field of model.fields) { - if (field.documentation) { - const { documentation, settings } = createObjectSettings({ - text: field.documentation, - config, - }); - field.documentation = documentation; - fieldSettingsValue.set(field.name, settings); - } - modelFieldsValue.set(field.name, field); + for (const field of model.fields) { + if (field.documentation) { + const { documentation, settings } = createObjectSettings({ + text: field.documentation, + config, + }); + field.documentation = documentation; + fieldSettingsValue.set(field.name, settings); } + modelFieldsValue.set(field.name, field); + } } diff --git a/src/handlers/model-output-type.ts b/src/handlers/model-output-type.ts index 7c12f84e..42235b04 100644 --- a/src/handlers/model-output-type.ts +++ b/src/handlers/model-output-type.ts @@ -4,10 +4,10 @@ import { castArray } from 'lodash'; import pupa from 'pupa'; import { PlainObject } from 'simplytyped'; import { - ClassDeclarationStructure, - ExportSpecifierStructure, - StatementStructures, - StructureKind, + ClassDeclarationStructure, + ExportSpecifierStructure, + StatementStructures, + StructureKind, } from 'ts-morph'; import { createComment } from '../helpers/create-comment'; @@ -16,9 +16,9 @@ import { getOutputTypeName } from '../helpers/get-output-type-name'; import { getPropertyType } from '../helpers/get-property-type'; import { ImportDeclarationMap } from '../helpers/import-declaration-map'; import { - createObjectSettings, - ObjectSetting, - ObjectSettings, + createObjectSettings, + ObjectSetting, + ObjectSettings, } from '../helpers/object-settings'; import { propertyStructure } from '../helpers/property-structure'; import { EventArguments, OutputType } from '../types'; @@ -26,248 +26,237 @@ import { EventArguments, OutputType } from '../types'; const nestjsGraphql = '@nestjs/graphql'; export function modelOutputType(outputType: OutputType, args: EventArguments) { - const { getSourceFile, models, config, modelFields, fieldSettings, eventEmitter } = - args; - const model = models.get(outputType.name); - ok(model, `Cannot find model by name ${outputType.name}`); + const { getSourceFile, models, config, modelFields, fieldSettings, eventEmitter } = + args; + const model = models.get(outputType.name); + ok(model, `Cannot find model by name ${outputType.name}`); - const sourceFile = getSourceFile({ - name: outputType.name, - type: 'model', - }); - const sourceFileStructure = sourceFile.getStructure(); - const exportDeclaration = getExportDeclaration( - model.name, - sourceFileStructure.statements as StatementStructures[], - ); - const importDeclarations = new ImportDeclarationMap(); - const classStructure: ClassDeclarationStructure = { - kind: StructureKind.Class, - isExported: true, - name: outputType.name, - decorators: [ - { - name: 'ObjectType', - arguments: [], - }, - ], - properties: [], - }; - (sourceFileStructure.statements as StatementStructures[]).push(classStructure); - ok(classStructure.decorators, 'classStructure.decorators is undefined'); - const decorator = classStructure.decorators.find(d => d.name === 'ObjectType'); - ok(decorator, 'ObjectType decorator not found'); + const sourceFile = getSourceFile({ + name: outputType.name, + type: 'model', + }); + const sourceFileStructure = sourceFile.getStructure(); + const exportDeclaration = getExportDeclaration( + model.name, + sourceFileStructure.statements as StatementStructures[], + ); + const importDeclarations = new ImportDeclarationMap(); + const classStructure: ClassDeclarationStructure = { + kind: StructureKind.Class, + isExported: true, + name: outputType.name, + decorators: [ + { + name: 'ObjectType', + arguments: [], + }, + ], + properties: [], + }; + (sourceFileStructure.statements as StatementStructures[]).push(classStructure); + ok(classStructure.decorators, 'classStructure.decorators is undefined'); + const decorator = classStructure.decorators.find(d => d.name === 'ObjectType'); + ok(decorator, 'ObjectType decorator not found'); - let modelSettings: ObjectSettings | undefined; - // Get model settings from documentation - if (model.documentation) { - const objectTypeOptions: PlainObject = {}; - const { documentation, settings } = createObjectSettings({ - text: model.documentation, - config, - }); - if (documentation) { - if (!classStructure.leadingTrivia) { - classStructure.leadingTrivia = createComment(documentation); - } - objectTypeOptions.description = documentation; - } - decorator.arguments = settings.getObjectTypeArguments(objectTypeOptions); - modelSettings = settings; + let modelSettings: ObjectSettings | undefined; + // Get model settings from documentation + if (model.documentation) { + const objectTypeOptions: PlainObject = {}; + const { documentation, settings } = createObjectSettings({ + text: model.documentation, + config, + }); + if (documentation) { + if (!classStructure.leadingTrivia) { + classStructure.leadingTrivia = createComment(documentation); + } + objectTypeOptions.description = documentation; } + decorator.arguments = settings.getObjectTypeArguments(objectTypeOptions); + modelSettings = settings; + } - importDeclarations.add('Field', nestjsGraphql); - importDeclarations.add('ObjectType', nestjsGraphql); + importDeclarations.add('Field', nestjsGraphql); + importDeclarations.add('ObjectType', nestjsGraphql); - for (const field of outputType.fields) { - let fileType = 'model'; - const { location, isList, type, namespace } = field.outputType; + for (const field of outputType.fields) { + let fileType = 'model'; + const { location, isList, type, namespace } = field.outputType; - let outputTypeName = String(type); - if (namespace !== 'model') { - fileType = 'output'; - outputTypeName = getOutputTypeName(outputTypeName); - } - const modelField = modelFields.get(model.name)?.get(field.name); - const settings = fieldSettings.get(model.name)?.get(field.name); - const fieldType = settings?.getFieldType({ - name: outputType.name, - output: true, - }); - const propertySettings = settings?.getPropertyType({ - name: outputType.name, - output: true, - }); - - const propertyType = castArray( - propertySettings?.name || - getPropertyType({ - location, - type: outputTypeName, - }), - ); + let outputTypeName = String(type); + if (namespace !== 'model') { + fileType = 'output'; + outputTypeName = getOutputTypeName(outputTypeName); + } + const modelField = modelFields.get(model.name)?.get(field.name); + const settings = fieldSettings.get(model.name)?.get(field.name); + const fieldType = settings?.getFieldType({ + name: outputType.name, + output: true, + }); + const propertySettings = settings?.getPropertyType({ + name: outputType.name, + output: true, + }); - // For model we keep only one type - propertyType.splice(1, propertyType.length); + const propertyType = castArray( + propertySettings?.name || + getPropertyType({ + location, + type: outputTypeName, + }), + ); - if (field.isNullable && !isList) { - propertyType.push('null'); - } + // For model we keep only one type + propertyType.splice(1, propertyType.length); - let graphqlType: string; + if (field.isNullable && !isList) { + propertyType.push('null'); + } - if (fieldType) { - graphqlType = fieldType.name; - importDeclarations.create({ ...fieldType }); - } else { - const graphqlImport = getGraphqlImport({ - config, - sourceFile, - fileType, - location, - isId: modelField?.isId, - noTypeId: config.noTypeId, - typeName: outputTypeName, - getSourceFile, - }); + let graphqlType: string; - graphqlType = graphqlImport.name; + if (fieldType) { + graphqlType = fieldType.name; + importDeclarations.create({ ...fieldType }); + } else { + const graphqlImport = getGraphqlImport({ + config, + sourceFile, + fileType, + location, + isId: modelField?.isId, + noTypeId: config.noTypeId, + typeName: outputTypeName, + getSourceFile, + }); - if (graphqlImport.name !== outputType.name && graphqlImport.specifier) { - importDeclarations.add(graphqlImport.name, graphqlImport.specifier); - } - } + graphqlType = graphqlImport.name; - const property = propertyStructure({ - name: field.name, - isNullable: field.isNullable, - hasExclamationToken: true, - hasQuestionToken: location === 'outputObjectTypes', - propertyType, - isList, - }); + if (graphqlImport.name !== outputType.name && graphqlImport.specifier) { + importDeclarations.add(graphqlImport.name, graphqlImport.specifier); + } + } - if (typeof property.leadingTrivia === 'string' && modelField?.documentation) { - property.leadingTrivia += createComment(modelField.documentation, settings); - } + const property = propertyStructure({ + name: field.name, + isNullable: field.isNullable, + hasExclamationToken: true, + hasQuestionToken: location === 'outputObjectTypes', + propertyType, + isList, + }); - classStructure.properties?.push(property); + if (typeof property.leadingTrivia === 'string' && modelField?.documentation) { + property.leadingTrivia += createComment(modelField.documentation, settings); + } - if (propertySettings) { - importDeclarations.create({ ...propertySettings }); - } else if (propertyType.includes('Decimal')) { - importDeclarations.add('Decimal', '@prisma/client/runtime'); - } + classStructure.properties?.push(property); - ok(property.decorators, 'property.decorators is undefined'); + if (propertySettings) { + importDeclarations.create({ ...propertySettings }); + } else if (propertyType.includes('Decimal')) { + importDeclarations.add('Decimal', '@prisma/client/runtime'); + } - if (settings?.shouldHideField({ name: outputType.name, output: true })) { - importDeclarations.add('HideField', nestjsGraphql); - property.decorators.push({ name: 'HideField', arguments: [] }); - } else { - // Generate `@Field()` decorator - property.decorators.push({ - name: 'Field', - arguments: [ - isList ? `() => [${graphqlType}]` : `() => ${graphqlType}`, - JSON5.stringify({ - ...settings?.fieldArguments(), - nullable: Boolean(field.isNullable), - defaultValue: ['number', 'string', 'boolean'].includes( - typeof modelField?.default, - ) - ? modelField?.default - : undefined, - description: modelField?.documentation, - }), - ], - }); + ok(property.decorators, 'property.decorators is undefined'); - for (const setting of settings || []) { - if ( - shouldBeDecorated(setting) && - (setting.match?.(field.name) ?? true) - ) { - property.decorators.push({ - name: setting.name, - arguments: setting.arguments as string[], - }); - ok( - setting.from, - "Missed 'from' part in configuration or field setting", - ); - importDeclarations.create(setting); - } - } + if (settings?.shouldHideField({ name: outputType.name, output: true })) { + importDeclarations.add('HideField', nestjsGraphql); + property.decorators.push({ name: 'HideField', arguments: [] }); + } else { + // Generate `@Field()` decorator + property.decorators.push({ + name: 'Field', + arguments: [ + isList ? `() => [${graphqlType}]` : `() => ${graphqlType}`, + JSON5.stringify({ + ...settings?.fieldArguments(), + nullable: Boolean(field.isNullable), + defaultValue: ['number', 'string', 'boolean'].includes( + typeof modelField?.default, + ) + ? modelField?.default + : undefined, + description: modelField?.documentation, + }), + ], + }); - for (const decorate of config.decorate) { - if ( - decorate.isMatchField(field.name) && - decorate.isMatchType(outputTypeName) - ) { - property.decorators.push({ - name: decorate.name, - arguments: decorate.arguments?.map(x => - pupa(x, { propertyType }), - ), - }); - importDeclarations.create(decorate); - } - } + for (const setting of settings || []) { + if (shouldBeDecorated(setting) && (setting.match?.(field.name) ?? true)) { + property.decorators.push({ + name: setting.name, + arguments: setting.arguments as string[], + }); + ok(setting.from, "Missed 'from' part in configuration or field setting"); + importDeclarations.create(setting); } + } - eventEmitter.emitSync('ClassProperty', property, { - location, - isList, - propertyType, - }); - } - - // Generate class decorators from model settings - for (const setting of modelSettings || []) { - // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion - if (shouldBeDecorated(setting)) { - classStructure.decorators.push({ - name: setting.name, - arguments: setting.arguments as string[], - }); - importDeclarations.create(setting); + for (const decorate of config.decorate) { + if (decorate.isMatchField(field.name) && decorate.isMatchType(outputTypeName)) { + property.decorators.push({ + name: decorate.name, + arguments: decorate.arguments?.map(x => pupa(x, { propertyType })), + }); + importDeclarations.create(decorate); } + } } - if (exportDeclaration) { - sourceFile.set({ - statements: [exportDeclaration, '\n', classStructure], - }); - const classDeclaration = sourceFile.getClassOrThrow(model.name); - const commentedText = classDeclaration - .getText() - .split('\n') - .map(x => `// ${x}`); - classDeclaration.remove(); - sourceFile.addStatements(['\n', ...commentedText]); - } else { - sourceFile.set({ - statements: [...importDeclarations.toStatements(), classStructure], - }); + eventEmitter.emitSync('ClassProperty', property, { + location, + isList, + propertyType, + }); + } + + // Generate class decorators from model settings + for (const setting of modelSettings || []) { + // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion + if (shouldBeDecorated(setting)) { + classStructure.decorators.push({ + name: setting.name, + arguments: setting.arguments as string[], + }); + importDeclarations.create(setting); } + } + + if (exportDeclaration) { + sourceFile.set({ + statements: [exportDeclaration, '\n', classStructure], + }); + const classDeclaration = sourceFile.getClassOrThrow(model.name); + const commentedText = classDeclaration + .getText() + .split('\n') + .map(x => `// ${x}`); + classDeclaration.remove(); + sourceFile.addStatements(['\n', ...commentedText]); + } else { + sourceFile.set({ + statements: [...importDeclarations.toStatements(), classStructure], + }); + } } function shouldBeDecorated(setting: ObjectSetting) { - return ( - setting.kind === 'Decorator' && - (setting.output || setting.model) && - !(setting.output && setting.model) - ); + return ( + setting.kind === 'Decorator' && + (setting.output || setting.model) && + !(setting.output && setting.model) + ); } function getExportDeclaration(name: string, statements: StatementStructures[]) { - return statements.find(structure => { - return ( - structure.kind === StructureKind.ExportDeclaration && - (structure.namedExports as ExportSpecifierStructure[]).some( - o => (o.alias || o.name) === name, - ) - ); - }); + return statements.find(structure => { + return ( + structure.kind === StructureKind.ExportDeclaration && + (structure.namedExports as ExportSpecifierStructure[]).some( + o => (o.alias || o.name) === name, + ) + ); + }); } diff --git a/src/handlers/no-atomic-operations.ts b/src/handlers/no-atomic-operations.ts index c6fcbb03..5358bbce 100644 --- a/src/handlers/no-atomic-operations.ts +++ b/src/handlers/no-atomic-operations.ts @@ -3,34 +3,34 @@ import AwaitEventEmitter from 'await-event-emitter'; import { EventArguments, InputType } from '../types'; export function noAtomicOperations(eventEmitter: AwaitEventEmitter) { - eventEmitter.on('BeforeInputType', beforeInputType); - eventEmitter.on('BeforeGenerateFiles', beforeGenerateFiles); + eventEmitter.on('BeforeInputType', beforeInputType); + eventEmitter.on('BeforeGenerateFiles', beforeGenerateFiles); } function beforeInputType(args: EventArguments & { inputType: InputType }) { - const { inputType } = args; + const { inputType } = args; - for (const field of inputType.fields) { - field.inputTypes = field.inputTypes.filter(inputType => { - if (isAtomicOperation(String(inputType.type))) { - return false; - } - return true; - }); - } + for (const field of inputType.fields) { + field.inputTypes = field.inputTypes.filter(inputType => { + if (isAtomicOperation(String(inputType.type))) { + return false; + } + return true; + }); + } } function beforeGenerateFiles(args: EventArguments) { - const { project } = args; + const { project } = args; - for (const sourceFile of project.getSourceFiles()) { - const className = sourceFile.getClass(() => true)?.getName(); - if (className && isAtomicOperation(className)) { - project.removeSourceFile(sourceFile); - } + for (const sourceFile of project.getSourceFiles()) { + const className = sourceFile.getClass(() => true)?.getName(); + if (className && isAtomicOperation(className)) { + project.removeSourceFile(sourceFile); } + } } function isAtomicOperation(name: string) { - return name.endsWith('FieldUpdateOperationsInput'); + return name.endsWith('FieldUpdateOperationsInput'); } diff --git a/src/handlers/output-type.ts b/src/handlers/output-type.ts index f472b691..db739785 100644 --- a/src/handlers/output-type.ts +++ b/src/handlers/output-type.ts @@ -13,187 +13,184 @@ import { EventArguments, OutputType } from '../types'; const nestjsGraphql = '@nestjs/graphql'; export function outputType(outputType: OutputType, args: EventArguments) { - const { getSourceFile, models, eventEmitter, fieldSettings, getModelName, config } = - args; - const importDeclarations = new ImportDeclarationMap(); - - const fileType = 'output'; - const modelName = getModelName(outputType.name) || ''; - const model = models.get(modelName); - const isAggregateOutput = - model && - /(?:Count|Avg|Sum|Min|Max)AggregateOutputType$/.test(outputType.name) && - String(outputType.name).startsWith(model.name); - const isCountOutput = - model?.name && outputType.name === `${model.name}CountOutputType`; - // Get rid of bogus suffixes - outputType.name = getOutputTypeName(outputType.name); - - if (isAggregateOutput) { - eventEmitter.emitSync('AggregateOutput', { ...args, outputType }); - } - - const sourceFile = getSourceFile({ - name: outputType.name, - type: fileType, + const { getSourceFile, models, eventEmitter, fieldSettings, getModelName, config } = + args; + const importDeclarations = new ImportDeclarationMap(); + + const fileType = 'output'; + const modelName = getModelName(outputType.name) || ''; + const model = models.get(modelName); + const isAggregateOutput = + model && + /(?:Count|Avg|Sum|Min|Max)AggregateOutputType$/.test(outputType.name) && + String(outputType.name).startsWith(model.name); + const isCountOutput = + model?.name && outputType.name === `${model.name}CountOutputType`; + // Get rid of bogus suffixes + outputType.name = getOutputTypeName(outputType.name); + + if (isAggregateOutput) { + eventEmitter.emitSync('AggregateOutput', { ...args, outputType }); + } + + const sourceFile = getSourceFile({ + name: outputType.name, + type: fileType, + }); + + const classStructure: ClassDeclarationStructure = { + kind: StructureKind.Class, + isExported: true, + name: outputType.name, + decorators: [ + { + name: 'ObjectType', + arguments: [], + }, + ], + properties: [], + }; + + importDeclarations.add('Field', nestjsGraphql); + importDeclarations.add('ObjectType', nestjsGraphql); + + for (const field of outputType.fields) { + const { location, isList, type } = field.outputType; + const outputTypeName = getOutputTypeName(String(type)); + const settings = isCountOutput + ? undefined + : model && fieldSettings.get(model.name)?.get(field.name); + const propertySettings = settings?.getPropertyType({ + name: outputType.name, + output: true, + }); + const isCustomsApplicable = + outputTypeName === model?.fields.find(f => f.name === field.name)?.type; + + field.outputType.type = outputTypeName; + + const propertyType = castArray( + propertySettings?.name || + getPropertyType({ + location, + type: outputTypeName, + }), + ); + + const property = propertyStructure({ + name: field.name, + isNullable: field.isNullable, + hasQuestionToken: isCountOutput ? true : undefined, + propertyType, + isList, }); - const classStructure: ClassDeclarationStructure = { - kind: StructureKind.Class, - isExported: true, - name: outputType.name, - decorators: [ - { - name: 'ObjectType', - arguments: [], - }, - ], - properties: [], - }; - - importDeclarations.add('Field', nestjsGraphql); - importDeclarations.add('ObjectType', nestjsGraphql); - - for (const field of outputType.fields) { - const { location, isList, type } = field.outputType; - const outputTypeName = getOutputTypeName(String(type)); - const settings = isCountOutput - ? undefined - : model && fieldSettings.get(model.name)?.get(field.name); - const propertySettings = settings?.getPropertyType({ - name: outputType.name, - output: true, - }); - const isCustomsApplicable = - outputTypeName === model?.fields.find(f => f.name === field.name)?.type; - - field.outputType.type = outputTypeName; - - const propertyType = castArray( - propertySettings?.name || - getPropertyType({ - location, - type: outputTypeName, - }), - ); - - const property = propertyStructure({ - name: field.name, - isNullable: field.isNullable, - hasQuestionToken: isCountOutput ? true : undefined, - propertyType, - isList, - }); + classStructure.properties?.push(property); - classStructure.properties?.push(property); + if (propertySettings) { + importDeclarations.create({ ...propertySettings }); + } else if (propertyType.includes('Decimal')) { + importDeclarations.add('Decimal', '@prisma/client/runtime'); + } - if (propertySettings) { - importDeclarations.create({ ...propertySettings }); - } else if (propertyType.includes('Decimal')) { - importDeclarations.add('Decimal', '@prisma/client/runtime'); - } + // Get graphql type + let graphqlType: string; + const shouldHideField = + settings?.shouldHideField({ + name: outputType.name, + output: true, + }) || + config.decorate.some( + d => + d.name === 'HideField' && + d.from === '@nestjs/graphql' && + d.isMatchField(field.name) && + d.isMatchType(outputTypeName), + ); + + const fieldType = settings?.getFieldType({ + name: outputType.name, + output: true, + }); - // Get graphql type - let graphqlType: string; - const shouldHideField = - settings?.shouldHideField({ - name: outputType.name, - output: true, - }) || - config.decorate.some( - d => - d.name === 'HideField' && - d.from === '@nestjs/graphql' && - d.isMatchField(field.name) && - d.isMatchType(outputTypeName), - ); - - const fieldType = settings?.getFieldType({ - name: outputType.name, - output: true, + if (fieldType && isCustomsApplicable && !shouldHideField) { + graphqlType = fieldType.name; + importDeclarations.create({ ...fieldType }); + } else { + const graphqlImport = getGraphqlImport({ + config, + sourceFile, + fileType, + location, + isId: false, + typeName: outputTypeName, + getSourceFile, + }); + + graphqlType = graphqlImport.name; + let referenceName = propertyType[0]; + if (location === 'enumTypes') { + referenceName = last(referenceName.split(' ')) as string; + } + + if ( + graphqlImport.specifier && + !importDeclarations.has(graphqlImport.name) && + ((graphqlImport.name !== outputType.name && !shouldHideField) || + (shouldHideField && referenceName === graphqlImport.name)) + ) { + importDeclarations.set(graphqlImport.name, { + namedImports: [{ name: graphqlImport.name }], + moduleSpecifier: graphqlImport.specifier, }); + } + } - if (fieldType && isCustomsApplicable && !shouldHideField) { - graphqlType = fieldType.name; - importDeclarations.create({ ...fieldType }); - } else { - const graphqlImport = getGraphqlImport({ - config, - sourceFile, - fileType, - location, - isId: false, - typeName: outputTypeName, - getSourceFile, - }); - - graphqlType = graphqlImport.name; - let referenceName = propertyType[0]; - if (location === 'enumTypes') { - referenceName = last(referenceName.split(' ')) as string; - } - - if ( - graphqlImport.specifier && - !importDeclarations.has(graphqlImport.name) && - ((graphqlImport.name !== outputType.name && !shouldHideField) || - (shouldHideField && referenceName === graphqlImport.name)) - ) { - importDeclarations.set(graphqlImport.name, { - namedImports: [{ name: graphqlImport.name }], - moduleSpecifier: graphqlImport.specifier, - }); - } - } - - ok(property.decorators, 'property.decorators is undefined'); - - if (shouldHideField) { - importDeclarations.add('HideField', nestjsGraphql); - property.decorators.push({ name: 'HideField', arguments: [] }); - } else { - // Generate `@Field()` decorator + ok(property.decorators, 'property.decorators is undefined'); + + if (shouldHideField) { + importDeclarations.add('HideField', nestjsGraphql); + property.decorators.push({ name: 'HideField', arguments: [] }); + } else { + // Generate `@Field()` decorator + property.decorators.push({ + name: 'Field', + arguments: [ + isList ? `() => [${graphqlType}]` : `() => ${graphqlType}`, + JSON5.stringify({ + ...settings?.fieldArguments(), + nullable: Boolean(field.isNullable), + }), + ], + }); + + if (isCustomsApplicable) { + for (const options of settings || []) { + if ( + (options.kind === 'Decorator' && + options.output && + options.match?.(field.name)) ?? + true + ) { property.decorators.push({ - name: 'Field', - arguments: [ - isList ? `() => [${graphqlType}]` : `() => ${graphqlType}`, - JSON5.stringify({ - ...settings?.fieldArguments(), - nullable: Boolean(field.isNullable), - }), - ], + name: options.name, + arguments: options.arguments as string[], }); - - if (isCustomsApplicable) { - for (const options of settings || []) { - if ( - (options.kind === 'Decorator' && - options.output && - options.match?.(field.name)) ?? - true - ) { - property.decorators.push({ - name: options.name, - arguments: options.arguments as string[], - }); - ok( - options.from, - "Missed 'from' part in configuration or field setting", - ); - importDeclarations.create(options); - } - } - } + ok(options.from, "Missed 'from' part in configuration or field setting"); + importDeclarations.create(options); + } } - - eventEmitter.emitSync('ClassProperty', property, { - location, - isList, - propertyType, - }); + } } - sourceFile.set({ - statements: [...importDeclarations.toStatements(), classStructure], + eventEmitter.emitSync('ClassProperty', property, { + location, + isList, + propertyType, }); + } + + sourceFile.set({ + statements: [...importDeclarations.toStatements(), classStructure], + }); } diff --git a/src/handlers/purge-output.ts b/src/handlers/purge-output.ts index bac1669a..b672f5c2 100644 --- a/src/handlers/purge-output.ts +++ b/src/handlers/purge-output.ts @@ -4,31 +4,31 @@ import { promises as fs } from 'fs'; import { EventArguments } from '../types'; export function purgeOutput(emitter: AwaitEventEmitter) { - emitter.on('Begin', begin); - emitter.on('End', end); + emitter.on('Begin', begin); + emitter.on('End', end); } function begin({ project, output }: EventArguments) { - const sourceFiles = project.getDirectory(output)?.getDescendantSourceFiles(); + const sourceFiles = project.getDirectory(output)?.getDescendantSourceFiles(); - if (sourceFiles) { - for (const sourceFile of sourceFiles) { - sourceFile.delete(); - } + if (sourceFiles) { + for (const sourceFile of sourceFiles) { + sourceFile.delete(); } + } } async function end({ project, output }: EventArguments) { - const directories = project - .getDirectory(output) - ?.getDescendantDirectories() - .filter(directory => directory.getSourceFiles().length === 0) - .map(directory => directory.getPath()); + const directories = project + .getDirectory(output) + ?.getDescendantDirectories() + .filter(directory => directory.getSourceFiles().length === 0) + .map(directory => directory.getPath()); - for (const directory of directories || []) { - try { - await fs.rmdir(directory); - // eslint-disable-next-line no-empty - } catch {} - } + for (const directory of directories || []) { + try { + await fs.rmdir(directory); + // eslint-disable-next-line no-empty + } catch {} + } } diff --git a/src/handlers/re-export.ts b/src/handlers/re-export.ts index 6bd6e118..33253ffa 100644 --- a/src/handlers/re-export.ts +++ b/src/handlers/re-export.ts @@ -1,124 +1,124 @@ import AwaitEventEmitter from 'await-event-emitter'; import { - Directory, - ExportDeclarationStructure, - SourceFile, - StructureKind, + Directory, + ExportDeclarationStructure, + SourceFile, + StructureKind, } from 'ts-morph'; import { EventArguments } from '../types'; export enum ReExport { - None = 'None', - Directories = 'Directories', - Single = 'Single', - All = 'All', + None = 'None', + Directories = 'Directories', + Single = 'Single', + All = 'All', } export function reExport(emitter: AwaitEventEmitter) { - emitter.on('BeforeGenerateFiles', beforeGenerateFiles); + emitter.on('BeforeGenerateFiles', beforeGenerateFiles); } function beforeGenerateFiles(args: EventArguments) { - const { project, output, config } = args; - const rootDirectory = project.getDirectoryOrThrow(output); + const { project, output, config } = args; + const rootDirectory = project.getDirectoryOrThrow(output); - if ([ReExport.Directories, ReExport.All].includes(config.reExport)) { - for (const directory of rootDirectory.getDescendantDirectories()) { - let indexSourceFile: SourceFile | undefined; + if ([ReExport.Directories, ReExport.All].includes(config.reExport)) { + for (const directory of rootDirectory.getDescendantDirectories()) { + let indexSourceFile: SourceFile | undefined; - const exportDeclarations: ExportDeclarationStructure[] = directory - .getSourceFiles() - .filter(sourceFile => { - return sourceFile.getBaseName() !== 'index.ts'; - }) - .map(sourcesFile => getExportDeclaration(directory, sourcesFile)); + const exportDeclarations: ExportDeclarationStructure[] = directory + .getSourceFiles() + .filter(sourceFile => { + return sourceFile.getBaseName() !== 'index.ts'; + }) + .map(sourcesFile => getExportDeclaration(directory, sourcesFile)); - if (exportDeclarations.length > 0) { - indexSourceFile = directory.createSourceFile( - 'index.ts', - { - statements: exportDeclarations, - }, - { - overwrite: true, - }, - ); - } - - if (indexSourceFile) { - continue; - } + if (exportDeclarations.length > 0) { + indexSourceFile = directory.createSourceFile( + 'index.ts', + { + statements: exportDeclarations, + }, + { + overwrite: true, + }, + ); + } - const namespaceExportDeclarations: ExportDeclarationStructure[] = directory - .getDirectories() - .map(sourceDirectory => - getNamespaceExportDeclaration(directory, sourceDirectory), - ); + if (indexSourceFile) { + continue; + } - project.createSourceFile( - `${directory.getPath()}/index.ts`, - { - statements: namespaceExportDeclarations, - }, - { - overwrite: true, - }, - ); - } - } - if (config.reExport === ReExport.Single) { - const exportDeclarations: ExportDeclarationStructure[] = project - .getSourceFiles() - .filter(sourceFile => { - return sourceFile.getBaseName() !== 'index.ts'; - }) - .map(sourceFile => getExportDeclaration(rootDirectory, sourceFile)); - rootDirectory.createSourceFile( - 'index.ts', - { - statements: exportDeclarations, - }, - { - overwrite: true, - }, + const namespaceExportDeclarations: ExportDeclarationStructure[] = directory + .getDirectories() + .map(sourceDirectory => + getNamespaceExportDeclaration(directory, sourceDirectory), ); + + project.createSourceFile( + `${directory.getPath()}/index.ts`, + { + statements: namespaceExportDeclarations, + }, + { + overwrite: true, + }, + ); } - if (config.reExport === ReExport.All) { - const exportDeclarations: ExportDeclarationStructure[] = []; - for (const directory of rootDirectory.getDirectories()) { - const sourceFile = directory.getSourceFileOrThrow('index.ts'); - exportDeclarations.push(getExportDeclaration(rootDirectory, sourceFile)); - } - rootDirectory.createSourceFile( - 'index.ts', - { - statements: exportDeclarations, - }, - { - overwrite: true, - }, - ); + } + if (config.reExport === ReExport.Single) { + const exportDeclarations: ExportDeclarationStructure[] = project + .getSourceFiles() + .filter(sourceFile => { + return sourceFile.getBaseName() !== 'index.ts'; + }) + .map(sourceFile => getExportDeclaration(rootDirectory, sourceFile)); + rootDirectory.createSourceFile( + 'index.ts', + { + statements: exportDeclarations, + }, + { + overwrite: true, + }, + ); + } + if (config.reExport === ReExport.All) { + const exportDeclarations: ExportDeclarationStructure[] = []; + for (const directory of rootDirectory.getDirectories()) { + const sourceFile = directory.getSourceFileOrThrow('index.ts'); + exportDeclarations.push(getExportDeclaration(rootDirectory, sourceFile)); } + rootDirectory.createSourceFile( + 'index.ts', + { + statements: exportDeclarations, + }, + { + overwrite: true, + }, + ); + } } function getExportDeclaration( - directory: Directory, - sourceFile: SourceFile, + directory: Directory, + sourceFile: SourceFile, ): ExportDeclarationStructure { - return { - kind: StructureKind.ExportDeclaration, - namedExports: sourceFile.getExportSymbols().map(s => ({ name: s.getName() })), - moduleSpecifier: directory.getRelativePathAsModuleSpecifierTo(sourceFile), - }; + return { + kind: StructureKind.ExportDeclaration, + namedExports: sourceFile.getExportSymbols().map(s => ({ name: s.getName() })), + moduleSpecifier: directory.getRelativePathAsModuleSpecifierTo(sourceFile), + }; } function getNamespaceExportDeclaration( - directory: Directory, - sourceDirectory: Directory, + directory: Directory, + sourceDirectory: Directory, ): ExportDeclarationStructure { - return { - kind: StructureKind.ExportDeclaration, - moduleSpecifier: directory.getRelativePathAsModuleSpecifierTo(sourceDirectory), - }; + return { + kind: StructureKind.ExportDeclaration, + moduleSpecifier: directory.getRelativePathAsModuleSpecifierTo(sourceDirectory), + }; } diff --git a/src/handlers/register-enum.ts b/src/handlers/register-enum.ts index 2f4b4d2f..5e79d93c 100644 --- a/src/handlers/register-enum.ts +++ b/src/handlers/register-enum.ts @@ -4,38 +4,38 @@ import { ImportDeclarationMap } from '../helpers/import-declaration-map'; import { EventArguments, SchemaEnum } from '../types'; export function registerEnum(enumType: SchemaEnum, args: EventArguments) { - const { getSourceFile, enums } = args; - const dataModelEnum = enums[enumType.name]; - const sourceFile = getSourceFile({ - name: enumType.name, - type: 'enum', - }); + const { getSourceFile, enums } = args; + const dataModelEnum = enums[enumType.name]; + const sourceFile = getSourceFile({ + name: enumType.name, + type: 'enum', + }); - const importDeclarations = new ImportDeclarationMap(); + const importDeclarations = new ImportDeclarationMap(); - importDeclarations.set('registerEnumType', { - namedImports: [{ name: 'registerEnumType' }], - moduleSpecifier: '@nestjs/graphql', - }); + importDeclarations.set('registerEnumType', { + namedImports: [{ name: 'registerEnumType' }], + moduleSpecifier: '@nestjs/graphql', + }); - const enumStructure: EnumDeclarationStructure = { - kind: StructureKind.Enum, - isExported: true, - name: enumType.name, - members: enumType.values.map(v => ({ - name: v, - initializer: JSON.stringify(v), - })), - }; + const enumStructure: EnumDeclarationStructure = { + kind: StructureKind.Enum, + isExported: true, + name: enumType.name, + members: enumType.values.map(v => ({ + name: v, + initializer: JSON.stringify(v), + })), + }; - sourceFile.set({ - statements: [ - ...importDeclarations.toStatements(), - enumStructure, - '\n', - `registerEnumType(${enumType.name}, { name: '${ - enumType.name - }', description: ${JSON.stringify(dataModelEnum?.documentation)} })`, - ], - }); + sourceFile.set({ + statements: [ + ...importDeclarations.toStatements(), + enumStructure, + '\n', + `registerEnumType(${enumType.name}, { name: '${ + enumType.name + }', description: ${JSON.stringify(dataModelEnum?.documentation)} })`, + ], + }); } diff --git a/src/handlers/require-single-fields-in-whereunique-input.ts b/src/handlers/require-single-fields-in-whereunique-input.ts index 77cfcaa3..24966232 100644 --- a/src/handlers/require-single-fields-in-whereunique-input.ts +++ b/src/handlers/require-single-fields-in-whereunique-input.ts @@ -3,22 +3,22 @@ import AwaitEventEmitter from 'await-event-emitter'; import { EventArguments, InputType } from '../types'; export function requireSingleFieldsInWhereUniqueInput(eventEmitter: AwaitEventEmitter) { - eventEmitter.on('BeforeInputType', beforeInputType); + eventEmitter.on('BeforeInputType', beforeInputType); } function beforeInputType(args: EventArguments & { inputType: InputType }) { - const { inputType } = args; + const { inputType } = args; - if (!isWhereUniqueInputType(inputType.name) || inputType.fields.length !== 1) { - return; - } + if (!isWhereUniqueInputType(inputType.name) || inputType.fields.length !== 1) { + return; + } - for (const field of inputType.fields) { - field.isRequired = true; - field.isNullable = false; - } + for (const field of inputType.fields) { + field.isRequired = true; + field.isNullable = false; + } } function isWhereUniqueInputType(name: string) { - return name.endsWith('WhereUniqueInput'); + return name.endsWith('WhereUniqueInput'); } diff --git a/src/handlers/warning.ts b/src/handlers/warning.ts index 66f254d5..9efd9c48 100644 --- a/src/handlers/warning.ts +++ b/src/handlers/warning.ts @@ -1,9 +1,9 @@ export function warning(messages: string[]): void; export function warning(message: string | string[]): void { - if (Array.isArray(message)) { - console.log('prisma-nestjs-graphql:'); - console.log(message.join('\n')); - } else { - console.log('prisma-nestjs-graphql:', message); - } + if (Array.isArray(message)) { + console.log('prisma-nestjs-graphql:'); + console.log(message.join('\n')); + } else { + console.log('prisma-nestjs-graphql:', message); + } } diff --git a/src/helpers/create-comment.ts b/src/helpers/create-comment.ts index b86a9c3b..1035d656 100644 --- a/src/helpers/create-comment.ts +++ b/src/helpers/create-comment.ts @@ -1,20 +1,20 @@ import { ObjectSettings } from '../types'; export function createComment(documentation: string, settings?: ObjectSettings) { - const documentationLines = documentation.split('\n'); - const commentLines = ['/**']; + const documentationLines = documentation.split('\n'); + const commentLines = ['/**']; - for (const line of documentationLines) { - commentLines.push(` * ${line}`); - } + for (const line of documentationLines) { + commentLines.push(` * ${line}`); + } - const deprecationReason = settings?.fieldArguments()?.deprecationReason as string; + const deprecationReason = settings?.fieldArguments()?.deprecationReason as string; - if (deprecationReason) { - commentLines.push(` * @deprecated ${deprecationReason}`); - } + if (deprecationReason) { + commentLines.push(` * @deprecated ${deprecationReason}`); + } - commentLines.push(' */\n'); + commentLines.push(' */\n'); - return commentLines.join('\n'); + return commentLines.join('\n'); } diff --git a/src/helpers/create-config.spec.ts b/src/helpers/create-config.spec.ts index c453ad5e..033ce6a3 100644 --- a/src/helpers/create-config.spec.ts +++ b/src/helpers/create-config.spec.ts @@ -4,94 +4,94 @@ import { ReExport } from '../handlers/re-export'; import { createConfig } from './create-config'; describe('createConfig', () => { - it('createConfig smoke', () => { - expect(typeof createConfig).toEqual('function'); - }); + it('createConfig smoke', () => { + expect(typeof createConfig).toEqual('function'); + }); - it('createConfig default', () => { - const result = createConfig({}); - expect(result.combineScalarFilters).toEqual(false); - expect(result.noAtomicOperations).toEqual(false); - expect(result.$warnings).toEqual([]); - expect(result.reExport).toEqual(ReExport.None); - }); + it('createConfig default', () => { + const result = createConfig({}); + expect(result.combineScalarFilters).toEqual(false); + expect(result.noAtomicOperations).toEqual(false); + expect(result.$warnings).toEqual([]); + expect(result.reExport).toEqual(ReExport.None); + }); - it('filename with parent reference should be not valid', () => { - const result = createConfig({ - outputFilePattern: '../../../{model}//{name}.{type}.ts/', - }); - expect(result.outputFilePattern).toEqual('{model}/{name}.{type}.ts'); - expect(result.$warnings).toContainEqual( - "Due to invalid filepath 'outputFilePattern' changed to '{model}/{name}.{type}.ts'", - ); + it('filename with parent reference should be not valid', () => { + const result = createConfig({ + outputFilePattern: '../../../{model}//{name}.{type}.ts/', }); + expect(result.outputFilePattern).toEqual('{model}/{name}.{type}.ts'); + expect(result.$warnings).toContainEqual( + "Due to invalid filepath 'outputFilePattern' changed to '{model}/{name}.{type}.ts'", + ); + }); - it('create config reExport', () => { - const result = createConfig({ reExport: 'Single' }); - expect(result.reExport).toEqual(ReExport.Single); - }); + it('create config reExport', () => { + const result = createConfig({ reExport: 'Single' }); + expect(result.reExport).toEqual(ReExport.Single); + }); - it('createConfig useInputType 1', () => { - const result = createConfig({ - useInputType_CreateInput_ALL: 'WhereInput', - useInputType_CreateInput_author: 'WhereInput', - }); - expect(result.useInputType).toEqual([ - { - typeName: 'CreateInput', - ALL: 'WhereInput', - author: 'WhereInput', - }, - ]); + it('createConfig useInputType 1', () => { + const result = createConfig({ + useInputType_CreateInput_ALL: 'WhereInput', + useInputType_CreateInput_author: 'WhereInput', }); + expect(result.useInputType).toEqual([ + { + typeName: 'CreateInput', + ALL: 'WhereInput', + author: 'WhereInput', + }, + ]); + }); - it('create config decorate from array', () => { - const result = createConfig({ - decorate_1_type: 'CreateOneUserArgs', - decorate_1_field: 'data', - decorate_1_name: 'ValidateNested', - decorate_1_from: 'class-validator', - decorate_1_arguments: '[]', - decorate_2_type: 'CreateOneUserArgs', - decorate_2_field: 'data', - decorate_2_from: 'class-transformer', - decorate_2_arguments: '[]', - decorate_2_name: 'Type', - decorate_2_namedImport: true, - }); - expect(result.decorate).toBeInstanceOf(Array); - expect(result.decorate).toHaveLength(2); + it('create config decorate from array', () => { + const result = createConfig({ + decorate_1_type: 'CreateOneUserArgs', + decorate_1_field: 'data', + decorate_1_name: 'ValidateNested', + decorate_1_from: 'class-validator', + decorate_1_arguments: '[]', + decorate_2_type: 'CreateOneUserArgs', + decorate_2_field: 'data', + decorate_2_from: 'class-transformer', + decorate_2_arguments: '[]', + decorate_2_name: 'Type', + decorate_2_namedImport: true, }); + expect(result.decorate).toBeInstanceOf(Array); + expect(result.decorate).toHaveLength(2); + }); - it('create config decorate from object', () => { - const result = createConfig({ - decorate_a_type: 'CreateOneUserArgs', - decorate_a_field: 'data', - decorate_a_name: 'ValidateNested', - decorate_a_from: 'class-validator', - decorate_a_arguments: '[]', - decorate_b_type: 'CreateOneUserArgs', - decorate_b_field: 'data', - decorate_b_from: 'class-transformer', - decorate_b_arguments: '[]', - decorate_b_name: 'Type', - decorate_b_namedImport: true, - }); - expect(result.decorate).toBeInstanceOf(Array); - expect(result.decorate).toHaveLength(2); + it('create config decorate from object', () => { + const result = createConfig({ + decorate_a_type: 'CreateOneUserArgs', + decorate_a_field: 'data', + decorate_a_name: 'ValidateNested', + decorate_a_from: 'class-validator', + decorate_a_arguments: '[]', + decorate_b_type: 'CreateOneUserArgs', + decorate_b_field: 'data', + decorate_b_from: 'class-transformer', + decorate_b_arguments: '[]', + decorate_b_name: 'Type', + decorate_b_namedImport: true, }); + expect(result.decorate).toBeInstanceOf(Array); + expect(result.decorate).toHaveLength(2); + }); - it('tsConfigFilePath value', () => { - const result = createConfig({ - tsConfigFilePath: 'x.json', - }); - - expect(result.tsConfigFilePath).toEqual('x.json'); + it('tsConfigFilePath value', () => { + const result = createConfig({ + tsConfigFilePath: 'x.json', }); - it('tsConfigFilePath default', () => { - const result = createConfig({}); + expect(result.tsConfigFilePath).toEqual('x.json'); + }); - expect(result.tsConfigFilePath).toEqual('tsconfig.json'); - }); + it('tsConfigFilePath default', () => { + const result = createConfig({}); + + expect(result.tsConfigFilePath).toEqual('tsconfig.json'); + }); }); diff --git a/src/helpers/create-config.ts b/src/helpers/create-config.ts index 295b0473..f4066470 100644 --- a/src/helpers/create-config.ts +++ b/src/helpers/create-config.ts @@ -11,157 +11,153 @@ import { ImportNameSpec, ObjectSetting } from '../types'; type ConfigFieldSetting = Partial>; type DecorateElement = { - isMatchField: (s: string) => boolean; - isMatchType: (s: string) => boolean; - from: string; - name: string; - arguments?: string[]; - namedImport: boolean; - defaultImport?: string | true; - namespaceImport?: string; + isMatchField: (s: string) => boolean; + isMatchType: (s: string) => boolean; + from: string; + name: string; + arguments?: string[]; + namedImport: boolean; + defaultImport?: string | true; + namespaceImport?: string; }; export function createConfig(data: Record) { - const config = merge({}, unflatten(data, { delimiter: '_' })) as Record< - string, - unknown - >; - const $warnings: string[] = []; - - const configOutputFilePattern = String( - config.outputFilePattern || `{model}/{name}.{type}.ts`, + const config = merge({}, unflatten(data, { delimiter: '_' })) as Record< + string, + unknown + >; + const $warnings: string[] = []; + + const configOutputFilePattern = String( + config.outputFilePattern || `{model}/{name}.{type}.ts`, + ); + + // eslint-disable-next-line @typescript-eslint/no-unsafe-call + let outputFilePattern = filenamify(configOutputFilePattern, { + replacement: '/', + }) + .replace(/\.\./g, '/') + .replace(/\/+/g, '/'); + outputFilePattern = trim(outputFilePattern, '/'); + + if (outputFilePattern !== configOutputFilePattern) { + $warnings.push( + `Due to invalid filepath 'outputFilePattern' changed to '${outputFilePattern}'`, ); + } - // eslint-disable-next-line @typescript-eslint/no-unsafe-call - let outputFilePattern = filenamify(configOutputFilePattern, { - replacement: '/', - }) - .replace(/\.\./g, '/') - .replace(/\/+/g, '/'); - outputFilePattern = trim(outputFilePattern, '/'); - - if (outputFilePattern !== configOutputFilePattern) { - $warnings.push( - `Due to invalid filepath 'outputFilePattern' changed to '${outputFilePattern}'`, - ); + if (config.reExportAll) { + $warnings.push(`Option 'reExportAll' is deprecated, use 'reExport' instead`); + if (toBoolean(config.reExportAll)) { + config.reExport = 'All'; } - - if (config.reExportAll) { - $warnings.push(`Option 'reExportAll' is deprecated, use 'reExport' instead`); - if (toBoolean(config.reExportAll)) { - config.reExport = 'All'; - } - } - - const fields: Record = Object.fromEntries( - Object.entries>( - (config.fields ?? {}) as Record>, - ) - .filter(({ 1: value }) => typeof value === 'object') - .map(([name, value]) => { - const fieldSetting: ConfigFieldSetting = { - arguments: [], - output: toBoolean(value.output), - input: toBoolean(value.input), - model: toBoolean(value.model), - from: value.from, - defaultImport: toBoolean(value.defaultImport) - ? true - : value.defaultImport, - namespaceImport: value.namespaceImport, - }; - return [name, fieldSetting]; - }), - ); - - const decorate: DecorateElement[] = []; - const configDecorate: (Record | undefined)[] = Object.values( - (config.decorate as any) || {}, + } + + const fields: Record = Object.fromEntries( + Object.entries>( + (config.fields ?? {}) as Record>, + ) + .filter(({ 1: value }) => typeof value === 'object') + .map(([name, value]) => { + const fieldSetting: ConfigFieldSetting = { + arguments: [], + output: toBoolean(value.output), + input: toBoolean(value.input), + model: toBoolean(value.model), + from: value.from, + defaultImport: toBoolean(value.defaultImport) ? true : value.defaultImport, + namespaceImport: value.namespaceImport, + }; + return [name, fieldSetting]; + }), + ); + + const decorate: DecorateElement[] = []; + const configDecorate: (Record | undefined)[] = Object.values( + (config.decorate as any) || {}, + ); + + for (const element of configDecorate) { + if (!element) continue; + ok( + element.from && element.name, + `Missed 'from' or 'name' part in configuration for decorate`, ); - - for (const element of configDecorate) { - if (!element) continue; - ok( - element.from && element.name, - `Missed 'from' or 'name' part in configuration for decorate`, - ); - decorate.push({ - isMatchField: outmatch(element.field, { separator: false }), - isMatchType: outmatch(element.type, { separator: false }), - from: element.from, - name: element.name, - namedImport: toBoolean(element.namedImport), - defaultImport: toBoolean(element.defaultImport) - ? true - : element.defaultImport, - namespaceImport: element.namespaceImport, - arguments: element.arguments ? JSON5.parse(element.arguments) : undefined, - }); - } - - return { - outputFilePattern, - tsConfigFilePath: createTsConfigFilePathValue(config.tsConfigFilePath), - combineScalarFilters: toBoolean(config.combineScalarFilters), - noAtomicOperations: toBoolean(config.noAtomicOperations), - reExport: (ReExport[String(config.reExport)] || ReExport.None) as ReExport, - emitSingle: toBoolean(config.emitSingle), - emitCompiled: toBoolean(config.emitCompiled), - $warnings, - fields, - purgeOutput: toBoolean(config.purgeOutput), - useInputType: createUseInputType(config.useInputType as any), - noTypeId: toBoolean(config.noTypeId), - requireSingleFieldsInWhereUniqueInput: toBoolean( - config.requireSingleFieldsInWhereUniqueInput, - ), - graphqlScalars: (config.graphqlScalars || {}) as Record< - string, - ImportNameSpec | undefined - >, - decorate, - }; + decorate.push({ + isMatchField: outmatch(element.field, { separator: false }), + isMatchType: outmatch(element.type, { separator: false }), + from: element.from, + name: element.name, + namedImport: toBoolean(element.namedImport), + defaultImport: toBoolean(element.defaultImport) ? true : element.defaultImport, + namespaceImport: element.namespaceImport, + arguments: element.arguments ? JSON5.parse(element.arguments) : undefined, + }); + } + + return { + outputFilePattern, + tsConfigFilePath: createTsConfigFilePathValue(config.tsConfigFilePath), + combineScalarFilters: toBoolean(config.combineScalarFilters), + noAtomicOperations: toBoolean(config.noAtomicOperations), + reExport: (ReExport[String(config.reExport)] || ReExport.None) as ReExport, + emitSingle: toBoolean(config.emitSingle), + emitCompiled: toBoolean(config.emitCompiled), + $warnings, + fields, + purgeOutput: toBoolean(config.purgeOutput), + useInputType: createUseInputType(config.useInputType as any), + noTypeId: toBoolean(config.noTypeId), + requireSingleFieldsInWhereUniqueInput: toBoolean( + config.requireSingleFieldsInWhereUniqueInput, + ), + graphqlScalars: (config.graphqlScalars || {}) as Record< + string, + ImportNameSpec | undefined + >, + decorate, + }; } type ConfigInputItem = { - typeName: string; - ALL?: string; - [index: string]: string | undefined; + typeName: string; + ALL?: string; + [index: string]: string | undefined; }; const tsConfigFileExists = memoize((filePath: string) => { - return existsSync(filePath); + return existsSync(filePath); }); function createTsConfigFilePathValue(value: unknown): string | undefined { - if (typeof value === 'string') return value; - if (tsConfigFileExists('tsconfig.json')) return 'tsconfig.json'; + if (typeof value === 'string') return value; + if (tsConfigFileExists('tsconfig.json')) return 'tsconfig.json'; } function createUseInputType(data?: Record) { - if (!data) { - return []; + if (!data) { + return []; + } + const result: ConfigInputItem[] = []; + for (const [typeName, useInputs] of Object.entries(data)) { + const entry: ConfigInputItem = { + typeName, + ALL: undefined, + }; + if (useInputs.ALL) { + entry.ALL = useInputs.ALL; + delete useInputs.ALL; } - const result: ConfigInputItem[] = []; - for (const [typeName, useInputs] of Object.entries(data)) { - const entry: ConfigInputItem = { - typeName, - ALL: undefined, - }; - if (useInputs.ALL) { - entry.ALL = useInputs.ALL; - delete useInputs.ALL; - } - - for (const [propertyName, pattern] of Object.entries(useInputs)) { - entry[propertyName] = pattern; - } - result.push(entry); + for (const [propertyName, pattern] of Object.entries(useInputs)) { + entry[propertyName] = pattern; } - return result; + + result.push(entry); + } + return result; } function toBoolean(value: unknown) { - return ['true', '1', 'on'].includes(String(value)); + return ['true', '1', 'on'].includes(String(value)); } diff --git a/src/helpers/factory-get-source-file.ts b/src/helpers/factory-get-source-file.ts index d626519c..00aead60 100644 --- a/src/helpers/factory-get-source-file.ts +++ b/src/helpers/factory-get-source-file.ts @@ -4,27 +4,27 @@ import { Project } from 'ts-morph'; import { generateFileName } from './generate-file-name'; export function factoryGetSourceFile(args: { - output: string; - outputFilePattern: string; - project: Project; - getModelName(name: string): string | undefined; - eventEmitter: AwaitEventEmitter; + output: string; + outputFilePattern: string; + project: Project; + getModelName(name: string): string | undefined; + eventEmitter: AwaitEventEmitter; }) { - const { outputFilePattern, output, getModelName, project } = args; + const { outputFilePattern, output, getModelName, project } = args; - return function getSourceFile(args: { type: string; name: string }) { - const { name, type } = args; - let filePath = generateFileName({ - getModelName, - name, - type, - template: outputFilePattern, - }); - filePath = `${output}/${filePath}`; + return function getSourceFile(args: { type: string; name: string }) { + const { name, type } = args; + let filePath = generateFileName({ + getModelName, + name, + type, + template: outputFilePattern, + }); + filePath = `${output}/${filePath}`; - return ( - project.getSourceFile(filePath) || - project.createSourceFile(filePath, undefined, { overwrite: true }) - ); - }; + return ( + project.getSourceFile(filePath) || + project.createSourceFile(filePath, undefined, { overwrite: true }) + ); + }; } diff --git a/src/helpers/file-type-by-location.ts b/src/helpers/file-type-by-location.ts index 327f35f6..3f952d14 100644 --- a/src/helpers/file-type-by-location.ts +++ b/src/helpers/file-type-by-location.ts @@ -1,13 +1,13 @@ import { FieldLocation } from '../types'; export function fileTypeByLocation(fieldLocation: FieldLocation) { - switch (fieldLocation) { - case 'inputObjectTypes': - return 'input'; - case 'outputObjectTypes': - return 'output'; - case 'enumTypes': - return 'enum'; - } - return 'object'; + switch (fieldLocation) { + case 'inputObjectTypes': + return 'input'; + case 'outputObjectTypes': + return 'output'; + case 'enumTypes': + return 'enum'; + } + return 'object'; } diff --git a/src/helpers/generate-file-name.spec.ts b/src/helpers/generate-file-name.spec.ts index d2b80230..258c5dd4 100644 --- a/src/helpers/generate-file-name.spec.ts +++ b/src/helpers/generate-file-name.spec.ts @@ -3,33 +3,33 @@ import expect from 'expect'; import { generateFileName } from './generate-file-name'; describe('generateFileName', () => { - it('plural type model', () => { - const result = generateFileName({ - getModelName: () => 'User', - name: 'User', - type: 'model', - template: '{model}/{plural.type}/{name}.{type}.ts', - }); - expect(result).toEqual('user/models/user.model.ts'); + it('plural type model', () => { + const result = generateFileName({ + getModelName: () => 'User', + name: 'User', + type: 'model', + template: '{model}/{plural.type}/{name}.{type}.ts', }); + expect(result).toEqual('user/models/user.model.ts'); + }); - it('plural type input', () => { - const result = generateFileName({ - getModelName: () => 'User', - name: 'UserWhereInput', - type: 'input', - template: '{model}/{plural.type}/{name}.{type}.ts', - }); - expect(result).toEqual('user/inputs/user-where.input.ts'); + it('plural type input', () => { + const result = generateFileName({ + getModelName: () => 'User', + name: 'UserWhereInput', + type: 'input', + template: '{model}/{plural.type}/{name}.{type}.ts', }); + expect(result).toEqual('user/inputs/user-where.input.ts'); + }); - it('plural type enum', () => { - const result = generateFileName({ - getModelName: () => 'prisma', - name: 'Role', - type: 'enum', - template: '{model}/{plural.type}/{name}.{type}.ts', - }); - expect(result).toEqual('prisma/enums/role.enum.ts'); + it('plural type enum', () => { + const result = generateFileName({ + getModelName: () => 'prisma', + name: 'Role', + type: 'enum', + template: '{model}/{plural.type}/{name}.{type}.ts', }); + expect(result).toEqual('prisma/enums/role.enum.ts'); + }); }); diff --git a/src/helpers/generate-file-name.ts b/src/helpers/generate-file-name.ts index 45084a97..a1f5f92b 100644 --- a/src/helpers/generate-file-name.ts +++ b/src/helpers/generate-file-name.ts @@ -3,33 +3,33 @@ import pluralize from 'pluralize'; import pupa from 'pupa'; export function generateFileName(args: { - type: string; - name: string; - getModelName(name: string): string | undefined; - template: string; + type: string; + name: string; + getModelName(name: string): string | undefined; + template: string; }) { - const { template, type, name, getModelName } = args; + const { template, type, name, getModelName } = args; - return pupa(template, { - type, - get model() { - const result = getModelName(name) || 'prisma'; - return kebabCase(result); - }, - get name() { - let result = kebabCase(name); - for (const suffix of ['input', 'args', 'enum']) { - const ending = `-${suffix}`; - if (type === suffix && result.endsWith(ending)) { - result = result.slice(0, -ending.length); - } - } - return result; - }, - plural: { - get type() { - return pluralize(type); - }, - }, - }); + return pupa(template, { + type, + get model() { + const result = getModelName(name) || 'prisma'; + return kebabCase(result); + }, + get name() { + let result = kebabCase(name); + for (const suffix of ['input', 'args', 'enum']) { + const ending = `-${suffix}`; + if (type === suffix && result.endsWith(ending)) { + result = result.slice(0, -ending.length); + } + } + return result; + }, + plural: { + get type() { + return pluralize(type); + }, + }, + }); } diff --git a/src/helpers/get-graphql-import.ts b/src/helpers/get-graphql-import.ts index 9c3deee8..fa3d8b11 100644 --- a/src/helpers/get-graphql-import.ts +++ b/src/helpers/get-graphql-import.ts @@ -5,69 +5,69 @@ import { fileTypeByLocation } from './file-type-by-location'; import { relativePath } from './relative-path'; export function getGraphqlImport(args: { - sourceFile: SourceFile; - typeName: string; - location: FieldLocation; - isId?: boolean; - fileType?: string; - noTypeId?: boolean; - getSourceFile(args: { type: string; name: string }): SourceFile; - config: GeneratorConfiguration; + sourceFile: SourceFile; + typeName: string; + location: FieldLocation; + isId?: boolean; + fileType?: string; + noTypeId?: boolean; + getSourceFile(args: { type: string; name: string }): SourceFile; + config: GeneratorConfiguration; }): { name: string; specifier?: string } { - const { - config, - fileType, - location, - typeName, - isId, - noTypeId, - sourceFile, - getSourceFile, - } = args; + const { + config, + fileType, + location, + typeName, + isId, + noTypeId, + sourceFile, + getSourceFile, + } = args; - if (location === 'scalar') { - if (isId && !noTypeId) { - return { name: 'ID', specifier: '@nestjs/graphql' }; - } - - const graphqlType = config.graphqlScalars[typeName]; - if (graphqlType) { - return { name: graphqlType.name, specifier: graphqlType.specifier }; - } - - switch (typeName) { - case 'Float': - case 'Int': - return { name: typeName, specifier: '@nestjs/graphql' }; - case 'DateTime': - return { name: 'Date', specifier: undefined }; - case 'true': - case 'Boolean': - return { name: 'Boolean', specifier: undefined }; - case 'Decimal': - return { - name: 'GraphQLDecimal', - specifier: 'prisma-graphql-type-decimal', - }; - case 'Json': - return { name: 'GraphQLJSON', specifier: 'graphql-type-json' }; - } + if (location === 'scalar') { + if (isId && !noTypeId) { + return { name: 'ID', specifier: '@nestjs/graphql' }; + } - return { name: 'String', specifier: undefined }; + const graphqlType = config.graphqlScalars[typeName]; + if (graphqlType) { + return { name: graphqlType.name, specifier: graphqlType.specifier }; } - let sourceFileType = fileTypeByLocation(location); - if (sourceFileType === 'output' && fileType === 'model') { - sourceFileType = 'model'; + switch (typeName) { + case 'Float': + case 'Int': + return { name: typeName, specifier: '@nestjs/graphql' }; + case 'DateTime': + return { name: 'Date', specifier: undefined }; + case 'true': + case 'Boolean': + return { name: 'Boolean', specifier: undefined }; + case 'Decimal': + return { + name: 'GraphQLDecimal', + specifier: 'prisma-graphql-type-decimal', + }; + case 'Json': + return { name: 'GraphQLJSON', specifier: 'graphql-type-json' }; } - const specifier = relativePath( - sourceFile.getFilePath(), - getSourceFile({ - type: sourceFileType, - name: typeName, - }).getFilePath(), - ); + return { name: 'String', specifier: undefined }; + } + + let sourceFileType = fileTypeByLocation(location); + if (sourceFileType === 'output' && fileType === 'model') { + sourceFileType = 'model'; + } + + const specifier = relativePath( + sourceFile.getFilePath(), + getSourceFile({ + type: sourceFileType, + name: typeName, + }).getFilePath(), + ); - return { name: typeName, specifier }; + return { name: typeName, specifier }; } diff --git a/src/helpers/get-graphql-input-type.ts b/src/helpers/get-graphql-input-type.ts index efcd0aad..19ffc907 100644 --- a/src/helpers/get-graphql-input-type.ts +++ b/src/helpers/get-graphql-input-type.ts @@ -7,63 +7,63 @@ import { DMMF } from '../types'; * Find input type for graphql field decorator. */ export function getGraphqlInputType( - inputTypes: DMMF.SchemaArgInputType[], - pattern?: string, + inputTypes: DMMF.SchemaArgInputType[], + pattern?: string, ) { - let result: DMMF.SchemaArgInputType | undefined; + let result: DMMF.SchemaArgInputType | undefined; - inputTypes = inputTypes.filter(t => !['null', 'Null'].includes(String(t.type))); - inputTypes = uniqWith(inputTypes, isEqual); + inputTypes = inputTypes.filter(t => !['null', 'Null'].includes(String(t.type))); + inputTypes = uniqWith(inputTypes, isEqual); - if (inputTypes.length === 1) { - return inputTypes[0]; - } + if (inputTypes.length === 1) { + return inputTypes[0]; + } - const countTypes = countBy(inputTypes, x => x.location); - const isOneType = Object.keys(countTypes).length === 1; + const countTypes = countBy(inputTypes, x => x.location); + const isOneType = Object.keys(countTypes).length === 1; - if (isOneType) { - result = inputTypes.find(x => x.isList); - if (result) { - return result; - } + if (isOneType) { + result = inputTypes.find(x => x.isList); + if (result) { + return result; } + } - if (pattern) { - if (pattern.startsWith('matcher:') || pattern.startsWith('match:')) { - const { 1: patternValue } = pattern.split(':', 2); - const isMatch = outmatch(patternValue, { separator: false }); - result = inputTypes.find(x => isMatch(String(x.type))); - if (result) { - return result; - } - } - result = inputTypes.find(x => String(x.type).includes(pattern)); - if (result) { - return result; - } + if (pattern) { + if (pattern.startsWith('matcher:') || pattern.startsWith('match:')) { + const { 1: patternValue } = pattern.split(':', 2); + const isMatch = outmatch(patternValue, { separator: false }); + result = inputTypes.find(x => isMatch(String(x.type))); + if (result) { + return result; + } } - - result = inputTypes.find(x => x.location === 'inputObjectTypes'); + result = inputTypes.find(x => String(x.type).includes(pattern)); if (result) { - return result; + return result; } + } + + result = inputTypes.find(x => x.location === 'inputObjectTypes'); + if (result) { + return result; + } - if ( - countTypes.enumTypes && - countTypes.scalar && - inputTypes.some(x => x.type === 'Json' && x.location === 'scalar') - ) { - result = inputTypes.find(x => x.type === 'Json' && x.location === 'scalar'); - if (result) { - return result; - } + if ( + countTypes.enumTypes && + countTypes.scalar && + inputTypes.some(x => x.type === 'Json' && x.location === 'scalar') + ) { + result = inputTypes.find(x => x.type === 'Json' && x.location === 'scalar'); + if (result) { + return result; } + } - throw new TypeError( - // eslint-disable-next-line @typescript-eslint/restrict-template-expressions - `Cannot get matching input type from ${ - inputTypes.map(x => x.type).join(', ') || 'zero length inputTypes' - }`, - ); + throw new TypeError( + // eslint-disable-next-line @typescript-eslint/restrict-template-expressions + `Cannot get matching input type from ${ + inputTypes.map(x => x.type).join(', ') || 'zero length inputTypes' + }`, + ); } diff --git a/src/helpers/get-model-name.ts b/src/helpers/get-model-name.ts index 4c6f656a..15c15cee 100644 --- a/src/helpers/get-model-name.ts +++ b/src/helpers/get-model-name.ts @@ -1,129 +1,129 @@ import { first, memoize } from 'lodash'; export function createGetModelName(modelNames: string[]) { - return memoize(tryGetName); + return memoize(tryGetName); - function tryGetName(name: string): string | undefined { - return getModelName({ modelNames, name }); - } + function tryGetName(name: string): string | undefined { + return getModelName({ modelNames, name }); + } } function getModelName(args: { - name: string; - modelNames: string[]; + name: string; + modelNames: string[]; }): string | undefined { - const { name, modelNames } = args; - for (const keyword of splitKeywords) { - const [test] = name.split(keyword, 1); - if (modelNames.includes(test)) { - return test; - } + const { name, modelNames } = args; + for (const keyword of splitKeywords) { + const [test] = name.split(keyword, 1); + if (modelNames.includes(test)) { + return test; } - for (const keyword of endsWithKeywords) { - const [test] = name.split(keyword).slice(-1); - if (modelNames.includes(test)) { - return test; - } + } + for (const keyword of endsWithKeywords) { + const [test] = name.split(keyword).slice(-1); + if (modelNames.includes(test)) { + return test; } - for (const [start, end] of middleKeywords) { - let test = name.slice(start.length).slice(0, -end.length); - if (modelNames.includes(test)) { - return test; - } - test = name.slice(0, -(start + end).length); - if (modelNames.includes(test)) { - return test; - } + } + for (const [start, end] of middleKeywords) { + let test = name.slice(start.length).slice(0, -end.length); + if (modelNames.includes(test)) { + return test; } - - // test for {Model}{UniqueName}CompoundUniqueInput - if (name.slice(-19) === 'CompoundUniqueInput') { - const test = name.slice(0, -19); - const models = modelNames - .filter(x => test.startsWith(x)) - .sort((a, b) => b.length - a.length); - return first(models); + test = name.slice(0, -(start + end).length); + if (modelNames.includes(test)) { + return test; } + } + + // test for {Model}{UniqueName}CompoundUniqueInput + if (name.slice(-19) === 'CompoundUniqueInput') { + const test = name.slice(0, -19); + const models = modelNames + .filter(x => test.startsWith(x)) + .sort((a, b) => b.length - a.length); + return first(models); + } - // test for {Model}Count - if (name.slice(-5) === 'Count') { - const test = name.slice(0, -5); - if (modelNames.includes(test)) { - return test; - } + // test for {Model}Count + if (name.slice(-5) === 'Count') { + const test = name.slice(0, -5); + if (modelNames.includes(test)) { + return test; } - // eslint-disable-next-line consistent-return, unicorn/no-useless-undefined - return undefined; + } + // eslint-disable-next-line consistent-return, unicorn/no-useless-undefined + return undefined; } const splitKeywords = [ - 'CreateInput', - 'CreateMany', - 'CreateNested', - 'CreateOneWithout', - 'CreateOrConnect', - 'CreateWithout', - 'DistinctField', - 'Filter', - 'ManyWithout', - 'OrderByInput', - 'RelationFilter', - 'ListRelationFilter', - 'ScalarWhereInput', - 'UpdateInput', - 'UpdateMany', - 'UpdateOneRequiredWithout', - 'UpdateOneWithout', - 'UpdateWith', - 'UpsertWith', - 'UpsertWithout', - 'WhereInput', - 'WhereUniqueInput', - 'AvgAggregate', - 'SumAggregate', - 'MinAggregate', - 'MaxAggregate', - 'CountAggregate', - 'ScalarField', - 'GroupBy', - 'OrderBy', - 'UncheckedUpdate', - 'UncheckedCreate', - 'ScalarWhere', - 'CountOutputType', - 'CountOrderBy', - 'SumOrderBy', - 'MinOrderBy', - 'MaxOrderBy', - 'AvgOrderBy', + 'CreateInput', + 'CreateMany', + 'CreateNested', + 'CreateOneWithout', + 'CreateOrConnect', + 'CreateWithout', + 'DistinctField', + 'Filter', + 'ManyWithout', + 'OrderByInput', + 'RelationFilter', + 'ListRelationFilter', + 'ScalarWhereInput', + 'UpdateInput', + 'UpdateMany', + 'UpdateOneRequiredWithout', + 'UpdateOneWithout', + 'UpdateWith', + 'UpsertWith', + 'UpsertWithout', + 'WhereInput', + 'WhereUniqueInput', + 'AvgAggregate', + 'SumAggregate', + 'MinAggregate', + 'MaxAggregate', + 'CountAggregate', + 'ScalarField', + 'GroupBy', + 'OrderBy', + 'UncheckedUpdate', + 'UncheckedCreate', + 'ScalarWhere', + 'CountOutputType', + 'CountOrderBy', + 'SumOrderBy', + 'MinOrderBy', + 'MaxOrderBy', + 'AvgOrderBy', ].sort((a, b) => b.length - a.length); const endsWithKeywords = [ - 'Aggregate', - 'GroupBy', - 'CreateOne', - 'DeleteMany', - 'DeleteOne', - 'FindMany', - 'FindOne', - 'FindUnique', - 'UpdateMany', - 'UpdateOne', - 'UpsertOne', + 'Aggregate', + 'GroupBy', + 'CreateOne', + 'DeleteMany', + 'DeleteOne', + 'FindMany', + 'FindOne', + 'FindUnique', + 'UpdateMany', + 'UpdateOne', + 'UpsertOne', ]; const middleKeywords = [ - ['Aggregate', 'Args'], - ['CreateOne', 'Args'], - ['DeleteMany', 'Args'], - ['DeleteOne', 'Args'], - ['FindMany', 'Args'], - ['FindFirst', 'Args'], - ['FindOne', 'Args'], - ['FindUnique', 'Args'], - ['UpdateMany', 'Args'], - ['UpdateOne', 'Args'], - ['UpsertOne', 'Args'], - ['GroupBy', 'Args'], - ['OrderBy', 'Args'], + ['Aggregate', 'Args'], + ['CreateOne', 'Args'], + ['DeleteMany', 'Args'], + ['DeleteOne', 'Args'], + ['FindMany', 'Args'], + ['FindFirst', 'Args'], + ['FindOne', 'Args'], + ['FindUnique', 'Args'], + ['UpdateMany', 'Args'], + ['UpdateOne', 'Args'], + ['UpsertOne', 'Args'], + ['GroupBy', 'Args'], + ['OrderBy', 'Args'], ]; diff --git a/src/helpers/get-output-type-name.ts b/src/helpers/get-output-type-name.ts index b8ea6313..3ee30a79 100644 --- a/src/helpers/get-output-type-name.ts +++ b/src/helpers/get-output-type-name.ts @@ -1,3 +1,3 @@ export function getOutputTypeName(name: string) { - return name.replace(/(?:OutputType|Output)$/, ''); + return name.replace(/(?:OutputType|Output)$/, ''); } diff --git a/src/helpers/get-property-type.ts b/src/helpers/get-property-type.ts index 0ff4f602..84f7a5ae 100644 --- a/src/helpers/get-property-type.ts +++ b/src/helpers/get-property-type.ts @@ -4,40 +4,40 @@ import { FieldLocation } from '../types'; * Returns typescript property type. */ export function getPropertyType(args: { - type: string; - location: FieldLocation; + type: string; + location: FieldLocation; }): string[] { - const { type, location } = args; - switch (type) { - case 'Float': - case 'Int': - return ['number']; - case 'String': - return ['string']; - case 'Boolean': - return ['boolean']; - case 'DateTime': - return ['Date', 'string']; - case 'Decimal': - return ['Decimal']; - case 'Json': - return ['any']; - case 'Null': - return ['null']; - case 'Bytes': - return ['Buffer']; - case 'BigInt': - return ['bigint', 'number']; - } - if (['inputObjectTypes', 'outputObjectTypes'].includes(location)) { - return [type]; - } - if (location === 'enumTypes') { - return [`keyof typeof ${type}`]; - } - if (location === 'scalar') { - return [type]; - } + const { type, location } = args; + switch (type) { + case 'Float': + case 'Int': + return ['number']; + case 'String': + return ['string']; + case 'Boolean': + return ['boolean']; + case 'DateTime': + return ['Date', 'string']; + case 'Decimal': + return ['Decimal']; + case 'Json': + return ['any']; + case 'Null': + return ['null']; + case 'Bytes': + return ['Buffer']; + case 'BigInt': + return ['bigint', 'number']; + } + if (['inputObjectTypes', 'outputObjectTypes'].includes(location)) { + return [type]; + } + if (location === 'enumTypes') { + return [`keyof typeof ${type}`]; + } + if (location === 'scalar') { + return [type]; + } - return ['unknown']; + return ['unknown']; } diff --git a/src/helpers/import-declaration-map.ts b/src/helpers/import-declaration-map.ts index 958e1a3f..0fa115c9 100644 --- a/src/helpers/import-declaration-map.ts +++ b/src/helpers/import-declaration-map.ts @@ -1,66 +1,66 @@ import { - ImportDeclarationStructure, - ImportSpecifierStructure, - OptionalKind, - StructureKind, + ImportDeclarationStructure, + ImportSpecifierStructure, + OptionalKind, + StructureKind, } from 'ts-morph'; export class ImportDeclarationMap extends Map< - string, - OptionalKind + string, + OptionalKind > { - add(name: string, moduleSpecifier: string): void; - add(name: string, value: OptionalKind): void; + add(name: string, moduleSpecifier: string): void; + add(name: string, value: OptionalKind): void; - add(name: string, value: OptionalKind | string): void { - if (!this.has(name)) { - const structure: OptionalKind = - typeof value === 'string' - ? { moduleSpecifier: value, namedImports: [{ name }] } - : value; - this.set(name, structure); - } + add(name: string, value: OptionalKind | string): void { + if (!this.has(name)) { + const structure: OptionalKind = + typeof value === 'string' + ? { moduleSpecifier: value, namedImports: [{ name }] } + : value; + this.set(name, structure); } + } - create(args: { - name: string; - from: string; - defaultImport?: string | true; - namespaceImport?: string; - namedImport?: boolean; - }) { - const { from, defaultImport, namespaceImport, namedImport } = args; - let name = args.name; - const value = { - moduleSpecifier: from, - namedImports: [] as OptionalKind[], - defaultImport: undefined as string | undefined, - namespaceImport: undefined as string | undefined, - }; - if (namedImport === true && namespaceImport) { - value.namedImports = [{ name: namespaceImport }]; - name = namespaceImport; - } else if (defaultImport) { - value.defaultImport = defaultImport === true ? name : defaultImport; - name = value.defaultImport; - } else if (namespaceImport) { - value.namespaceImport = namespaceImport; - name = namespaceImport; - } else { - value.namedImports = [{ name }]; - } - this.add(name, value); + create(args: { + name: string; + from: string; + defaultImport?: string | true; + namespaceImport?: string; + namedImport?: boolean; + }) { + const { from, defaultImport, namespaceImport, namedImport } = args; + let name = args.name; + const value = { + moduleSpecifier: from, + namedImports: [] as OptionalKind[], + defaultImport: undefined as string | undefined, + namespaceImport: undefined as string | undefined, + }; + if (namedImport === true && namespaceImport) { + value.namedImports = [{ name: namespaceImport }]; + name = namespaceImport; + } else if (defaultImport) { + value.defaultImport = defaultImport === true ? name : defaultImport; + name = value.defaultImport; + } else if (namespaceImport) { + value.namespaceImport = namespaceImport; + name = namespaceImport; + } else { + value.namedImports = [{ name }]; } + this.add(name, value); + } - *toStatements(): Iterable { - const iterator = this.values(); - let result = iterator.next(); - while (result.value) { - yield { - ...result.value, - kind: StructureKind.ImportDeclaration, - }; - result = iterator.next(); - } + *toStatements(): Iterable { + const iterator = this.values(); + let result = iterator.next(); + while (result.value) { + yield { + ...result.value, + kind: StructureKind.ImportDeclaration, + }; + result = iterator.next(); } + } } diff --git a/src/helpers/object-settings.ts b/src/helpers/object-settings.ts index b1b51ea6..535b023a 100644 --- a/src/helpers/object-settings.ts +++ b/src/helpers/object-settings.ts @@ -6,336 +6,336 @@ import { PlainObject } from 'simplytyped'; import { GeneratorConfiguration } from '../types'; export type ObjectSetting = { - /** - * Act as named import or namespaceImport or defaultImport - */ - name: string; - kind: 'Decorator' | 'Field' | 'FieldType' | 'PropertyType' | 'ObjectType'; - arguments?: string[] | Record; - input: boolean; - output: boolean; - model: boolean; - match?: (test: string) => boolean; - from: string; - namespace?: string; - defaultImport?: string | true; - namespaceImport?: string; - namedImport?: boolean; + /** + * Act as named import or namespaceImport or defaultImport + */ + name: string; + kind: 'Decorator' | 'Field' | 'FieldType' | 'PropertyType' | 'ObjectType'; + arguments?: string[] | Record; + input: boolean; + output: boolean; + model: boolean; + match?: (test: string) => boolean; + from: string; + namespace?: string; + defaultImport?: string | true; + namespaceImport?: string; + namedImport?: boolean; }; interface ObjectSettingsFilterArgs { - name: string; - input?: boolean; - output?: boolean; + name: string; + input?: boolean; + output?: boolean; } export class ObjectSettings extends Array { - shouldHideField({ - name, - input = false, - output = false, - }: ObjectSettingsFilterArgs): boolean { - const hideField = this.find(s => s.name === 'HideField'); - - return Boolean( - (hideField?.input && input) || - (hideField?.output && output) || - hideField?.match?.(name), - ); + shouldHideField({ + name, + input = false, + output = false, + }: ObjectSettingsFilterArgs): boolean { + const hideField = this.find(s => s.name === 'HideField'); + + return Boolean( + (hideField?.input && input) || + (hideField?.output && output) || + hideField?.match?.(name), + ); + } + + getFieldType({ + name, + input, + output, + }: ObjectSettingsFilterArgs): ObjectSetting | undefined { + const fieldType = this.find(s => s.kind === 'FieldType'); + + if (!fieldType) { + return undefined; } - getFieldType({ - name, - input, - output, - }: ObjectSettingsFilterArgs): ObjectSetting | undefined { - const fieldType = this.find(s => s.kind === 'FieldType'); - - if (!fieldType) { - return undefined; - } - - if (fieldType.match) { - // eslint-disable-next-line unicorn/prefer-regexp-test - return fieldType.match(name) ? fieldType : undefined; - } - - if (input && !fieldType.input) { - return undefined; - } + if (fieldType.match) { + // eslint-disable-next-line unicorn/prefer-regexp-test + return fieldType.match(name) ? fieldType : undefined; + } - if (output && !fieldType.output) { - return undefined; - } + if (input && !fieldType.input) { + return undefined; + } - return fieldType; + if (output && !fieldType.output) { + return undefined; } - getPropertyType({ - name, - input, - output, - }: ObjectSettingsFilterArgs): ObjectSetting | undefined { - const propertyType = this.find(s => s.kind === 'PropertyType'); + return fieldType; + } - if (!propertyType) { - return undefined; - } + getPropertyType({ + name, + input, + output, + }: ObjectSettingsFilterArgs): ObjectSetting | undefined { + const propertyType = this.find(s => s.kind === 'PropertyType'); - if (propertyType.match) { - // eslint-disable-next-line unicorn/prefer-regexp-test - return propertyType.match(name) ? propertyType : undefined; - } + if (!propertyType) { + return undefined; + } - if (input && !propertyType.input) { - return undefined; - } + if (propertyType.match) { + // eslint-disable-next-line unicorn/prefer-regexp-test + return propertyType.match(name) ? propertyType : undefined; + } - if (output && !propertyType.output) { - return undefined; - } + if (input && !propertyType.input) { + return undefined; + } - return propertyType; + if (output && !propertyType.output) { + return undefined; } - getObjectTypeArguments(options: Record): string[] { - const objectTypeOptions = merge({}, options); - const resultArguments: any[] = [objectTypeOptions]; - const objectType = this.find(s => s.kind === 'ObjectType'); - if (objectType && isObject(objectType.arguments)) { - const name = (objectType.arguments as PlainObject).name; - merge(objectTypeOptions, omit(objectType.arguments, 'name')); - if (name) { - resultArguments.unshift(name); - } - } - return resultArguments.map(x => JSON5.stringify(x)); + return propertyType; + } + + getObjectTypeArguments(options: Record): string[] { + const objectTypeOptions = merge({}, options); + const resultArguments: any[] = [objectTypeOptions]; + const objectType = this.find(s => s.kind === 'ObjectType'); + if (objectType && isObject(objectType.arguments)) { + const name = (objectType.arguments as PlainObject).name; + merge(objectTypeOptions, omit(objectType.arguments, 'name')); + if (name) { + resultArguments.unshift(name); + } } + return resultArguments.map(x => JSON5.stringify(x)); + } - fieldArguments(): Record | undefined { - const item = this.find(item => item.kind === 'Field'); - if (item) { - return item.arguments as Record; - } + fieldArguments(): Record | undefined { + const item = this.find(item => item.kind === 'Field'); + if (item) { + return item.arguments as Record; } + } } export function createObjectSettings(args: { - text: string; - config: GeneratorConfiguration; + text: string; + config: GeneratorConfiguration; }) { - const { config, text } = args; - const result = new ObjectSettings(); - const textLines = text.split('\n'); - const documentationLines: string[] = []; - - let fieldElement = result.find(item => item.kind === 'Field'); - if (!fieldElement) { - fieldElement = { - name: '', - kind: 'Field', - arguments: {}, - } as ObjectSetting; + const { config, text } = args; + const result = new ObjectSettings(); + const textLines = text.split('\n'); + const documentationLines: string[] = []; + + let fieldElement = result.find(item => item.kind === 'Field'); + if (!fieldElement) { + fieldElement = { + name: '', + kind: 'Field', + arguments: {}, + } as ObjectSetting; + } + + for (const line of textLines) { + const match = /^@(?\w+(\.(\w+))?)\((?.*)\)/.exec(line); + const { element, documentLine } = createSettingElement({ + line, + config, + fieldElement, + match, + }); + + if (element) { + result.push(element); } - for (const line of textLines) { - const match = /^@(?\w+(\.(\w+))?)\((?.*)\)/.exec(line); - const { element, documentLine } = createSettingElement({ - line, - config, - fieldElement, - match, - }); - - if (element) { - result.push(element); - } - - if (documentLine) { - documentationLines.push(line); - } + if (documentLine) { + documentationLines.push(line); } + } - return { - settings: result, - documentation: documentationLines.filter(Boolean).join('\n') || undefined, - }; + return { + settings: result, + documentation: documentationLines.filter(Boolean).join('\n') || undefined, + }; } function createSettingElement({ - line, - config, - fieldElement, - match, + line, + config, + fieldElement, + match, }: { - line: string; - config: GeneratorConfiguration; - fieldElement: ObjectSetting; - match: RegExpExecArray | null; + line: string; + config: GeneratorConfiguration; + fieldElement: ObjectSetting; + match: RegExpExecArray | null; }) { - const result = { - documentLine: '', - element: undefined as ObjectSetting | undefined, - }; - if (line.startsWith('@deprecated')) { - fieldElement.arguments!['deprecationReason'] = trim(line.slice(11)); + const result = { + documentLine: '', + element: undefined as ObjectSetting | undefined, + }; + if (line.startsWith('@deprecated')) { + fieldElement.arguments!['deprecationReason'] = trim(line.slice(11)); - result.element = fieldElement; + result.element = fieldElement; - return result; - } + return result; + } - const name = match?.groups?.name; + const name = match?.groups?.name; - if (!(match && name)) { - result.documentLine = line; - return result; - } + if (!(match && name)) { + result.documentLine = line; + return result; + } - const element: ObjectSetting = { - kind: 'Decorator', - name: '', - arguments: [], - input: false, - output: false, - model: false, - from: '', - }; + const element: ObjectSetting = { + kind: 'Decorator', + name: '', + arguments: [], + input: false, + output: false, + model: false, + from: '', + }; - result.element = element; + result.element = element; - if (name === 'TypeGraphQL.omit' || name === 'HideField') { - Object.assign(element, hideFieldDecorator(match)); + if (name === 'TypeGraphQL.omit' || name === 'HideField') { + Object.assign(element, hideFieldDecorator(match)); - return result; - } + return result; + } - if (['FieldType', 'PropertyType'].includes(name) && match.groups?.args) { - const options = customType(match.groups.args); - merge(element, options.namespace && config.fields[options.namespace], options, { - kind: name, - }); - return result; - } + if (['FieldType', 'PropertyType'].includes(name) && match.groups?.args) { + const options = customType(match.groups.args); + merge(element, options.namespace && config.fields[options.namespace], options, { + kind: name, + }); + return result; + } - if (name === 'ObjectType' && match.groups?.args) { - element.kind = 'ObjectType'; - const options = customType(match.groups.args) as Record; - if (typeof options[0] === 'string' && options[0]) { - options.name = options[0]; - } - if (isObject(options[1])) { - merge(options, options[1]); - } - element.arguments = { - name: options.name, - isAbstract: options.isAbstract, - }; - - return result; + if (name === 'ObjectType' && match.groups?.args) { + element.kind = 'ObjectType'; + const options = customType(match.groups.args) as Record; + if (typeof options[0] === 'string' && options[0]) { + options.name = options[0]; } - - if (name === 'Directive' && match.groups?.args) { - const options = customType(match.groups.args); - merge(element, { model: true, from: '@nestjs/graphql' }, options, { - name, - namespace: false, - kind: 'Decorator', - arguments: Array.isArray(options.arguments) - ? options.arguments.map(s => JSON5.stringify(s)) - : options.arguments, - }); - - return result; + if (isObject(options[1])) { + merge(options, options[1]); } - - const namespace = getNamespace(name); - element.namespaceImport = namespace; - const options = { - name, - arguments: (match.groups?.args || '') - .split(',') - .map(s => trim(s)) - .filter(Boolean), + element.arguments = { + name: options.name, + isAbstract: options.isAbstract, }; - merge(element, namespace && config.fields[namespace], options); return result; + } + + if (name === 'Directive' && match.groups?.args) { + const options = customType(match.groups.args); + merge(element, { model: true, from: '@nestjs/graphql' }, options, { + name, + namespace: false, + kind: 'Decorator', + arguments: Array.isArray(options.arguments) + ? options.arguments.map(s => JSON5.stringify(s)) + : options.arguments, + }); + + return result; + } + + const namespace = getNamespace(name); + element.namespaceImport = namespace; + const options = { + name, + arguments: (match.groups?.args || '') + .split(',') + .map(s => trim(s)) + .filter(Boolean), + }; + merge(element, namespace && config.fields[namespace], options); + + return result; } function customType(args: string) { - const result: Partial = {}; - let options = parseArgs(args); - if (typeof options === 'string') { - options = { name: options }; - } - Object.assign(result, options); - const namespace = getNamespace(options.name); - result.namespace = namespace; - if ((options as { name: string | undefined }).name?.includes('.')) { - result.namespaceImport = namespace; - } - - if (typeof options.match === 'string' || Array.isArray(options.match)) { - result.match = outmatch(options.match, { separator: false }); - } - - return result; + const result: Partial = {}; + let options = parseArgs(args); + if (typeof options === 'string') { + options = { name: options }; + } + Object.assign(result, options); + const namespace = getNamespace(options.name); + result.namespace = namespace; + if ((options as { name: string | undefined }).name?.includes('.')) { + result.namespaceImport = namespace; + } + + if (typeof options.match === 'string' || Array.isArray(options.match)) { + result.match = outmatch(options.match, { separator: false }); + } + + return result; } function hideFieldDecorator(match: RegExpExecArray) { - const result: Partial = { - name: 'HideField', - arguments: [], - from: '@nestjs/graphql', - defaultImport: undefined, - namespaceImport: undefined, - match: undefined, - }; - if (!match.groups?.args) { - result.output = true; - return result; - } + const result: Partial = { + name: 'HideField', + arguments: [], + from: '@nestjs/graphql', + defaultImport: undefined, + namespaceImport: undefined, + match: undefined, + }; + if (!match.groups?.args) { + result.output = true; + return result; + } - if (match.groups.args.includes('{') && match.groups.args.includes('}')) { - const options = parseArgs(match.groups.args) as Record; - result.output = Boolean(options.output); - result.input = Boolean(options.input); - if (typeof options.match === 'string' || Array.isArray(options.match)) { - result.match = outmatch(options.match, { separator: false }); - } - } else { - if (/output:\s*true/.test(match.groups.args)) { - result.output = true; - } - if (/input:\s*true/.test(match.groups.args)) { - result.input = true; - } + if (match.groups.args.includes('{') && match.groups.args.includes('}')) { + const options = parseArgs(match.groups.args) as Record; + result.output = Boolean(options.output); + result.input = Boolean(options.input); + if (typeof options.match === 'string' || Array.isArray(options.match)) { + result.match = outmatch(options.match, { separator: false }); + } + } else { + if (/output:\s*true/.test(match.groups.args)) { + result.output = true; } + if (/input:\s*true/.test(match.groups.args)) { + result.input = true; + } + } - return result; + return result; } function parseArgs(string: string): Record | string { + try { + return JSON5.parse(string); + } catch { try { - return JSON5.parse(string); + return JSON5.parse(`[${string}]`); } catch { - try { - return JSON5.parse(`[${string}]`); - } catch { - throw new Error(`Failed to parse: ${string}`); - } + throw new Error(`Failed to parse: ${string}`); } + } } function getNamespace(name: unknown): string | undefined { - if (name === undefined) { - return undefined; - } - let result = String(name); - if (result.includes('.')) { - [result] = result.split('.'); - } - // eslint-disable-next-line consistent-return - return result; + if (name === undefined) { + return undefined; + } + let result = String(name); + if (result.includes('.')) { + [result] = result.split('.'); + } + // eslint-disable-next-line consistent-return + return result; } diff --git a/src/helpers/pascal-case.ts b/src/helpers/pascal-case.ts index 10ffd359..ce9c722d 100644 --- a/src/helpers/pascal-case.ts +++ b/src/helpers/pascal-case.ts @@ -1,5 +1,5 @@ import { camelCase, startCase } from 'lodash'; export function pascalCase(string: string) { - return startCase(camelCase(string)).replace(/ /g, ''); + return startCase(camelCase(string)).replace(/ /g, ''); } diff --git a/src/helpers/property-structure.ts b/src/helpers/property-structure.ts index bfe2e35b..c06d3a54 100644 --- a/src/helpers/property-structure.ts +++ b/src/helpers/property-structure.ts @@ -4,32 +4,30 @@ import { PropertyDeclarationStructure, StructureKind } from 'ts-morph'; * Get property structure (field) for class. */ export function propertyStructure(args: { - propertyType: string[]; - isList: boolean; - name: string; - isNullable?: boolean; - hasQuestionToken?: boolean; - hasExclamationToken?: boolean; + propertyType: string[]; + isList: boolean; + name: string; + isNullable?: boolean; + hasQuestionToken?: boolean; + hasExclamationToken?: boolean; }): PropertyDeclarationStructure { - const { - isNullable, - propertyType, - name, - isList, - hasQuestionToken, - hasExclamationToken, - } = args; - const type = propertyType - .map(type => (isList ? `Array<${type}>` : type)) - .join(' | '); + const { + isNullable, + propertyType, + name, + isList, + hasQuestionToken, + hasExclamationToken, + } = args; + const type = propertyType.map(type => (isList ? `Array<${type}>` : type)).join(' | '); - return { - kind: StructureKind.Property, - name, - type, - hasQuestionToken: hasQuestionToken ?? isNullable, - hasExclamationToken: hasExclamationToken ?? !isNullable, - decorators: [], - leadingTrivia: '\n', - }; + return { + kind: StructureKind.Property, + name, + type, + hasQuestionToken: hasQuestionToken ?? isNullable, + hasExclamationToken: hasExclamationToken ?? !isNullable, + decorators: [], + leadingTrivia: '\n', + }; } diff --git a/src/helpers/relative-path.ts b/src/helpers/relative-path.ts index 3b79a59e..cdc1a737 100644 --- a/src/helpers/relative-path.ts +++ b/src/helpers/relative-path.ts @@ -1,18 +1,18 @@ import getRelativePath from 'get-relative-path'; export function relativePath(from: string, to: string) { - if (!from.startsWith('/')) { - from = `/${from}`; - } - if (!to.startsWith('/')) { - to = `/${to}`; - } - let result = getRelativePath(from, to); - if (!result.startsWith('.')) { - result = `./${result}`; - } - if (result.endsWith('.ts')) { - result = result.slice(0, -3); - } - return result; + if (!from.startsWith('/')) { + from = `/${from}`; + } + if (!to.startsWith('/')) { + to = `/${to}`; + } + let result = getRelativePath(from, to); + if (!result.startsWith('.')) { + result = `./${result}`; + } + if (result.endsWith('.ts')) { + result = result.slice(0, -3); + } + return result; } diff --git a/src/helpers/update-object-property.ts b/src/helpers/update-object-property.ts index d0062590..9bb05ec3 100644 --- a/src/helpers/update-object-property.ts +++ b/src/helpers/update-object-property.ts @@ -1,29 +1,29 @@ import { ObjectLiteralExpression, PropertyAssignment, StructureKind } from 'ts-morph'; export function updateObjectProperty(args: { - expression: ObjectLiteralExpression; - name: string; - value: string | number | boolean | undefined; + expression: ObjectLiteralExpression; + name: string; + value: string | number | boolean | undefined; }) { - const { expression, name, value } = args; - let propertyAssignment = expression.getProperty(name) as - | PropertyAssignment - | undefined; + const { expression, name, value } = args; + let propertyAssignment = expression.getProperty(name) as + | PropertyAssignment + | undefined; - if (value === undefined) { - if (propertyAssignment) { - propertyAssignment.remove(); - } - return; + if (value === undefined) { + if (propertyAssignment) { + propertyAssignment.remove(); } + return; + } - if (!propertyAssignment) { - propertyAssignment = expression.addProperty({ - name, - kind: StructureKind.PropertyAssignment, - initializer: 'undefined', - }) as PropertyAssignment; - } + if (!propertyAssignment) { + propertyAssignment = expression.addProperty({ + name, + kind: StructureKind.PropertyAssignment, + initializer: 'undefined', + }) as PropertyAssignment; + } - propertyAssignment.setInitializer(JSON.stringify(value)); + propertyAssignment.setInitializer(JSON.stringify(value)); } diff --git a/src/index.ts b/src/index.ts index 252d20d4..7be4e5f4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,13 +3,13 @@ import { generatorHandler, GeneratorOptions } from '@prisma/generator-helper'; import { generate } from './generate'; generatorHandler({ - async onGenerate(options: GeneratorOptions) { - await generate(options); - }, - onManifest() { - return { - defaultOutput: '.', - prettyName: 'Prisma NestJS/GraphQL', - }; - }, + async onGenerate(options: GeneratorOptions) { + await generate(options); + }, + onManifest() { + return { + defaultOutput: '.', + prettyName: 'Prisma NestJS/GraphQL', + }; + }, }); diff --git a/src/test/compatibility.ts b/src/test/compatibility.ts index 27b8d70a..d08c8d36 100644 --- a/src/test/compatibility.ts +++ b/src/test/compatibility.ts @@ -24,179 +24,179 @@ import { UserWhereInput } from '../../@generated/user/user-where.input'; let $prisma = new PrismaClient(); { - let p: P.User = {} as unknown as P.User; - let o: User = {} as unknown as User; - o = p; - p = o; + let p: P.User = {} as unknown as P.User; + let o: User = {} as unknown as User; + o = p; + p = o; } { - let t: Array | Array = []; - let m: Array = t; // t => m will fail - m; + let t: Array | Array = []; + let m: Array = t; // t => m will fail + m; } { - // Scalar filter - let x: IntFilter = {}; - let p: Prisma.IntFilter = {}; - p = x; - p; // x = p fail (enumerable) + // Scalar filter + let x: IntFilter = {}; + let p: Prisma.IntFilter = {}; + p = x; + p; // x = p fail (enumerable) } { - // Scalar filter - let x: DateTimeFilter = {}; - let p: Prisma.DateTimeFilter = {}; - p = x; - p; + // Scalar filter + let x: DateTimeFilter = {}; + let p: Prisma.DateTimeFilter = {}; + p = x; + p; } { - // Scalar filter - let x: StringFilter = {}; - let p: Prisma.StringFilter = {}; - p = x; - p; + // Scalar filter + let x: StringFilter = {}; + let p: Prisma.StringFilter = {}; + p = x; + p; } { - // Nullable filter - let x: FloatFilter = {}; - let p: Prisma.FloatNullableFilter = {}; - p = x; - p; + // Nullable filter + let x: FloatFilter = {}; + let p: Prisma.FloatNullableFilter = {}; + p = x; + p; } { - let x: UserWhereInput = {}; - let p: Prisma.UserWhereInput = {}; - p = x; - p; - $prisma.user.findMany({ where: x }); + let x: UserWhereInput = {}; + let p: Prisma.UserWhereInput = {}; + p = x; + p; + $prisma.user.findMany({ where: x }); } { - let x: UserListRelationFilter = {}; - let p: Prisma.UserListRelationFilter = {}; - p = x; - p; + let x: UserListRelationFilter = {}; + let p: Prisma.UserListRelationFilter = {}; + p = x; + p; } { - let x: FindManyUserArgs = {}; - let p: Prisma.UserFindManyArgs = {}; - p = x; - p; - $prisma.user.findMany(x); + let x: FindManyUserArgs = {}; + let p: Prisma.UserFindManyArgs = {}; + p = x; + p; + $prisma.user.findMany(x); +} +{ + let x: UserCreateWithoutArticlesInput = + {} as unknown as UserCreateWithoutArticlesInput; + let p: Prisma.UserCreateWithoutArticlesInput = + {} as unknown as Prisma.UserCreateWithoutArticlesInput; + p = x; + p; + $prisma.user.create({ + data: x, + }); +} +{ + let x: UserCreateWithoutCommentsInput = + {} as unknown as UserCreateWithoutCommentsInput; + let p: Prisma.UserCreateWithoutCommentsInput = + {} as unknown as Prisma.UserCreateWithoutCommentsInput; + p = x; + p; + $prisma.user.create({ + data: x, + }); +} +{ + let x: UserAggregateArgs = {}; + let p: Prisma.UserAggregateArgs = {}; + p = x; + p; + x; +} +{ + let x: UserGroupByArgs = { + by: ['id'] as UserScalarFieldEnum[], + }; + let p: Prisma.UserGroupByArgs = { + by: ['id'] as UserScalarFieldEnum[], + }; + p = x; + p; + x; +} +{ + let x: DummyCreateInput = { id: '1', floaty: 1 }; + let p: Prisma.DummyCreateInput = { id: '2', floaty: 2 }; + p = x; + p; + x; } -{ - let x: UserCreateWithoutArticlesInput = - {} as unknown as UserCreateWithoutArticlesInput; - let p: Prisma.UserCreateWithoutArticlesInput = - {} as unknown as Prisma.UserCreateWithoutArticlesInput; - p = x; - p; - $prisma.user.create({ - data: x, - }); -} -{ - let x: UserCreateWithoutCommentsInput = - {} as unknown as UserCreateWithoutCommentsInput; - let p: Prisma.UserCreateWithoutCommentsInput = - {} as unknown as Prisma.UserCreateWithoutCommentsInput; - p = x; - p; - $prisma.user.create({ - data: x, +{ + let x: DummyCreateInput['json'] = {}; + let p: Prisma.DummyCreateInput['json'] = {}; + p = x; + p; +} +{ + let x: UserMaxOrderByAggregateInput = {}; + let p: Prisma.UserMaxOrderByAggregateInput = {}; + p = x; // To prisma + x = p; // To object type +} +{ + let x: UserCreateInput = {} as unknown as UserCreateInput; + let p: Prisma.UserCreateInput = {} as unknown as Prisma.UserCreateInput; + p = x; + p; +} +{ + let x: Dummy = {} as unknown as Dummy; + let p: P.Dummy = {} as unknown as P.Dummy; + p = x; + x = p; +} +{ + let x: UserGroupByArgs = { + by: [UserScalarFieldEnum.id], + }; + let p: Prisma.UserGroupByArgs = { + by: [UserScalarFieldEnum.id], + }; + p = x; + p; + // x = p; // fails (enumerable) + // $prisma.user.groupBy(x); // Error (prisma issue https://github.com/unlight/prisma-nestjs-graphql/issues/31) + // $prisma.user.groupBy(p); // Error +} +{ + void $prisma.user + .findMany({ + include: { + articles: true, + profile: true, + _count: true, + comments: true, + favoriteArticles: true, + followers: true, + following: true, + }, + }) + .then(users => { + let result: User[] = users; + console.log('result', result); }); -} -{ - let x: UserAggregateArgs = {}; - let p: Prisma.UserAggregateArgs = {}; - p = x; - p; - x; -} -{ - let x: UserGroupByArgs = { - by: ['id'] as UserScalarFieldEnum[], - }; - let p: Prisma.UserGroupByArgs = { - by: ['id'] as UserScalarFieldEnum[], - }; - p = x; - p; - x; -} -{ - let x: DummyCreateInput = { id: '1', floaty: 1 }; - let p: Prisma.DummyCreateInput = { id: '2', floaty: 2 }; - p = x; - p; - x; -} -{ - let x: DummyCreateInput['json'] = {}; - let p: Prisma.DummyCreateInput['json'] = {}; - p = x; - p; -} -{ - let x: UserMaxOrderByAggregateInput = {}; - let p: Prisma.UserMaxOrderByAggregateInput = {}; - p = x; // To prisma - x = p; // To object type -} -{ - let x: UserCreateInput = {} as unknown as UserCreateInput; - let p: Prisma.UserCreateInput = {} as unknown as Prisma.UserCreateInput; - p = x; - p; -} -{ - let x: Dummy = {} as unknown as Dummy; - let p: P.Dummy = {} as unknown as P.Dummy; - p = x; - x = p; -} -{ - let x: UserGroupByArgs = { - by: [UserScalarFieldEnum.id], - }; - let p: Prisma.UserGroupByArgs = { - by: [UserScalarFieldEnum.id], - }; - p = x; - p; - // x = p; // fails (enumerable) - // $prisma.user.groupBy(x); // Error (prisma issue https://github.com/unlight/prisma-nestjs-graphql/issues/31) - // $prisma.user.groupBy(p); // Error -} -{ - void $prisma.user - .findMany({ - include: { - articles: true, - profile: true, - _count: true, - comments: true, - favoriteArticles: true, - followers: true, - following: true, - }, - }) - .then(users => { - let result: User[] = users; - console.log('result', result); - }); - void $prisma.user - .findMany({ - include: { - _count: { - select: { - comments: true, - }, - }, - }, - }) - .then(users => { - type x = UserCount; - let result: User[] = users; - console.log('result', result); - }); + void $prisma.user + .findMany({ + include: { + _count: { + select: { + comments: true, + }, + }, + }, + }) + .then(users => { + type x = UserCount; + let result: User[] = users; + console.log('result', result); + }); } diff --git a/src/test/custom-decorators.spec.ts b/src/test/custom-decorators.spec.ts index 5cf64b1a..2f22e408 100644 --- a/src/test/custom-decorators.spec.ts +++ b/src/test/custom-decorators.spec.ts @@ -7,9 +7,9 @@ import { testGenerate } from './test-generate'; let project: Project; describe('custom decorators namespace both input and output', () => { - before(async () => { - ({ project } = await testGenerate({ - schema: ` + before(async () => { + ({ project } = await testGenerate({ + schema: ` model User { id Int @id /// @Validator.MaxLength(30) @@ -21,167 +21,167 @@ describe('custom decorators namespace both input and output', () => { /// @FieldType({ name: 'Scalars.GraphQLEmailAddress', from: 'graphql-scalars', input: true }) email String? }`, - options: [ - `outputFilePattern = "{name}.{type}.ts"`, - // custom decorators (validate) - // import * as Validator from 'class-validator' - // @Validator.IsEmail() - // email: string - `fields_Validator_from = "class-validator"`, - `fields_Validator_input = true`, - ], - })); - }); - - describe('aggregates should not have validators', () => { - it('user-count-aggregate.input', () => { - const s = testSourceFile({ - project, - file: 'user-count-aggregate.input.ts', - property: 'email', - }); - expect(s.propertyDecorators).toHaveLength(1); - expect(s.propertyDecorators).not.toContainEqual( - expect.objectContaining({ - name: 'IsEmail', - }), - ); - expect(s.fieldDecoratorType).toEqual('() => Boolean'); - }); - - it('user-count-order-by-aggregate.input name is type of sort order', () => { - const s = testSourceFile({ - project, - file: 'user-count-order-by-aggregate.input.ts', - property: 'email', - }); - expect( - s.propertyDecorators?.find(d => d.name.includes('IsEmail')), - ).toBeUndefined(); - expect(s.fieldDecoratorType).toEqual('() => SortOrder'); - }); - }); - - describe('custom decorators in user create input', () => { - let sourceFile: SourceFile; - let importDeclarations: any[]; - let classFile: any; - - before(() => { - ({ sourceFile, classFile } = testSourceFile({ - project, - file: 'user-create.input.ts', - })); - importDeclarations = sourceFile - .getImportDeclarations() - .map(d => d.getStructure()); - }); - - it('decorator validator maxlength should exists', () => { - const d = classFile - .getProperty('name') - ?.getDecorator(d => d.getFullName() === 'Validator.MaxLength'); - expect(d).toBeTruthy(); - expect(d?.getText()).toBe('@Validator.MaxLength(30)'); - }); - - it('imports should contains custom import', () => { - expect(importDeclarations).toContainEqual( - expect.objectContaining({ - namespaceImport: 'Validator', - moduleSpecifier: 'class-validator', - }), - ); - }); - - it('several decorators length', () => { - const s = testSourceFile({ - project, - file: 'user-create.input.ts', - property: 'age', - }); - expect(s.propertyDecorators).toHaveLength(3); - }); - - it('validator should be imported once', () => { - expect( - importDeclarations.filter(x => x.moduleSpecifier === 'class-validator'), - ).toHaveLength(1); - }); - }); - - describe('should not have metadata in description', () => { - it('age', () => { - const s = testSourceFile({ - project, - file: 'user.model.ts', - property: 'age', - }); - expect(s.fieldDecoratorOptions).not.toContain('description'); - }); - - it('name', () => { - const s = testSourceFile({ - project, - file: 'user.model.ts', - property: 'name', - }); - expect(s.fieldDecoratorOptions).not.toContain('description'); - }); - - it('email', () => { - const s = testSourceFile({ - project, - file: 'user.model.ts', - property: 'email', - }); - expect(s.fieldDecoratorOptions).not.toContain('description'); - }); - }); - - it('output model has no maxlength decorator', () => { - const s = testSourceFile({ - project, - file: 'user.model.ts', - property: 'name', - }); - expect(s.propertyDecorators?.find(d => d.name === 'MaxLength')).toBeFalsy(); - }); + options: [ + `outputFilePattern = "{name}.{type}.ts"`, + // custom decorators (validate) + // import * as Validator from 'class-validator' + // @Validator.IsEmail() + // email: string + `fields_Validator_from = "class-validator"`, + `fields_Validator_input = true`, + ], + })); + }); + + describe('aggregates should not have validators', () => { + it('user-count-aggregate.input', () => { + const s = testSourceFile({ + project, + file: 'user-count-aggregate.input.ts', + property: 'email', + }); + expect(s.propertyDecorators).toHaveLength(1); + expect(s.propertyDecorators).not.toContainEqual( + expect.objectContaining({ + name: 'IsEmail', + }), + ); + expect(s.fieldDecoratorType).toEqual('() => Boolean'); + }); + + it('user-count-order-by-aggregate.input name is type of sort order', () => { + const s = testSourceFile({ + project, + file: 'user-count-order-by-aggregate.input.ts', + property: 'email', + }); + expect( + s.propertyDecorators?.find(d => d.name.includes('IsEmail')), + ).toBeUndefined(); + expect(s.fieldDecoratorType).toEqual('() => SortOrder'); + }); + }); + + describe('custom decorators in user create input', () => { + let sourceFile: SourceFile; + let importDeclarations: any[]; + let classFile: any; + + before(() => { + ({ sourceFile, classFile } = testSourceFile({ + project, + file: 'user-create.input.ts', + })); + importDeclarations = sourceFile + .getImportDeclarations() + .map(d => d.getStructure()); + }); + + it('decorator validator maxlength should exists', () => { + const d = classFile + .getProperty('name') + ?.getDecorator(d => d.getFullName() === 'Validator.MaxLength'); + expect(d).toBeTruthy(); + expect(d?.getText()).toBe('@Validator.MaxLength(30)'); + }); + + it('imports should contains custom import', () => { + expect(importDeclarations).toContainEqual( + expect.objectContaining({ + namespaceImport: 'Validator', + moduleSpecifier: 'class-validator', + }), + ); + }); + + it('several decorators length', () => { + const s = testSourceFile({ + project, + file: 'user-create.input.ts', + property: 'age', + }); + expect(s.propertyDecorators).toHaveLength(3); + }); + + it('validator should be imported once', () => { + expect( + importDeclarations.filter(x => x.moduleSpecifier === 'class-validator'), + ).toHaveLength(1); + }); + }); + + describe('should not have metadata in description', () => { + it('age', () => { + const s = testSourceFile({ + project, + file: 'user.model.ts', + property: 'age', + }); + expect(s.fieldDecoratorOptions).not.toContain('description'); + }); + + it('name', () => { + const s = testSourceFile({ + project, + file: 'user.model.ts', + property: 'name', + }); + expect(s.fieldDecoratorOptions).not.toContain('description'); + }); + + it('email', () => { + const s = testSourceFile({ + project, + file: 'user.model.ts', + property: 'email', + }); + expect(s.fieldDecoratorOptions).not.toContain('description'); + }); + }); + + it('output model has no maxlength decorator', () => { + const s = testSourceFile({ + project, + file: 'user.model.ts', + property: 'name', + }); + expect(s.propertyDecorators?.find(d => d.name === 'MaxLength')).toBeFalsy(); + }); }); describe('fieldtype disable output', () => { - before(async () => { - ({ project } = await testGenerate({ - schema: ` + before(async () => { + ({ project } = await testGenerate({ + schema: ` model User { id String @id @default(cuid()) /// @FieldType('Upload.GraphQLUpload') image String? } `, - options: [ - `outputFilePattern = "{name}.{type}.ts"`, - `fields_Upload_from = "graphql-upload"`, - `fields_Upload_input = true`, - `fields_Upload_output = false`, - ], - })); - }); - - it('upload image output', () => { - const s = testSourceFile({ - project, - file: 'user.model.ts', - property: 'image', - }); - expect(s.fieldDecoratorType).toEqual('() => String'); - }); + options: [ + `outputFilePattern = "{name}.{type}.ts"`, + `fields_Upload_from = "graphql-upload"`, + `fields_Upload_input = true`, + `fields_Upload_output = false`, + ], + })); + }); + + it('upload image output', () => { + const s = testSourceFile({ + project, + file: 'user.model.ts', + property: 'image', + }); + expect(s.fieldDecoratorType).toEqual('() => String'); + }); }); describe('custom decorators and description', () => { - before(async () => { - ({ project } = await testGenerate({ - schema: ` + before(async () => { + ({ project } = await testGenerate({ + schema: ` model User { /// user id really id Int @id @@ -189,120 +189,120 @@ describe('custom decorators and description', () => { /// @Validator.Length(5, 15, "check length") name String }`, - options: [ - `outputFilePattern = "{name}.{type}.ts"`, - `fields_Validator_from = "class-validator"`, - `fields_Validator_output = true`, - `fields_Validator_input = true`, - ], - })); - }); - - it('has description', () => { - const s = testSourceFile({ - project, - file: 'user.model.ts', - property: 'name', - }); - expect(s.fieldDecoratorOptions).toContain("description:'User name really'"); - }); - - it('has decorator length', () => { - const s = testSourceFile({ - project, - file: 'user.model.ts', - property: 'name', - }); - expect(s.propertyDecorators).toHaveLength(2); - expect(s.propertyDecorators).toContainEqual( - expect.objectContaining({ name: 'Length' }), - ); - expect(s.sourceText).toContain('@Validator.Length(5, 15, "check length")'); - }); + options: [ + `outputFilePattern = "{name}.{type}.ts"`, + `fields_Validator_from = "class-validator"`, + `fields_Validator_output = true`, + `fields_Validator_input = true`, + ], + })); + }); + + it('has description', () => { + const s = testSourceFile({ + project, + file: 'user.model.ts', + property: 'name', + }); + expect(s.fieldDecoratorOptions).toContain("description:'User name really'"); + }); + + it('has decorator length', () => { + const s = testSourceFile({ + project, + file: 'user.model.ts', + property: 'name', + }); + expect(s.propertyDecorators).toHaveLength(2); + expect(s.propertyDecorators).toContainEqual( + expect.objectContaining({ name: 'Length' }), + ); + expect(s.sourceText).toContain('@Validator.Length(5, 15, "check length")'); + }); }); describe('custom decorators default import', () => { - before(async () => { - ({ project } = await testGenerate({ - schema: ` + before(async () => { + ({ project } = await testGenerate({ + schema: ` model User { id Int @id /// @IsValidName() name String }`, - options: [ - `outputFilePattern = "{name}.{type}.ts"`, - `fields_IsValidName_from = "is-valid-name"`, - `fields_IsValidName_input = true`, - `fields_IsValidName_defaultImport = IsValidName`, - ], - })); - }); - - it('importDeclarations should import default', () => { - const s = testSourceFile({ - project, - file: 'user-create.input.ts', - }); - - const importDeclarations = s.sourceFile - .getImportDeclarations() - .map(d => d.getStructure()) - .filter(d => d.moduleSpecifier === 'is-valid-name'); - - expect(importDeclarations).toHaveLength(1); - expect(importDeclarations[0]).toEqual( - expect.objectContaining({ - defaultImport: 'IsValidName', - namedImports: [], - namespaceImport: undefined, - }), - ); - }); + options: [ + `outputFilePattern = "{name}.{type}.ts"`, + `fields_IsValidName_from = "is-valid-name"`, + `fields_IsValidName_input = true`, + `fields_IsValidName_defaultImport = IsValidName`, + ], + })); + }); + + it('importDeclarations should import default', () => { + const s = testSourceFile({ + project, + file: 'user-create.input.ts', + }); + + const importDeclarations = s.sourceFile + .getImportDeclarations() + .map(d => d.getStructure()) + .filter(d => d.moduleSpecifier === 'is-valid-name'); + + expect(importDeclarations).toHaveLength(1); + expect(importDeclarations[0]).toEqual( + expect.objectContaining({ + defaultImport: 'IsValidName', + namedImports: [], + namespaceImport: undefined, + }), + ); + }); }); describe('default import alternative syntax', () => { - before(async () => { - ({ project } = await testGenerate({ - schema: ` + before(async () => { + ({ project } = await testGenerate({ + schema: ` model User { id Int @id /// @IsEmail() name String }`, - options: [ - `outputFilePattern = "{name}.{type}.ts"`, - `fields_IsEmail_from = "isvalidemail"`, - `fields_IsEmail_input = true`, - `fields_IsEmail_defaultImport = true`, - ], - })); - }); - - it('test', () => { - const s = testSourceFile({ - project, - file: 'user-create.input.ts', - }); - const importDeclarations = s.sourceFile - .getImportDeclarations() - .map(d => d.getStructure()) - .filter(d => d.moduleSpecifier === 'isvalidemail'); - expect(importDeclarations).toHaveLength(1); - expect(importDeclarations[0]).toEqual( - expect.objectContaining({ - defaultImport: 'IsEmail', - namedImports: [], - namespaceImport: undefined, - }), - ); - }); + options: [ + `outputFilePattern = "{name}.{type}.ts"`, + `fields_IsEmail_from = "isvalidemail"`, + `fields_IsEmail_input = true`, + `fields_IsEmail_defaultImport = true`, + ], + })); + }); + + it('test', () => { + const s = testSourceFile({ + project, + file: 'user-create.input.ts', + }); + const importDeclarations = s.sourceFile + .getImportDeclarations() + .map(d => d.getStructure()) + .filter(d => d.moduleSpecifier === 'isvalidemail'); + expect(importDeclarations).toHaveLength(1); + expect(importDeclarations[0]).toEqual( + expect.objectContaining({ + defaultImport: 'IsEmail', + namedImports: [], + namespaceImport: undefined, + }), + ); + }); }); describe('custom decorators field custom type namespace', () => { - before(async () => { - ({ project } = await testGenerate({ - schema: ` + before(async () => { + ({ project } = await testGenerate({ + schema: ` model User { id Int @id /// @FieldType({ name: 'Scalars.EmailAddress', output: true, input: true }) @@ -310,263 +310,263 @@ describe('custom decorators field custom type namespace', () => { /// @FieldType('Scalars.EmailAddress') secondEmail String }`, - options: [ - `outputFilePattern = "{name}.{type}.ts"`, - // import { EmailAddress } from 'graphql-scalars' - // @Field(() => EmailAddress) - `fields_Scalars_from = "graphql-scalars"`, - `fields_Scalars_input = true`, - ], - })); - }); - - describe('user create input', () => { - it('email field type', () => { - const s = testSourceFile({ - project, - file: 'user-create.input.ts', - property: 'email', - }); - expect(s.fieldDecoratorType).toEqual('() => Scalars.EmailAddress'); - expect(s.propertyDecorators).toHaveLength(1); - }); - - it('field type secondemail', () => { - const s = testSourceFile({ - project, - file: 'user-create.input.ts', - property: 'secondEmail', - }); - expect(s.fieldDecoratorType).toEqual('() => Scalars.EmailAddress'); - }); - - it('importdeclarations should import namespace', () => { - const s = testSourceFile({ - project, - file: 'user-create.input.ts', - }); - expect(s.namespaceImports).toContainEqual({ - name: 'Scalars', - specifier: 'graphql-scalars', - }); - }); - }); - - describe('custom type user model', () => { - it('custom type user model email field type', () => { - const s = testSourceFile({ - project, - file: 'user.model.ts', - property: 'email', - }); - expect(s.fieldDecoratorType).toEqual('() => Scalars.EmailAddress'); - }); - }); + options: [ + `outputFilePattern = "{name}.{type}.ts"`, + // import { EmailAddress } from 'graphql-scalars' + // @Field(() => EmailAddress) + `fields_Scalars_from = "graphql-scalars"`, + `fields_Scalars_input = true`, + ], + })); + }); + + describe('user create input', () => { + it('email field type', () => { + const s = testSourceFile({ + project, + file: 'user-create.input.ts', + property: 'email', + }); + expect(s.fieldDecoratorType).toEqual('() => Scalars.EmailAddress'); + expect(s.propertyDecorators).toHaveLength(1); + }); + + it('field type secondemail', () => { + const s = testSourceFile({ + project, + file: 'user-create.input.ts', + property: 'secondEmail', + }); + expect(s.fieldDecoratorType).toEqual('() => Scalars.EmailAddress'); + }); + + it('importdeclarations should import namespace', () => { + const s = testSourceFile({ + project, + file: 'user-create.input.ts', + }); + expect(s.namespaceImports).toContainEqual({ + name: 'Scalars', + specifier: 'graphql-scalars', + }); + }); + }); + + describe('custom type user model', () => { + it('custom type user model email field type', () => { + const s = testSourceFile({ + project, + file: 'user.model.ts', + property: 'email', + }); + expect(s.fieldDecoratorType).toEqual('() => Scalars.EmailAddress'); + }); + }); }); describe('decorate option', () => { - before(async () => { - ({ project } = await testGenerate({ - schema: ` + before(async () => { + ({ project } = await testGenerate({ + schema: ` model User { id Int @id @default(autoincrement()) /// @Validator.MinLength(3) name String } `, - options: [ - `outputFilePattern = "{name}.{type}.ts"`, - `fields_Validator_from = "class-validator"`, - `decorate_1_type = "Create@(One|Many)*Args"`, - `decorate_1_field = data`, - `decorate_1_name = ValidateNested`, - `decorate_1_from = "class-validator"`, - `decorate_1_arguments = "[]"`, - `decorate_2_type = "Create@(One|Many)*Args"`, - `decorate_2_field = data`, - `decorate_2_from = "class-transformer"`, - `decorate_2_arguments = "['() => {propertyType.0}']"`, - `decorate_2_name = Type`, - // Import as namespace - // `decorate_2_namespaceImport = "Transform"`, - // `decorate_2_name = "Transform.Type"`, - ], - })); - }); - - it('validatenested create one user args', () => { - const s = testSourceFile({ - project, - file: 'create-one-user.args.ts', - property: 'data', - }); - expect(s.propertyDecorators).toContainEqual( - expect.objectContaining({ - name: 'ValidateNested', - arguments: [], - typeArguments: [], - }), - ); - expect(s.propertyDecorators).toContainEqual( - expect.objectContaining({ - name: 'Type', - arguments: ['() => UserCreateInput'], - typeArguments: [], - }), - ); - expect(s.namedImports).toContainEqual({ - name: 'Type', - specifier: 'class-transformer', - }); - expect(s.namedImports).toContainEqual({ - name: 'ValidateNested', - specifier: 'class-validator', - }); - }); - - it('validatenested create many user args', () => { - const s = testSourceFile({ - project, - file: 'create-many-user.args.ts', - property: 'data', - }); - - expect(s.propertyDecorators).toContainEqual( - expect.objectContaining({ - name: 'ValidateNested', - arguments: [], - typeArguments: [], - }), - ); - expect(s.propertyDecorators).toContainEqual( - expect.objectContaining({ - name: 'Type', - arguments: ['() => UserCreateManyInput'], - typeArguments: [], - }), - ); - expect(s.namedImports).toContainEqual({ - name: 'Type', - specifier: 'class-transformer', - }); - expect(s.namedImports).toContainEqual({ - name: 'ValidateNested', - specifier: 'class-validator', - }); - }); + options: [ + `outputFilePattern = "{name}.{type}.ts"`, + `fields_Validator_from = "class-validator"`, + `decorate_1_type = "Create@(One|Many)*Args"`, + `decorate_1_field = data`, + `decorate_1_name = ValidateNested`, + `decorate_1_from = "class-validator"`, + `decorate_1_arguments = "[]"`, + `decorate_2_type = "Create@(One|Many)*Args"`, + `decorate_2_field = data`, + `decorate_2_from = "class-transformer"`, + `decorate_2_arguments = "['() => {propertyType.0}']"`, + `decorate_2_name = Type`, + // Import as namespace + // `decorate_2_namespaceImport = "Transform"`, + // `decorate_2_name = "Transform.Type"`, + ], + })); + }); + + it('validatenested create one user args', () => { + const s = testSourceFile({ + project, + file: 'create-one-user.args.ts', + property: 'data', + }); + expect(s.propertyDecorators).toContainEqual( + expect.objectContaining({ + name: 'ValidateNested', + arguments: [], + typeArguments: [], + }), + ); + expect(s.propertyDecorators).toContainEqual( + expect.objectContaining({ + name: 'Type', + arguments: ['() => UserCreateInput'], + typeArguments: [], + }), + ); + expect(s.namedImports).toContainEqual({ + name: 'Type', + specifier: 'class-transformer', + }); + expect(s.namedImports).toContainEqual({ + name: 'ValidateNested', + specifier: 'class-validator', + }); + }); + + it('validatenested create many user args', () => { + const s = testSourceFile({ + project, + file: 'create-many-user.args.ts', + property: 'data', + }); + + expect(s.propertyDecorators).toContainEqual( + expect.objectContaining({ + name: 'ValidateNested', + arguments: [], + typeArguments: [], + }), + ); + expect(s.propertyDecorators).toContainEqual( + expect.objectContaining({ + name: 'Type', + arguments: ['() => UserCreateManyInput'], + typeArguments: [], + }), + ); + expect(s.namedImports).toContainEqual({ + name: 'Type', + specifier: 'class-transformer', + }); + expect(s.namedImports).toContainEqual({ + name: 'ValidateNested', + specifier: 'class-validator', + }); + }); }); describe('model decorate', () => { - before(async () => { - ({ project } = await testGenerate({ - schema: ` + before(async () => { + ({ project } = await testGenerate({ + schema: ` /// @NG.Directive('@extends') /// @NG.Directive('@key(fields: "id")') model User { /// @NG.Directive('@external') id String @id }`, - options: [ - `outputFilePattern = "{name}.{type}.ts"`, - `fields_NG_from = "@nestjs/graphql"`, - `fields_NG_output = false`, - `fields_NG_model = true`, - ], - })); - }); - - it('user model id property', () => { - const { propertyDecorators } = testSourceFile({ - project, - file: 'user.model.ts', - property: 'id', - }); - expect(propertyDecorators?.find(d => d.name === 'Directive')).toBeTruthy(); - expect( - propertyDecorators?.find(d => d.name === 'Directive')?.arguments?.[0], - ).toBe("'@external'"); - }); - - it('user model class', () => { - const s = testSourceFile({ - project, - file: 'user.model.ts', - }); - expect(s.namespaceImports).toContainEqual({ - name: 'NG', - specifier: '@nestjs/graphql', - }); - expect(s.classFile.getDecorator('Directive')).toBeTruthy(); - }); - - it('usergroupby should not have ng.directive', () => { - const s = testSourceFile({ - project, - file: 'user-group-by.output.ts', - property: 'id', - }); - expect(s.propertyDecorators).toHaveLength(1); - expect(s.propertyDecorators?.find(d => d.name === 'Directive')).toBeFalsy(); - }); + options: [ + `outputFilePattern = "{name}.{type}.ts"`, + `fields_NG_from = "@nestjs/graphql"`, + `fields_NG_output = false`, + `fields_NG_model = true`, + ], + })); + }); + + it('user model id property', () => { + const { propertyDecorators } = testSourceFile({ + project, + file: 'user.model.ts', + property: 'id', + }); + expect(propertyDecorators?.find(d => d.name === 'Directive')).toBeTruthy(); + expect(propertyDecorators?.find(d => d.name === 'Directive')?.arguments?.[0]).toBe( + "'@external'", + ); + }); + + it('user model class', () => { + const s = testSourceFile({ + project, + file: 'user.model.ts', + }); + expect(s.namespaceImports).toContainEqual({ + name: 'NG', + specifier: '@nestjs/graphql', + }); + expect(s.classFile.getDecorator('Directive')).toBeTruthy(); + }); + + it('usergroupby should not have ng.directive', () => { + const s = testSourceFile({ + project, + file: 'user-group-by.output.ts', + property: 'id', + }); + expect(s.propertyDecorators).toHaveLength(1); + expect(s.propertyDecorators?.find(d => d.name === 'Directive')).toBeFalsy(); + }); }); describe('model directive', () => { - before(async () => { - ({ project } = await testGenerate({ - schema: ` + before(async () => { + ({ project } = await testGenerate({ + schema: ` /// @Directive({ arguments: ['@extends'] }) /// @Directive({ arguments: ['@key(fields: "id")'] }) model User { /// @Directive({ arguments: ['@external'] }) id String @id }`, - options: [`outputFilePattern = "{name}.{type}.ts"`], - })); - }); - - it('user model id property', () => { - const s = testSourceFile({ - project, - file: 'user.model.ts', - property: 'id', - }); - expect(s.propertyDecorators?.find(d => d.name === 'Directive')).toBeTruthy(); - expect( - s.propertyDecorators?.find(d => d.name === 'Directive')?.arguments?.[0], - ).toBe("'@external'"); - }); - - it('user model class', () => { - const s = testSourceFile({ - project, - file: 'user.model.ts', - }); - expect(s.namedImports).toContainEqual({ - name: 'Directive', - specifier: '@nestjs/graphql', - }); - expect(s.classFile.getDecorator('Directive')).toBeTruthy(); - }); - - it('usergroupby should not have ng.directive', () => { - const s = testSourceFile({ - project, - file: 'user-group-by.output.ts', - property: 'id', - }); - expect(s.propertyDecorators).toHaveLength(1); - expect(s.propertyDecorators?.find(d => d.name === 'Directive')).toBeFalsy(); - expect(s.namedImports).not.toContainEqual({ - name: 'Directive', - specifier: '@nestjs/graphql', - }); - }); + options: [`outputFilePattern = "{name}.{type}.ts"`], + })); + }); + + it('user model id property', () => { + const s = testSourceFile({ + project, + file: 'user.model.ts', + property: 'id', + }); + expect(s.propertyDecorators?.find(d => d.name === 'Directive')).toBeTruthy(); + expect( + s.propertyDecorators?.find(d => d.name === 'Directive')?.arguments?.[0], + ).toBe("'@external'"); + }); + + it('user model class', () => { + const s = testSourceFile({ + project, + file: 'user.model.ts', + }); + expect(s.namedImports).toContainEqual({ + name: 'Directive', + specifier: '@nestjs/graphql', + }); + expect(s.classFile.getDecorator('Directive')).toBeTruthy(); + }); + + it('usergroupby should not have ng.directive', () => { + const s = testSourceFile({ + project, + file: 'user-group-by.output.ts', + property: 'id', + }); + expect(s.propertyDecorators).toHaveLength(1); + expect(s.propertyDecorators?.find(d => d.name === 'Directive')).toBeFalsy(); + expect(s.namedImports).not.toContainEqual({ + name: 'Directive', + specifier: '@nestjs/graphql', + }); + }); }); describe('hide and decorate', () => { - before(async () => { - ({ project } = await testGenerate({ - schema: ` + before(async () => { + ({ project } = await testGenerate({ + schema: ` model User { id String @id profile Profile? @@ -577,51 +577,51 @@ describe('hide and decorate', () => { userId String @unique } `, - options: [ - `outputFilePattern = "{name}.{type}.ts"`, - `decorate_3_type = "ProfileUncheckedCreateNestedOneWithoutUserInput"`, - `decorate_3_field = "!(create)"`, - `decorate_3_name = "HideField"`, - `decorate_3_from = "@nestjs/graphql"`, - `decorate_3_arguments = "[]"`, - ], - })); - }); - - it('smoke', () => { - expect(project).toBeTruthy(); - const files = project.getSourceFiles().map(s => s.getBaseName()); - expect(files.length).toBeGreaterThan(0); - }); - - it('should keep only create', () => { - const s = testSourceFile({ - project, - class: 'ProfileUncheckedCreateNestedOneWithoutUserInput', - property: 'create', - }); - - expect(s.property?.decorators).not.toContainEqual( - expect.objectContaining({ name: 'HideField' }), - ); - }); - - // eslint-disable-next-line unicorn/no-array-for-each - ['connect', 'connectOrCreate'].forEach(property => { - it(`${property} property should be disabled`, () => { - const s = testSourceFile({ - project, - class: 'ProfileUncheckedCreateNestedOneWithoutUserInput', - property, - }); - - expect(s.property?.decorators).not.toContainEqual( - expect.objectContaining({ name: 'Field' }), - ); - - expect(s.property?.decorators).toContainEqual( - expect.objectContaining({ name: 'HideField' }), - ); - }); - }); + options: [ + `outputFilePattern = "{name}.{type}.ts"`, + `decorate_3_type = "ProfileUncheckedCreateNestedOneWithoutUserInput"`, + `decorate_3_field = "!(create)"`, + `decorate_3_name = "HideField"`, + `decorate_3_from = "@nestjs/graphql"`, + `decorate_3_arguments = "[]"`, + ], + })); + }); + + it('smoke', () => { + expect(project).toBeTruthy(); + const files = project.getSourceFiles().map(s => s.getBaseName()); + expect(files.length).toBeGreaterThan(0); + }); + + it('should keep only create', () => { + const s = testSourceFile({ + project, + class: 'ProfileUncheckedCreateNestedOneWithoutUserInput', + property: 'create', + }); + + expect(s.property?.decorators).not.toContainEqual( + expect.objectContaining({ name: 'HideField' }), + ); + }); + + // eslint-disable-next-line unicorn/no-array-for-each + ['connect', 'connectOrCreate'].forEach(property => { + it(`${property} property should be disabled`, () => { + const s = testSourceFile({ + project, + class: 'ProfileUncheckedCreateNestedOneWithoutUserInput', + property, + }); + + expect(s.property?.decorators).not.toContainEqual( + expect.objectContaining({ name: 'Field' }), + ); + + expect(s.property?.decorators).toContainEqual( + expect.objectContaining({ name: 'HideField' }), + ); + }); + }); }); diff --git a/src/test/generate.spec.ts b/src/test/generate.spec.ts index c9b76cac..9d8c767c 100644 --- a/src/test/generate.spec.ts +++ b/src/test/generate.spec.ts @@ -2,13 +2,13 @@ import expect from 'expect'; import JSON5 from 'json5'; import { trim } from 'lodash'; import { - ClassDeclaration, - ImportDeclarationStructure, - ImportSpecifierStructure, - Project, - PropertyDeclaration, - PropertyDeclarationStructure, - SourceFile, + ClassDeclaration, + ImportDeclarationStructure, + ImportSpecifierStructure, + Project, + PropertyDeclaration, + PropertyDeclarationStructure, + SourceFile, } from 'ts-morph'; import { EventArguments } from '../types'; @@ -26,315 +26,311 @@ let importDeclarations: ImportDeclarationStructure[] = []; const p = (name: string) => getPropertyStructure(sourceFile, name); const d = (name: string) => getPropertyStructure(sourceFile, name)?.decorators?.[0]; const f = (name: string) => - getPropertyStructure(sourceFile, name)?.decorators?.find(d => d.name === 'Field') - ?.arguments; + getPropertyStructure(sourceFile, name)?.decorators?.find(d => d.name === 'Field') + ?.arguments; const t = (name: string) => f(name)?.[0]; const setSourceFile = (name: string) => { - sourceFile = project.getSourceFileOrThrow(s => s.getFilePath().endsWith(name)); - sourceText = sourceFile.getText(); - classFile = sourceFile.getClass(() => true)!; - importDeclarations = sourceFile.getImportDeclarations().map(d => d.getStructure()); - imports = importDeclarations.flatMap(d => - (d.namedImports as ImportSpecifierStructure[]).map(x => ({ - name: x.name, - specifier: d.moduleSpecifier, - })), - ); + sourceFile = project.getSourceFileOrThrow(s => s.getFilePath().endsWith(name)); + sourceText = sourceFile.getText(); + classFile = sourceFile.getClass(() => true)!; + importDeclarations = sourceFile.getImportDeclarations().map(d => d.getStructure()); + imports = importDeclarations.flatMap(d => + (d.namedImports as ImportSpecifierStructure[]).map(x => ({ + name: x.name, + specifier: d.moduleSpecifier, + })), + ); }; const objectTypeArguments = () => - sourceFile - .getClass(() => true) - ?.getDecorator('ObjectType') - ?.getStructure().arguments; + sourceFile + .getClass(() => true) + ?.getDecorator('ObjectType') + ?.getStructure().arguments; describe('model with one id int', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` /// User really model User { /// user id really id Int @id @default(1) }`, - })); - }); - - describe('model', () => { - let s: ReturnType; - before(() => { - s = testSourceFile({ project, file: 'user.model.ts' }); - }); - - it('class should be exported', () => { - expect(s.classFile.isExported()).toBe(true); - }); - - it('argument decorated id', () => { - const { fieldDecoratorType } = testSourceFile({ - project, - file: 'user.model.ts', - property: 'id', - }); - expect(fieldDecoratorType).toEqual('() => ID'); - }); - - it('should have import graphql type id', () => { - expect(s.namedImports).toContainEqual({ - name: 'ID', - specifier: '@nestjs/graphql', - }); - }); - - it('should have import field decorator', () => { - expect(s.namedImports).toContainEqual({ - name: 'Field', - specifier: '@nestjs/graphql', - }); - }); - - it('should have exclamation mark for non null id field', () => { - const s = testSourceFile({ - project, - file: 'user.model.ts', - property: 'id', - }); - expect(s.property?.hasExclamationToken).toEqual(true); - }); - - it('default value', () => { - const s = testSourceFile({ - project, - class: 'User', - property: 'id', - }); - expect(s.fieldDecoratorOptions).toMatch(/nullable:\s*false/); - expect(s.fieldDecoratorOptions).toMatch(/defaultValue:\s*1/); - expect(s.fieldDecoratorOptions).not.toMatch(/description:\s*undefined/); - }); - - it('property description', () => { - const s = testSourceFile({ - project, - file: 'user.model.ts', - property: 'id', - }); - expect(s.fieldDecoratorOptions).toMatch(/nullable:\s*false/); - expect(s.fieldDecoratorOptions).toMatch( - /description:\s*["']user id really["']/, - ); - }); - - it('property description in jsdoc', () => { - const description = s.classFile - .getProperty('id') - ?.getJsDocs()[0] - .getDescription(); - expect(description).toEqual('\nuser id really'); - }); - - it('object type description', () => { - const decoratorArgument = s.classFile.getDecorators()[0].getStructure() - .arguments?.[0] as string | undefined; - expect(decoratorArgument).toMatch(/description:\s*["']User really["']/); - }); - - it('has js comment', () => { - expect(s.classFile.getJsDocs()[0].getDescription()).toEqual( - '\nUser really', - ); - }); + })); + }); - it('has import objecttype', () => { - expect(s.namedImports).toContainEqual({ - name: 'ObjectType', - specifier: '@nestjs/graphql', - }); - }); + describe('model', () => { + let s: ReturnType; + before(() => { + s = testSourceFile({ project, file: 'user.model.ts' }); }); - it('aggregate user output class should be exported', () => { - const s = testSourceFile({ project, file: 'aggregate-user.output.ts' }); - expect(s.classFile.isExported()).toBe(true); + it('class should be exported', () => { + expect(s.classFile.isExported()).toBe(true); }); - it('aggregate user output contains decorator ObjectType', () => { - const s = testSourceFile({ project, file: 'aggregate-user.output.ts' }); - expect(s.namedImports).toContainEqual({ - name: 'ObjectType', - specifier: '@nestjs/graphql', - }); + it('argument decorated id', () => { + const { fieldDecoratorType } = testSourceFile({ + project, + file: 'user.model.ts', + property: 'id', + }); + expect(fieldDecoratorType).toEqual('() => ID'); }); - it('aggregate user output count', () => { - const s = testSourceFile({ - project, - file: 'aggregate-user.output.ts', - property: '_count', - }); - expect(s.property?.type).toEqual('UserCountAggregate'); - expect(s.property?.hasQuestionToken).toEqual(true); + it('should have import graphql type id', () => { + expect(s.namedImports).toContainEqual({ + name: 'ID', + specifier: '@nestjs/graphql', + }); }); - it('user count aggregate (usercountaggregate) id property', () => { - const s = testSourceFile({ - project, - file: 'user-count-aggregate.output.ts', - property: 'id', - }); - expect(s.property?.type).toEqual('number'); - expect(s.fieldDecoratorType).toEqual('() => Int'); - expect(s.property?.hasQuestionToken).toEqual(false); - expect(s.namedImports).toContainEqual({ - name: 'Int', - specifier: '@nestjs/graphql', - }); + it('should have import field decorator', () => { + expect(s.namedImports).toContainEqual({ + name: 'Field', + specifier: '@nestjs/graphql', + }); }); - describe('where input', () => { - it('should have id property', () => { - const { property } = testSourceFile({ - project, - file: 'user-where.input.ts', - property: 'id', - }); - expect(property?.name).toEqual('id'); - }); - - it('should have type IntFilter', () => { - const { property } = testSourceFile({ - project, - file: 'user-where.input.ts', - property: 'id', - }); - expect(property?.type).toEqual('IntFilter'); - }); - - it('field decorator returns IntFilter', () => { - const { fieldDecoratorType } = testSourceFile({ - project, - file: 'user-where.input.ts', - property: 'id', - }); - expect(fieldDecoratorType).toEqual('() => IntFilter'); - }); - - it('field decorator IntFilter nullable', () => { - const { fieldDecoratorOptions } = testSourceFile({ - project, - file: 'user-where.input.ts', - property: 'id', - }); - expect(fieldDecoratorOptions).toMatch(/nullable:\s*true/); - }); - - it('property AND has one type', () => { - const { property } = testSourceFile({ - project, - file: 'user-where.input.ts', - property: 'AND', - }); - expect(property?.type).toEqual('Array'); - }); + it('should have exclamation mark for non null id field', () => { + const s = testSourceFile({ + project, + file: 'user.model.ts', + property: 'id', + }); + expect(s.property?.hasExclamationToken).toEqual(true); + }); + + it('default value', () => { + const s = testSourceFile({ + project, + class: 'User', + property: 'id', + }); + expect(s.fieldDecoratorOptions).toMatch(/nullable:\s*false/); + expect(s.fieldDecoratorOptions).toMatch(/defaultValue:\s*1/); + expect(s.fieldDecoratorOptions).not.toMatch(/description:\s*undefined/); + }); + + it('property description', () => { + const s = testSourceFile({ + project, + file: 'user.model.ts', + property: 'id', + }); + expect(s.fieldDecoratorOptions).toMatch(/nullable:\s*false/); + expect(s.fieldDecoratorOptions).toMatch(/description:\s*["']user id really["']/); + }); + + it('property description in jsdoc', () => { + const description = s.classFile + .getProperty('id') + ?.getJsDocs()[0] + .getDescription(); + expect(description).toEqual('\nuser id really'); + }); + + it('object type description', () => { + const decoratorArgument = s.classFile.getDecorators()[0].getStructure() + .arguments?.[0] as string | undefined; + expect(decoratorArgument).toMatch(/description:\s*["']User really["']/); + }); + + it('has js comment', () => { + expect(s.classFile.getJsDocs()[0].getDescription()).toEqual('\nUser really'); }); - describe('aggregate user args', () => { - before(() => { - setSourceFile('user-aggregate.args.ts'); - classFile = sourceFile.getClass(() => true)!; - }); - - it('decorator name args', () => { - const { classFile } = testSourceFile({ - project, - file: 'user-aggregate.args.ts', - }); - const decorator = classFile.getDecorator('ArgsType'); - expect(decorator?.getText()).toEqual('@ArgsType()'); - }); - - it('no duplicated properties', () => { - const names = sourceFile - .getClass(() => true) - ?.getProperties() - .map(p => p.getName())!; - expect([...new Set(names).values()]).toHaveLength(names.length); - }); + it('has import objecttype', () => { + expect(s.namedImports).toContainEqual({ + name: 'ObjectType', + specifier: '@nestjs/graphql', + }); + }); + }); - it('count', () => { - expect(p('_count')?.type).toEqual('UserCountAggregateInput'); - }); + it('aggregate user output class should be exported', () => { + const s = testSourceFile({ project, file: 'aggregate-user.output.ts' }); + expect(s.classFile.isExported()).toBe(true); + }); + + it('aggregate user output contains decorator ObjectType', () => { + const s = testSourceFile({ project, file: 'aggregate-user.output.ts' }); + expect(s.namedImports).toContainEqual({ + name: 'ObjectType', + specifier: '@nestjs/graphql', + }); + }); + + it('aggregate user output count', () => { + const s = testSourceFile({ + project, + file: 'aggregate-user.output.ts', + property: '_count', + }); + expect(s.property?.type).toEqual('UserCountAggregate'); + expect(s.property?.hasQuestionToken).toEqual(true); + }); + + it('user count aggregate (usercountaggregate) id property', () => { + const s = testSourceFile({ + project, + file: 'user-count-aggregate.output.ts', + property: 'id', + }); + expect(s.property?.type).toEqual('number'); + expect(s.fieldDecoratorType).toEqual('() => Int'); + expect(s.property?.hasQuestionToken).toEqual(false); + expect(s.namedImports).toContainEqual({ + name: 'Int', + specifier: '@nestjs/graphql', + }); + }); + + describe('where input', () => { + it('should have id property', () => { + const { property } = testSourceFile({ + project, + file: 'user-where.input.ts', + property: 'id', + }); + expect(property?.name).toEqual('id'); + }); + + it('should have type IntFilter', () => { + const { property } = testSourceFile({ + project, + file: 'user-where.input.ts', + property: 'id', + }); + expect(property?.type).toEqual('IntFilter'); + }); + + it('field decorator returns IntFilter', () => { + const { fieldDecoratorType } = testSourceFile({ + project, + file: 'user-where.input.ts', + property: 'id', + }); + expect(fieldDecoratorType).toEqual('() => IntFilter'); + }); + + it('field decorator IntFilter nullable', () => { + const { fieldDecoratorOptions } = testSourceFile({ + project, + file: 'user-where.input.ts', + property: 'id', + }); + expect(fieldDecoratorOptions).toMatch(/nullable:\s*true/); + }); + + it('property AND has one type', () => { + const { property } = testSourceFile({ + project, + file: 'user-where.input.ts', + property: 'AND', + }); + expect(property?.type).toEqual('Array'); + }); + }); + + describe('aggregate user args', () => { + before(() => { + setSourceFile('user-aggregate.args.ts'); + classFile = sourceFile.getClass(() => true)!; + }); + + it('decorator name args', () => { + const { classFile } = testSourceFile({ + project, + file: 'user-aggregate.args.ts', + }); + const decorator = classFile.getDecorator('ArgsType'); + expect(decorator?.getText()).toEqual('@ArgsType()'); + }); + + it('no duplicated properties', () => { + const names = sourceFile + .getClass(() => true) + ?.getProperties() + .map(p => p.getName())!; + expect([...new Set(names).values()]).toHaveLength(names.length); + }); - it('sum', () => { - expect(p('_sum')?.type).toEqual('UserSumAggregateInput'); - }); + it('count', () => { + expect(p('_count')?.type).toEqual('UserCountAggregateInput'); + }); - it('min', () => { - expect(p('_min')?.type).toEqual('UserMinAggregateInput'); - }); + it('sum', () => { + expect(p('_sum')?.type).toEqual('UserSumAggregateInput'); + }); - it('max', () => { - expect(p('_max')?.type).toEqual('UserMaxAggregateInput'); - }); + it('min', () => { + expect(p('_min')?.type).toEqual('UserMinAggregateInput'); }); - describe('user count aggregate input', () => { - let id: PropertyDeclarationStructure; - before(() => { - setSourceFile('user-count-aggregate.input.ts'); - id = getPropertyStructure(sourceFile, 'id')!; - }); + it('max', () => { + expect(p('_max')?.type).toEqual('UserMaxAggregateInput'); + }); + }); - it('property id should have true type', () => { - const s = testSourceFile({ - project, - file: 'user-count-aggregate.input.ts', - property: 'id', - }); + describe('user count aggregate input', () => { + let id: PropertyDeclarationStructure; + before(() => { + setSourceFile('user-count-aggregate.input.ts'); + id = getPropertyStructure(sourceFile, 'id')!; + }); - expect(s.property?.type).toEqual('true'); - }); + it('property id should have true type', () => { + const s = testSourceFile({ + project, + file: 'user-count-aggregate.input.ts', + property: 'id', + }); - it('nullable', () => { - expect(id.hasQuestionToken).toEqual(true); - }); + expect(s.property?.type).toEqual('true'); + }); - it('decorated field type should be boolean', () => { - const argument = t('id'); - expect(argument).toEqual('() => Boolean'); - }); + it('nullable', () => { + expect(id.hasQuestionToken).toEqual(true); }); - it('rename to user-group-by args', () => { - const s = testSourceFile({ - project, - file: 'user-group-by.args.ts', - }); + it('decorated field type should be boolean', () => { + const argument = t('id'); + expect(argument).toEqual('() => Boolean'); + }); + }); - expect(s.classFile.getName()).toEqual('UserGroupByArgs'); + it('rename to user-group-by args', () => { + const s = testSourceFile({ + project, + file: 'user-group-by.args.ts', }); - it('rename to user aggregateargs', () => { - const s = testSourceFile({ - project, - file: 'user-aggregate.args.ts', - }); + expect(s.classFile.getName()).toEqual('UserGroupByArgs'); + }); - expect(s.classFile.getName()).toEqual('UserAggregateArgs'); + it('rename to user aggregateargs', () => { + const s = testSourceFile({ + project, + file: 'user-aggregate.args.ts', }); + + expect(s.classFile.getName()).toEqual('UserAggregateArgs'); + }); }); describe('duplicated', () => { - it('duplicated fields in exising file', async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + it('duplicated fields in exising file', async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` model User { id Int @id } `, - createSouceFile: { - type: 'input', - name: 'UserCreateInput', - text: ` + createSouceFile: { + type: 'input', + name: 'UserCreateInput', + text: ` import { Int } from '@nestjs/graphql'; @InputType() export class UserCreateInput { @@ -343,27 +339,27 @@ describe('duplicated', () => { }) id?: string; `, - }, - })); - setSourceFile('/user-create.input.ts'); - const classFile = sourceFile.getClass(() => true)!; - const names = classFile.getProperties().map(p => p.getName()); - expect(names).toStrictEqual(['id']); - }); + }, + })); + setSourceFile('/user-create.input.ts'); + const classFile = sourceFile.getClass(() => true)!; + const names = classFile.getProperties().map(p => p.getName()); + expect(names).toStrictEqual(['id']); + }); - it('duplicated import decorators', async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + it('duplicated import decorators', async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` model User { id Int @id xl Int xs Int } `, - createSouceFile: { - type: 'model', - name: 'User', - text: ` + createSouceFile: { + type: 'model', + name: 'User', + text: ` import { Field, ObjectType } from '@nestjs/graphql'; import { Int, ID } from '@nestjs/graphql'; @ObjectType() @@ -372,18 +368,18 @@ describe('duplicated', () => { @Field(() => Int) xl: number; @Field(() => Int) xs: number; `, - }, - })); - setSourceFile('user.model.ts'); - expect(imports.filter(x => x.name === 'Field')).toHaveLength(1); - expect(imports.filter(x => x.name === 'ObjectType')).toHaveLength(1); - }); + }, + })); + setSourceFile('user.model.ts'); + expect(imports.filter(x => x.name === 'Field')).toHaveLength(1); + expect(imports.filter(x => x.name === 'ObjectType')).toHaveLength(1); + }); }); describe('one model with scalar types', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: `model User { + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: `model User { id String @id count Int rating Float @@ -393,299 +389,291 @@ describe('one model with scalar types', () => { data Json biggy BigInt }`, - })); - // const filePaths = sourceFiles.map(s => s.getFilePath()); + })); + // const filePaths = sourceFiles.map(s => s.getFilePath()); + }); + + describe('user model', () => { + before(() => { + setSourceFile('user.model.ts'); }); + describe('property types', () => { + it('boolean', () => { + expect(getPropertyStructure(sourceFile, 'humanoid')?.type).toEqual('boolean'); + }); - describe('user model', () => { - before(() => { - setSourceFile('user.model.ts'); - }); - describe('property types', () => { - it('boolean', () => { - expect(getPropertyStructure(sourceFile, 'humanoid')?.type).toEqual( - 'boolean', - ); - }); - - it('rating', () => { - expect(getPropertyStructure(sourceFile, 'rating')?.type).toEqual( - 'number', - ); - }); - - it('count', () => { - expect(getPropertyStructure(sourceFile, 'count')?.type).toEqual( - 'number', - ); - }); - - it('born', () => { - expect(getPropertyStructure(sourceFile, 'born')?.type).toEqual('Date'); - }); - - it('big int', () => { - expect(p('biggy')?.type).toEqual('bigint'); - }); - - it('money', () => { - expect(p('money')?.type).toEqual('Decimal'); - }); - }); + it('rating', () => { + expect(getPropertyStructure(sourceFile, 'rating')?.type).toEqual('number'); + }); - describe('json type', () => { - it('should import graphqljson', () => { - expect(imports).toContainEqual({ - name: 'GraphQLJSON', - specifier: 'graphql-type-json', - }); - }); - - it('field decorator should return custom graphqljson type', () => { - expect(t('data')).toEqual('() => GraphQLJSON'); - }); - }); - }); + it('count', () => { + expect(getPropertyStructure(sourceFile, 'count')?.type).toEqual('number'); + }); - describe('datetime filter', () => { - before(() => { - sourceFile = project.getSourceFile(s => - s.getFilePath().endsWith('/date-time-filter.input.ts'), - )!; - }); + it('born', () => { + expect(getPropertyStructure(sourceFile, 'born')?.type).toEqual('Date'); + }); - it('equals field type Date', () => { - expect(t('equals')).toEqual('() => Date'); - }); + it('big int', () => { + expect(p('biggy')?.type).toEqual('bigint'); + }); - it('equals is optional', () => { - const structure = getPropertyStructure(sourceFile, 'equals'); - expect(structure?.hasQuestionToken).toEqual(true); - expect(getFieldOptions(sourceFile, 'equals')).toMatch(/nullable:\s*true/); - }); + it('money', () => { + expect(p('money')?.type).toEqual('Decimal'); + }); + }); - it('not property should be object type', () => { - expect(t('not')).toContain('DateTimeFilter'); + describe('json type', () => { + it('should import graphqljson', () => { + expect(imports).toContainEqual({ + name: 'GraphQLJSON', + specifier: 'graphql-type-json', }); + }); - it('compatiblity datetime filter', () => { - const classFile = sourceFile.getClass('DateTimeFilter')!; - const fieldIn = classFile.getProperty('in')!; - expect(fieldIn.getStructure().type).toEqual('Array | Array'); - }); + it('field decorator should return custom graphqljson type', () => { + expect(t('data')).toEqual('() => GraphQLJSON'); + }); }); + }); - describe('user where input', () => { - before(() => { - setSourceFile('user-where.input.ts'); - }); + describe('datetime filter', () => { + before(() => { + sourceFile = project.getSourceFile(s => + s.getFilePath().endsWith('/date-time-filter.input.ts'), + )!; + }); - it('number should have int filter', () => { - const structure = getPropertyStructure(sourceFile, 'count'); - expect(structure?.type).toEqual('IntFilter'); - }); + it('equals field type Date', () => { + expect(t('equals')).toEqual('() => Date'); + }); - it('decorator argument int filter', () => { - const p = t('count'); - expect(p).toEqual('() => IntFilter'); - }); + it('equals is optional', () => { + const structure = getPropertyStructure(sourceFile, 'equals'); + expect(structure?.hasQuestionToken).toEqual(true); + expect(getFieldOptions(sourceFile, 'equals')).toMatch(/nullable:\s*true/); + }); - it('contains scalar filters', () => { - expect(imports).toContainEqual({ - name: 'StringFilter', - specifier: '../prisma/string-filter.input', - }); - expect(imports).toContainEqual({ - name: 'IntFilter', - specifier: '../prisma/int-filter.input', - }); - }); + it('not property should be object type', () => { + expect(t('not')).toContain('DateTimeFilter'); }); - describe('string filter input', () => { - before(() => { - sourceFile = project.getSourceFile(s => - s.getFilePath().endsWith('/string-filter.input.ts'), - )!; - }); + it('compatiblity datetime filter', () => { + const classFile = sourceFile.getClass('DateTimeFilter')!; + const fieldIn = classFile.getProperty('in')!; + expect(fieldIn.getStructure().type).toEqual('Array | Array'); + }); + }); - it('properties and types', () => { - const properties = sourceFile.getClass(() => true)?.getProperties(); - const structure = (name: string) => - properties?.find(x => x.getName() === name)?.getStructure(); - - expect(structure('equals')?.type).toEqual('string'); - expect(structure('lt')?.type).toEqual('string'); - expect(structure('lte')?.type).toEqual('string'); - expect(structure('gt')?.type).toEqual('string'); - expect(structure('gte')?.type).toEqual('string'); - expect(structure('contains')?.type).toEqual('string'); - expect(structure('startsWith')?.type).toEqual('string'); - expect(structure('endsWith')?.type).toEqual('string'); - - expect(structure('in')?.type).toEqual('Array'); - expect(structure('notIn')?.type).toEqual('Array'); - }); + describe('user where input', () => { + before(() => { + setSourceFile('user-where.input.ts'); }); - describe('user create input', () => { - before(() => { - setSourceFile('/user-create.input.ts'); - }); + it('number should have int filter', () => { + const structure = getPropertyStructure(sourceFile, 'count'); + expect(structure?.type).toEqual('IntFilter'); + }); - it('valid imports', () => { - expect(sourceText).not.toContain("import ';"); - }); + it('decorator argument int filter', () => { + const p = t('count'); + expect(p).toEqual('() => IntFilter'); + }); - it('imports', () => { - expect(imports).toContainEqual({ - name: 'InputType', - specifier: '@nestjs/graphql', - }); - expect(imports).toContainEqual({ - name: 'Int', - specifier: '@nestjs/graphql', - }); - }); + it('contains scalar filters', () => { + expect(imports).toContainEqual({ + name: 'StringFilter', + specifier: '../prisma/string-filter.input', + }); + expect(imports).toContainEqual({ + name: 'IntFilter', + specifier: '../prisma/int-filter.input', + }); + }); + }); - it('id field type is string', () => { - const id = t('id'); - expect(id).toEqual('() => String'); - }); + describe('string filter input', () => { + before(() => { + sourceFile = project.getSourceFile(s => + s.getFilePath().endsWith('/string-filter.input.ts'), + )!; + }); - it('float property', () => { - const property = getPropertyStructure(sourceFile, 'rating'); - expect(property?.type).toEqual('number'); - }); + it('properties and types', () => { + const properties = sourceFile.getClass(() => true)?.getProperties(); + const structure = (name: string) => + properties?.find(x => x.getName() === name)?.getStructure(); - it('data property (json)', () => { - expect(t('data')).toEqual('() => GraphQLJSON'); - }); + expect(structure('equals')?.type).toEqual('string'); + expect(structure('lt')?.type).toEqual('string'); + expect(structure('lte')?.type).toEqual('string'); + expect(structure('gt')?.type).toEqual('string'); + expect(structure('gte')?.type).toEqual('string'); + expect(structure('contains')?.type).toEqual('string'); + expect(structure('startsWith')?.type).toEqual('string'); + expect(structure('endsWith')?.type).toEqual('string'); - it('native string should not be imported', () => { - expect(imports).not.toContainEqual( - expect.objectContaining({ name: 'String' }), - ); - }); + expect(structure('in')?.type).toEqual('Array'); + expect(structure('notIn')?.type).toEqual('Array'); }); + }); - describe('json filter', () => { - before(() => { - sourceFile = project.getSourceFile(s => - s.getFilePath().endsWith('/json-filter.input.ts'), - )!; - }); + describe('user create input', () => { + before(() => { + setSourceFile('/user-create.input.ts'); + }); - it('not field should be json filter', () => { - const not = p('not'); - expect(not?.type).toEqual('any'); - }); + it('valid imports', () => { + expect(sourceText).not.toContain("import ';"); + }); - it('field type should be GraphQLJSON', () => { - expect(t('not')).toEqual('() => GraphQLJSON'); - }); + it('imports', () => { + expect(imports).toContainEqual({ + name: 'InputType', + specifier: '@nestjs/graphql', + }); + expect(imports).toContainEqual({ + name: 'Int', + specifier: '@nestjs/graphql', + }); }); -}); -describe('decimal type', () => { - before(async () => { - ({ project } = await testGenerate({ - schema: ` - model User { - id String @id - money Decimal - maybe Decimal? - } - `, - options: [`outputFilePattern = "{name}.{type}.ts"`], - })); + it('id field type is string', () => { + const id = t('id'); + expect(id).toEqual('() => String'); }); - it('user model money', () => { - const s = testSourceFile({ - project, - file: 'user.model.ts', - property: 'money', - }); - expect(s.property?.type).toEqual('Decimal'); - expect(s.namedImports).toContainEqual({ - name: 'Decimal', - specifier: '@prisma/client/runtime', - }); + it('float property', () => { + const property = getPropertyStructure(sourceFile, 'rating'); + expect(property?.type).toEqual('number'); }); - it('user model nullish', () => { - const s = testSourceFile({ - project, - file: 'user.model.ts', - property: 'maybe', - }); - expect(s.property?.type).toEqual('Decimal | null'); - expect(s.namedImports).toContainEqual({ - name: 'Decimal', - specifier: '@prisma/client/runtime', - }); + it('data property (json)', () => { + expect(t('data')).toEqual('() => GraphQLJSON'); }); - it('user input money', () => { - const s = testSourceFile({ - project, - file: 'user-create.input.ts', - property: 'money', - }); - expect(s.property?.type).toEqual('Decimal'); - expect(s.namedImports).toContainEqual({ - name: 'Decimal', - specifier: '@prisma/client/runtime', - }); + it('native string should not be imported', () => { + expect(imports).not.toContainEqual(expect.objectContaining({ name: 'String' })); }); + }); - it('user input maybe', () => { - const s = testSourceFile({ - project, - file: 'user-create.input.ts', - property: 'maybe', - }); - expect(s.property?.type).toEqual('Decimal'); - expect(s.property?.hasQuestionToken).toEqual(true); - expect(s.namedImports).toContainEqual({ - name: 'Decimal', - specifier: '@prisma/client/runtime', - }); + describe('json filter', () => { + before(() => { + sourceFile = project.getSourceFile(s => + s.getFilePath().endsWith('/json-filter.input.ts'), + )!; }); - it('user aggregate output money', () => { - const s = testSourceFile({ - project, - file: 'user-sum-aggregate.output.ts', - property: 'money', - }); - expect(s.property?.type).toEqual('Decimal'); - expect(s.namedImports).toContainEqual({ - name: 'Decimal', - specifier: '@prisma/client/runtime', - }); + it('not field should be json filter', () => { + const not = p('not'); + expect(not?.type).toEqual('any'); }); - it('user aggregate output maybe', () => { - const s = testSourceFile({ - project, - file: 'user-sum-aggregate.output.ts', - property: 'maybe', - }); - expect(s.property?.type).toEqual('Decimal'); - expect(s.property?.hasQuestionToken).toEqual(true); - expect(s.namedImports).toContainEqual({ - name: 'Decimal', - specifier: '@prisma/client/runtime', - }); + it('field type should be GraphQLJSON', () => { + expect(t('not')).toEqual('() => GraphQLJSON'); }); + }); +}); + +describe('decimal type', () => { + before(async () => { + ({ project } = await testGenerate({ + schema: ` + model User { + id String @id + money Decimal + maybe Decimal? + } + `, + options: [`outputFilePattern = "{name}.{type}.ts"`], + })); + }); + + it('user model money', () => { + const s = testSourceFile({ + project, + file: 'user.model.ts', + property: 'money', + }); + expect(s.property?.type).toEqual('Decimal'); + expect(s.namedImports).toContainEqual({ + name: 'Decimal', + specifier: '@prisma/client/runtime', + }); + }); + + it('user model nullish', () => { + const s = testSourceFile({ + project, + file: 'user.model.ts', + property: 'maybe', + }); + expect(s.property?.type).toEqual('Decimal | null'); + expect(s.namedImports).toContainEqual({ + name: 'Decimal', + specifier: '@prisma/client/runtime', + }); + }); + + it('user input money', () => { + const s = testSourceFile({ + project, + file: 'user-create.input.ts', + property: 'money', + }); + expect(s.property?.type).toEqual('Decimal'); + expect(s.namedImports).toContainEqual({ + name: 'Decimal', + specifier: '@prisma/client/runtime', + }); + }); + + it('user input maybe', () => { + const s = testSourceFile({ + project, + file: 'user-create.input.ts', + property: 'maybe', + }); + expect(s.property?.type).toEqual('Decimal'); + expect(s.property?.hasQuestionToken).toEqual(true); + expect(s.namedImports).toContainEqual({ + name: 'Decimal', + specifier: '@prisma/client/runtime', + }); + }); + + it('user aggregate output money', () => { + const s = testSourceFile({ + project, + file: 'user-sum-aggregate.output.ts', + property: 'money', + }); + expect(s.property?.type).toEqual('Decimal'); + expect(s.namedImports).toContainEqual({ + name: 'Decimal', + specifier: '@prisma/client/runtime', + }); + }); + + it('user aggregate output maybe', () => { + const s = testSourceFile({ + project, + file: 'user-sum-aggregate.output.ts', + property: 'maybe', + }); + expect(s.property?.type).toEqual('Decimal'); + expect(s.property?.hasQuestionToken).toEqual(true); + expect(s.namedImports).toContainEqual({ + name: 'Decimal', + specifier: '@prisma/client/runtime', + }); + }); }); describe('model with scalar nullable types', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: `model User { + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: `model User { id String @id count Int? rating Float? @@ -695,44 +683,44 @@ describe('model with scalar nullable types', () => { data Json? biggy BigInt? }`, - options: [`outputFilePattern = "{name}.{type}.ts"`], - })); - }); + options: [`outputFilePattern = "{name}.{type}.ts"`], + })); + }); - it('nullable json', () => { - setSourceFile('user-create.input.ts'); - expect(p('data')?.type).toEqual('any'); - }); + it('nullable json', () => { + setSourceFile('user-create.input.ts'); + expect(p('data')?.type).toEqual('any'); + }); }); describe('scalar list type', () => { - describe('general', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + describe('general', () => { + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` model User { id Int @id permissions String[] }`, - })); - }); + })); + }); - it('smoke', () => { - expect(sourceFiles.length).toBeTruthy(); - }); + it('smoke', () => { + expect(sourceFiles.length).toBeTruthy(); + }); - it('user create input', () => { - setSourceFile('user-create.input.ts'); - expect(p('permissions')?.type).toEqual('UserCreatepermissionsInput'); - expect(t('permissions')).toEqual('() => UserCreatepermissionsInput'); - }); + it('user create input', () => { + setSourceFile('user-create.input.ts'); + expect(p('permissions')?.type).toEqual('UserCreatepermissionsInput'); + expect(t('permissions')).toEqual('() => UserCreatepermissionsInput'); }); + }); }); describe('nullish compatibility', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` model User { id String @id count Int? @@ -761,69 +749,69 @@ describe('nullish compatibility', () => { USER } `, - options: [`outputFilePattern = "{name}.{type}.ts"`], - })); - setSourceFile('user.model.ts'); - }); - - it('number', () => { - const s = testSourceFile({ project, file: 'user.model.ts', property: 'count' }); - - expect(s.property?.type).toEqual('number | null'); - expect(s.property?.hasQuestionToken).toBe(false); - }); - - it('born', () => { - const s = testSourceFile({ project, file: 'user.model.ts', property: 'born' }); - - expect(s.property?.type).toEqual('Date | null'); - expect(s.property?.hasQuestionToken).toBe(false); - }); - - it('money', () => { - const s = testSourceFile({ project, file: 'user.model.ts', property: 'money' }); - expect(s.property?.type).toEqual('Decimal | null'); - expect(s.property?.hasQuestionToken).toBe(false); - expect(imports).toContainEqual({ - name: 'GraphQLDecimal', - specifier: 'prisma-graphql-type-decimal', - }); - }); - - it('data', () => { - const s = testSourceFile({ project, file: 'user.model.ts', property: 'data' }); - expect(s.property?.type).toEqual('any | null'); - expect(imports).toContainEqual({ - name: 'GraphQLJSON', - specifier: 'graphql-type-json', - }); - }); - - describe('relation fields should hasQuestionToken (optional)', () => { - it('profile', () => { - const s = testSourceFile({ - project, - file: 'user.model.ts', - property: 'profile', - }); - expect(s.property?.hasQuestionToken).toBe(true); - }); - - it('posts', () => { - const s = testSourceFile({ - project, - file: 'user.model.ts', - property: 'posts', - }); - expect(s.property?.hasQuestionToken).toBe(true); - }); - }); + options: [`outputFilePattern = "{name}.{type}.ts"`], + })); + setSourceFile('user.model.ts'); + }); + + it('number', () => { + const s = testSourceFile({ project, file: 'user.model.ts', property: 'count' }); + + expect(s.property?.type).toEqual('number | null'); + expect(s.property?.hasQuestionToken).toBe(false); + }); + + it('born', () => { + const s = testSourceFile({ project, file: 'user.model.ts', property: 'born' }); + + expect(s.property?.type).toEqual('Date | null'); + expect(s.property?.hasQuestionToken).toBe(false); + }); + + it('money', () => { + const s = testSourceFile({ project, file: 'user.model.ts', property: 'money' }); + expect(s.property?.type).toEqual('Decimal | null'); + expect(s.property?.hasQuestionToken).toBe(false); + expect(imports).toContainEqual({ + name: 'GraphQLDecimal', + specifier: 'prisma-graphql-type-decimal', + }); + }); + + it('data', () => { + const s = testSourceFile({ project, file: 'user.model.ts', property: 'data' }); + expect(s.property?.type).toEqual('any | null'); + expect(imports).toContainEqual({ + name: 'GraphQLJSON', + specifier: 'graphql-type-json', + }); + }); + + describe('relation fields should hasQuestionToken (optional)', () => { + it('profile', () => { + const s = testSourceFile({ + project, + file: 'user.model.ts', + property: 'profile', + }); + expect(s.property?.hasQuestionToken).toBe(true); + }); + + it('posts', () => { + const s = testSourceFile({ + project, + file: 'user.model.ts', + property: 'posts', + }); + expect(s.property?.hasQuestionToken).toBe(true); + }); + }); }); describe('one model with enum', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` /// Role really enum Role { USER @@ -834,152 +822,152 @@ describe('one model with enum', () => { role Role permissions String[] }`, - })); - }); + })); + }); - it('should import registerEnumType', () => { - const s = testSourceFile({ project, file: 'sort-order.enum.ts' }); - expect(s.namedImports).toContainEqual({ - name: 'registerEnumType', - specifier: '@nestjs/graphql', - }); + it('should import registerEnumType', () => { + const s = testSourceFile({ project, file: 'sort-order.enum.ts' }); + expect(s.namedImports).toContainEqual({ + name: 'registerEnumType', + specifier: '@nestjs/graphql', }); + }); - it('should register SortOrder', () => { - const s = testSourceFile({ project, file: 'sort-order.enum.ts' }); - expect(s.sourceText).toContain( - `registerEnumType(SortOrder, { name: 'SortOrder', description: undefined })`, - ); - }); + it('should register SortOrder', () => { + const s = testSourceFile({ project, file: 'sort-order.enum.ts' }); + expect(s.sourceText).toContain( + `registerEnumType(SortOrder, { name: 'SortOrder', description: undefined })`, + ); + }); - it('should have asc value', () => { - const s = testSourceFile({ project, file: 'sort-order.enum.ts' }); - const members = s.sourceFile.getEnum('SortOrder')?.getStructure().members; + it('should have asc value', () => { + const s = testSourceFile({ project, file: 'sort-order.enum.ts' }); + const members = s.sourceFile.getEnum('SortOrder')?.getStructure().members; - expect(members).toContainEqual( - expect.objectContaining({ - name: 'asc', - initializer: '"asc"', - }), - ); - }); + expect(members).toContainEqual( + expect.objectContaining({ + name: 'asc', + initializer: '"asc"', + }), + ); + }); - it('should have desc value', () => { - const s = testSourceFile({ project, file: 'sort-order.enum.ts' }); - const members = s.sourceFile.getEnum('SortOrder')?.getStructure().members; + it('should have desc value', () => { + const s = testSourceFile({ project, file: 'sort-order.enum.ts' }); + const members = s.sourceFile.getEnum('SortOrder')?.getStructure().members; - expect(members).toContainEqual( - expect.objectContaining({ - name: 'desc', - initializer: '"desc"', - }), - ); - }); + expect(members).toContainEqual( + expect.objectContaining({ + name: 'desc', + initializer: '"desc"', + }), + ); + }); - describe('role enum', () => { - before(() => { - setSourceFile('role.enum.ts'); - }); + describe('role enum', () => { + before(() => { + setSourceFile('role.enum.ts'); + }); - it('should contains import registerEnumType with name role', () => { - expect(sourceText).toContain(`registerEnumType(Role,`); - expect(sourceText).toContain(`name: 'Role'`); - }); + it('should contains import registerEnumType with name role', () => { + expect(sourceText).toContain(`registerEnumType(Role,`); + expect(sourceText).toContain(`name: 'Role'`); + }); - it('should contains', () => { - expect(sourceText).toContain(`description: "Role really"`); - }); + it('should contains', () => { + expect(sourceText).toContain(`description: "Role really"`); }); + }); - describe('model', () => { - before(() => { - setSourceFile('user.model.ts'); - }); + describe('model', () => { + before(() => { + setSourceFile('user.model.ts'); + }); - it('should import Role as enum', () => { - expect(imports).toContainEqual({ - name: 'Role', - specifier: '../prisma/role.enum', - }); - }); + it('should import Role as enum', () => { + expect(imports).toContainEqual({ + name: 'Role', + specifier: '../prisma/role.enum', + }); + }); - it('role type should use typeof keyof trick', () => { - const role = p('role'); - expect(role?.type).toEqual('keyof typeof Role'); - }); + it('role type should use typeof keyof trick', () => { + const role = p('role'); + expect(role?.type).toEqual('keyof typeof Role'); }); + }); }); describe('one model with self reference', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: `model User { + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: `model User { id Int @id parentId Int parent User @relation("UserToUser", fields: [parentId], references: [id]) user User[] @relation("UserToUser") }`, - })); + })); + }); + + it('with relation input', () => { + const s = testSourceFile({ + project, + file: 'user-order-by-with-relation-and-search-relevance.input.ts', }); - it('with relation input', () => { - const s = testSourceFile({ - project, - file: 'user-order-by-with-relation-and-search-relevance.input.ts', - }); + expect(s.namedImports).not.toContainEqual( + expect.objectContaining({ + name: 'UserOrderByWithRelationAndSearchRelevanceInput', + }), + ); + }); - expect(s.namedImports).not.toContainEqual( - expect.objectContaining({ - name: 'UserOrderByWithRelationAndSearchRelevanceInput', - }), - ); + describe('model', () => { + it('should not contain import to self file', () => { + const s = testSourceFile({ project, file: 'user.model.ts' }); + expect(s.namedImports).not.toContainEqual( + expect.objectContaining({ name: 'User' }), + ); }); - describe('model', () => { - it('should not contain import to self file', () => { - const s = testSourceFile({ project, file: 'user.model.ts' }); - expect(s.namedImports).not.toContainEqual( - expect.objectContaining({ name: 'User' }), - ); - }); - - it('imports should contain user count', () => { - const s = testSourceFile({ project, file: 'user.model.ts' }); - expect(s.namedImports).toContainEqual({ - name: 'UserCount', - specifier: './user-count.output', - }); - }); + it('imports should contain user count', () => { + const s = testSourceFile({ project, file: 'user.model.ts' }); + expect(s.namedImports).toContainEqual({ + name: 'UserCount', + specifier: './user-count.output', + }); }); + }); - describe('user list relation filter', () => { - before(() => { - sourceFile = project.getSourceFile(s => - s.getFilePath().endsWith('/user-list-relation-filter.input.ts'), - )!; - }); + describe('user list relation filter', () => { + before(() => { + sourceFile = project.getSourceFile(s => + s.getFilePath().endsWith('/user-list-relation-filter.input.ts'), + )!; + }); - it('every', () => { - const structure = getPropertyStructure(sourceFile, 'every'); - expect(structure?.type).toEqual('UserWhereInput'); - }); + it('every', () => { + const structure = getPropertyStructure(sourceFile, 'every'); + expect(structure?.type).toEqual('UserWhereInput'); + }); - it('some', () => { - const structure = getPropertyStructure(sourceFile, 'some'); - expect(structure?.type).toEqual('UserWhereInput'); - }); + it('some', () => { + const structure = getPropertyStructure(sourceFile, 'some'); + expect(structure?.type).toEqual('UserWhereInput'); + }); - it('none', () => { - const structure = getPropertyStructure(sourceFile, 'none'); - expect(structure?.type).toEqual('UserWhereInput'); - }); + it('none', () => { + const structure = getPropertyStructure(sourceFile, 'none'); + expect(structure?.type).toEqual('UserWhereInput'); }); + }); }); describe('two models with id only and relation', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` model User { id Int @id posts Post[] @@ -991,138 +979,136 @@ describe('two models with id only and relation', () => { userId Int? } `, - })); - }); + })); + }); - describe('user model', () => { - before(() => { - sourceFile = project.getSourceFile(s => - s.getFilePath().endsWith('/user.model.ts'), - )!; - }); + describe('user model', () => { + before(() => { + sourceFile = project.getSourceFile(s => + s.getFilePath().endsWith('/user.model.ts'), + )!; + }); - it('posts property', () => { - const p = getPropertyStructure(sourceFile, 'posts'); - expect(p?.type).toEqual('Array'); - }); + it('posts property', () => { + const p = getPropertyStructure(sourceFile, 'posts'); + expect(p?.type).toEqual('Array'); }); + }); }); it('enum with exists source', async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: `enum Role { + ({ project, sourceFiles } = await testGenerate({ + schema: `enum Role { USER } model User { id Int @id role Role }`, - createSouceFile: { - name: 'Role', - type: 'enum', - text: ` + createSouceFile: { + name: 'Role', + type: 'enum', + text: ` export enum Role { USER = "USER" } registerEnumType(Role, { name: 'Role' }) `, - }, - })); + }, + })); - sourceFile = project.getSourceFile(s => s.getFilePath().includes('role.enum.ts'))!; - sourceText = sourceFile.getText(); + sourceFile = project.getSourceFile(s => s.getFilePath().includes('role.enum.ts'))!; + sourceText = sourceFile.getText(); - expect(sourceText.match(/registerEnumType/g)).toHaveLength(2); - expect(sourceText.match(/enum Role/g)).toHaveLength(1); + expect(sourceText.match(/registerEnumType/g)).toHaveLength(2); + expect(sourceText.match(/enum Role/g)).toHaveLength(1); }); describe('model with one id string', () => { - const schema = ` + const schema = ` model User { id String @id } `; - it('extend', async () => { - ({ project, sourceFiles } = await testGenerate({ - schema, - createSouceFile: { - type: 'model', - name: 'User', - text: `@ObjectType() export class User {}`, - }, - })); - sourceFile = project.getSourceFile(s => - s.getFilePath().endsWith('user.model.ts'), - )!; - sourceText = sourceFile.getText(); - expect(sourceText.match(/export class User/g)?.length).toEqual(1); - }); - - it('remove description', async () => { - ({ project, sourceFiles } = await testGenerate({ - schema, - createSouceFile: { - type: 'model', - name: 'User', - text: `@ObjectType({ description: 'user description' }) export class User {}`, - }, - })); - setSourceFile('user.model.ts'); - const objectType = classFile.getDecorator('ObjectType')?.getText(); - expect(objectType).toEqual('@ObjectType()'); - }); - - it('generated commented class if reexport found', async () => { - ({ project, sourceFiles } = await testGenerate({ - schema, - createSouceFile: { - type: 'model', - name: 'User', - text: ` + it('extend', async () => { + ({ project, sourceFiles } = await testGenerate({ + schema, + createSouceFile: { + type: 'model', + name: 'User', + text: `@ObjectType() export class User {}`, + }, + })); + sourceFile = project.getSourceFile(s => s.getFilePath().endsWith('user.model.ts'))!; + sourceText = sourceFile.getText(); + expect(sourceText.match(/export class User/g)?.length).toEqual(1); + }); + + it('remove description', async () => { + ({ project, sourceFiles } = await testGenerate({ + schema, + createSouceFile: { + type: 'model', + name: 'User', + text: `@ObjectType({ description: 'user description' }) export class User {}`, + }, + })); + setSourceFile('user.model.ts'); + const objectType = classFile.getDecorator('ObjectType')?.getText(); + expect(objectType).toEqual('@ObjectType()'); + }); + + it('generated commented class if reexport found', async () => { + ({ project, sourceFiles } = await testGenerate({ + schema, + createSouceFile: { + type: 'model', + name: 'User', + text: ` export { User } from 'src/user/model' export { User as UserModel } from 'src/user2/model' `, - }, - })); - setSourceFile('user.model.ts'); - expect(sourceText).toContain(`export { User } from 'src/user/model'`); - expect(sourceText).toContain(`// export class User`); - }); - - it('no generate another commented class', async () => { - ({ project, sourceFiles } = await testGenerate({ - schema, - createSouceFile: { - type: 'model', - name: 'User', - text: ` + }, + })); + setSourceFile('user.model.ts'); + expect(sourceText).toContain(`export { User } from 'src/user/model'`); + expect(sourceText).toContain(`// export class User`); + }); + + it('no generate another commented class', async () => { + ({ project, sourceFiles } = await testGenerate({ + schema, + createSouceFile: { + type: 'model', + name: 'User', + text: ` export { User } from 'src/user/model' // @ObjectType() // export class User { } `, - }, - })); - setSourceFile('user.model.ts'); - expect(sourceText.match(/export class User/g)).toHaveLength(1); - expect(sourceText).toContain('// export class User'); - }); + }, + })); + setSourceFile('user.model.ts'); + expect(sourceText.match(/export class User/g)).toHaveLength(1); + expect(sourceText).toContain('// export class User'); + }); }); it('generator option outputFilePattern', async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: `model User { + ({ project, sourceFiles } = await testGenerate({ + schema: `model User { id Int @id }`, - options: [`outputFilePattern = "data/{type}/{name}.ts"`], - })); - const filePaths = sourceFiles.map(s => String(s.getFilePath())); - expect(filePaths).toContainEqual(expect.stringContaining('/data/model/user.ts')); + options: [`outputFilePattern = "data/{type}/{name}.ts"`], + })); + const filePaths = sourceFiles.map(s => String(s.getFilePath())); + expect(filePaths).toContainEqual(expect.stringContaining('/data/model/user.ts')); }); it('several models', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: `model User { + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: `model User { id Int @id name String? profile Profile? @@ -1135,24 +1121,24 @@ it('several models', () => { model Comment { id Int @id }`, - })); - }); - - it('no nullable type', () => { - for (const d of sourceFiles - .flatMap(s => s.getClasses()) - .flatMap(d => d.getProperties()) - .flatMap(p => p.getDecorators())) { - const argument = d.getCallExpression()?.getArguments()?.[0].getText(); - expect(argument).not.toContain('null'); - } - }); + })); + }); + + it('no nullable type', () => { + for (const d of sourceFiles + .flatMap(s => s.getClasses()) + .flatMap(d => d.getProperties()) + .flatMap(p => p.getDecorators())) { + const argument = d.getCallExpression()?.getArguments()?.[0].getText(); + expect(argument).not.toContain('null'); + } + }); }); describe('get rid of atomic number operations', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` model User { id String @id age Int @@ -1162,109 +1148,103 @@ describe('get rid of atomic number operations', () => { friends String[] } `, - options: [ - `outputFilePattern = "{name}.{type}.ts"`, - `noAtomicOperations = true`, - ], - })); - }); + options: [`outputFilePattern = "{name}.{type}.ts"`, `noAtomicOperations = true`], + })); + }); - it('files should not be', () => { - const filePaths = sourceFiles.map(s => s.getFilePath().slice(1)); - for (const filePath of filePaths) { - expect(filePath).not.toContain('field-update-operations'); - } - }); + it('files should not be', () => { + const filePaths = sourceFiles.map(s => s.getFilePath().slice(1)); + for (const filePath of filePaths) { + expect(filePath).not.toContain('field-update-operations'); + } + }); - describe('user update input', () => { - before(() => { - setSourceFile('user-update.input.ts'); - }); + describe('user update input', () => { + before(() => { + setSourceFile('user-update.input.ts'); + }); - it('id should be regular string', () => { - expect(getPropertyStructure(sourceFile, 'id')?.type).toEqual('string'); - }); + it('id should be regular string', () => { + expect(getPropertyStructure(sourceFile, 'id')?.type).toEqual('string'); + }); - it('id field type should be string', () => { - expect(t('id')).toEqual('() => String'); - }); + it('id field type should be string', () => { + expect(t('id')).toEqual('() => String'); + }); - it('age should be regular string', () => { - expect(getPropertyStructure(sourceFile, 'age')?.type).toEqual('number'); - }); + it('age should be regular string', () => { + expect(getPropertyStructure(sourceFile, 'age')?.type).toEqual('number'); + }); - it('age field type should be string', () => { - expect(t('age')).toEqual('() => Int'); - }); + it('age field type should be string', () => { + expect(t('age')).toEqual('() => Int'); + }); - it('rating should be regular string', () => { - expect(getPropertyStructure(sourceFile, 'rating')?.type).toEqual('number'); - }); + it('rating should be regular string', () => { + expect(getPropertyStructure(sourceFile, 'rating')?.type).toEqual('number'); + }); - it('rating field type should be string', () => { - expect(t('rating')).toEqual('() => Float'); - }); + it('rating field type should be string', () => { + expect(t('rating')).toEqual('() => Float'); + }); - it('scalar array', () => { - expect(t('friends')).toEqual('() => UserUpdatefriendsInput'); - }); + it('scalar array', () => { + expect(t('friends')).toEqual('() => UserUpdatefriendsInput'); }); + }); - describe('UserUpdatefriendsInput', () => { - before(() => { - setSourceFile('user-updatefriends.input.ts'); - }); + describe('UserUpdatefriendsInput', () => { + before(() => { + setSourceFile('user-updatefriends.input.ts'); }); + }); - describe('date field files', () => { - const dateFieldFiles = [ - 'user-create.input.ts', - 'user-unchecked-update.input.ts', - ]; + describe('date field files', () => { + const dateFieldFiles = ['user-create.input.ts', 'user-unchecked-update.input.ts']; - for (const file of dateFieldFiles) { - it(`date field files ${file}`, () => { - setSourceFile(file); - expect(p('born')?.type).toEqual('Date | string'); - expect(t('born')).toEqual('() => Date'); - }); - } - }); + for (const file of dateFieldFiles) { + it(`date field files ${file}`, () => { + setSourceFile(file); + expect(p('born')?.type).toEqual('Date | string'); + expect(t('born')).toEqual('() => Date'); + }); + } + }); }); describe('noAtomicOperations with emitSingle and combineScalarFilters', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` model User { id String @id age Int } `, - options: [ - `outputFilePattern = "{name}.{type}.ts"`, - `noAtomicOperations = true`, - `emitSingle = true`, - `combineScalarFilters = true`, - ], - })); - }); - - it('FieldUpdateOperationsInput should not exists', () => { - const s = testSourceFile({ - project, - file: 'index.ts', - }); + options: [ + `outputFilePattern = "{name}.{type}.ts"`, + `noAtomicOperations = true`, + `emitSingle = true`, + `combineScalarFilters = true`, + ], + })); + }); - const classDeclaration = s.sourceFile.getClass('IntFieldUpdateOperationsInput'); - expect(classDeclaration).toBeUndefined(); + it('FieldUpdateOperationsInput should not exists', () => { + const s = testSourceFile({ + project, + file: 'index.ts', }); + + const classDeclaration = s.sourceFile.getClass('IntFieldUpdateOperationsInput'); + expect(classDeclaration).toBeUndefined(); + }); }); describe('combine scalar filters', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` model User { id String @id bio String? @@ -1281,215 +1261,215 @@ describe('combine scalar filters', () => { ADMIN } `, - options: [ - `outputFilePattern = "{name}.{type}.ts"`, - `combineScalarFilters = true`, - ], - })); - }); - - it('files should not contain nested and nullable', () => { - const filePaths = sourceFiles - .map(s => s.getFilePath().slice(1)) - .filter( - p => - !( - p.endsWith('field-update-operations.input.ts') || - p.endsWith('json-null-value-input.enum.ts') - ), - ); - for (const filePath of filePaths) { - expect(filePath).not.toContain('nested'); - expect(filePath).not.toContain('nullable'); - } - }); + options: [ + `outputFilePattern = "{name}.{type}.ts"`, + `combineScalarFilters = true`, + ], + })); + }); + + it('files should not contain nested and nullable', () => { + const filePaths = sourceFiles + .map(s => s.getFilePath().slice(1)) + .filter( + p => + !( + p.endsWith('field-update-operations.input.ts') || + p.endsWith('json-null-value-input.enum.ts') + ), + ); + for (const filePath of filePaths) { + expect(filePath).not.toContain('nested'); + expect(filePath).not.toContain('nullable'); + } + }); - it('source file should not reference bogus type', () => { - for (const sourceFile of sourceFiles) { - const types = sourceFile - .getClass(() => true) - ?.getProperties() - .map(p => String(p.getStructure().type)) - .filter((t: string) => t.endsWith('Filter') || t.endsWith('Filter>')); - if (types) { - for (const type of types) { - expect(type).not.toContain('Nested'); - expect(type).not.toContain('Nullable'); - } - } + it('source file should not reference bogus type', () => { + for (const sourceFile of sourceFiles) { + const types = sourceFile + .getClass(() => true) + ?.getProperties() + .map(p => String(p.getStructure().type)) + .filter((t: string) => t.endsWith('Filter') || t.endsWith('Filter>')); + if (types) { + for (const type of types) { + expect(type).not.toContain('Nested'); + expect(type).not.toContain('Nullable'); } - }); - - it('user-where.input count', () => { - const s = testSourceFile({ - project, - file: 'user-where.input.ts', - property: 'count', - }); - expect(s.property?.type).toBe('IntFilter'); - }); - - it('user-where.input bio', () => { - const s = testSourceFile({ - project, - file: 'user-where.input.ts', - property: 'bio', - }); - expect(s.property?.type).toBe('StringFilter'); - }); - - it('user-where.input money', () => { - const s = testSourceFile({ - project, - file: 'user-where.input.ts', - property: 'money', - }); - expect(s.property?.type).toBe('DecimalFilter'); - }); - - it('user-where.input rating', () => { - const s = testSourceFile({ - project, - file: 'user-where.input.ts', - property: 'rating', - }); - expect(s.property?.type).toBe('FloatFilter'); - }); - - it('user-where.input born', () => { - const s = testSourceFile({ - project, - file: 'user-where.input.ts', - property: 'born', - }); - expect(s.property?.type).toBe('DateTimeFilter'); - }); - - it('user-where.input humanoid', () => { - const s = testSourceFile({ - project, - file: 'user-where.input.ts', - property: 'humanoid', - }); - expect(s.property?.type).toBe('BoolFilter'); - }); - - it('user-where.input role', () => { - const s = testSourceFile({ - project, - file: 'user-where.input.ts', - property: 'role', - }); - expect(s.property?.type).toBe('EnumRoleFilter'); - }); - - it('user scalar where with aggregates id', () => { - const s = testSourceFile({ - project, - file: 'user-scalar-where-with-aggregates.input.ts', - property: 'id', - }); - expect(s.property?.type).toBe('StringWithAggregatesFilter'); - }); - - it('user scalar where with aggregates bio', () => { - const s = testSourceFile({ - project, - file: 'user-scalar-where-with-aggregates.input.ts', - property: 'bio', - }); - expect(s.property?.type).toBe('StringWithAggregatesFilter'); - }); - - it('user scalar where with aggregates count', () => { - const s = testSourceFile({ - project, - file: 'user-scalar-where-with-aggregates.input.ts', - property: 'count', - }); - expect(s.property?.type).toBe('IntWithAggregatesFilter'); - }); - - it('user scalar where with aggregates rating', () => { - const s = testSourceFile({ - project, - file: 'user-scalar-where-with-aggregates.input.ts', - property: 'rating', - }); - expect(s.property?.type).toBe('FloatWithAggregatesFilter'); - }); - - it('user scalar where with aggregates born', () => { - const s = testSourceFile({ - project, - file: 'user-scalar-where-with-aggregates.input.ts', - property: 'born', - }); - expect(s.property?.type).toBe('DateTimeWithAggregatesFilter'); - }); - - it('user scalar where with aggregates humanoid', () => { - const s = testSourceFile({ - project, - file: 'user-scalar-where-with-aggregates.input.ts', - property: 'humanoid', - }); - expect(s.property?.type).toBe('BoolWithAggregatesFilter'); - }); - - it('user scalar where with aggregates money', () => { - const s = testSourceFile({ - project, - file: 'user-scalar-where-with-aggregates.input.ts', - property: 'money', - }); - expect(s.property?.type).toBe('DecimalWithAggregatesFilter'); - }); - - it('user scalar where with aggregates data', () => { - const s = testSourceFile({ - project, - file: 'user-scalar-where-with-aggregates.input.ts', - property: 'data', - }); - expect(s.property?.type).toBe('JsonWithAggregatesFilter'); - }); - - it('user scalar where with aggregates role', () => { - const s = testSourceFile({ - project, - file: 'user-scalar-where-with-aggregates.input.ts', - property: 'role', - }); - expect(s.property?.type).toBe('EnumRoleWithAggregatesFilter'); - }); + } + } + }); + + it('user-where.input count', () => { + const s = testSourceFile({ + project, + file: 'user-where.input.ts', + property: 'count', + }); + expect(s.property?.type).toBe('IntFilter'); + }); + + it('user-where.input bio', () => { + const s = testSourceFile({ + project, + file: 'user-where.input.ts', + property: 'bio', + }); + expect(s.property?.type).toBe('StringFilter'); + }); + + it('user-where.input money', () => { + const s = testSourceFile({ + project, + file: 'user-where.input.ts', + property: 'money', + }); + expect(s.property?.type).toBe('DecimalFilter'); + }); + + it('user-where.input rating', () => { + const s = testSourceFile({ + project, + file: 'user-where.input.ts', + property: 'rating', + }); + expect(s.property?.type).toBe('FloatFilter'); + }); + + it('user-where.input born', () => { + const s = testSourceFile({ + project, + file: 'user-where.input.ts', + property: 'born', + }); + expect(s.property?.type).toBe('DateTimeFilter'); + }); + + it('user-where.input humanoid', () => { + const s = testSourceFile({ + project, + file: 'user-where.input.ts', + property: 'humanoid', + }); + expect(s.property?.type).toBe('BoolFilter'); + }); + + it('user-where.input role', () => { + const s = testSourceFile({ + project, + file: 'user-where.input.ts', + property: 'role', + }); + expect(s.property?.type).toBe('EnumRoleFilter'); + }); + + it('user scalar where with aggregates id', () => { + const s = testSourceFile({ + project, + file: 'user-scalar-where-with-aggregates.input.ts', + property: 'id', + }); + expect(s.property?.type).toBe('StringWithAggregatesFilter'); + }); + + it('user scalar where with aggregates bio', () => { + const s = testSourceFile({ + project, + file: 'user-scalar-where-with-aggregates.input.ts', + property: 'bio', + }); + expect(s.property?.type).toBe('StringWithAggregatesFilter'); + }); + + it('user scalar where with aggregates count', () => { + const s = testSourceFile({ + project, + file: 'user-scalar-where-with-aggregates.input.ts', + property: 'count', + }); + expect(s.property?.type).toBe('IntWithAggregatesFilter'); + }); + + it('user scalar where with aggregates rating', () => { + const s = testSourceFile({ + project, + file: 'user-scalar-where-with-aggregates.input.ts', + property: 'rating', + }); + expect(s.property?.type).toBe('FloatWithAggregatesFilter'); + }); + + it('user scalar where with aggregates born', () => { + const s = testSourceFile({ + project, + file: 'user-scalar-where-with-aggregates.input.ts', + property: 'born', + }); + expect(s.property?.type).toBe('DateTimeWithAggregatesFilter'); + }); + + it('user scalar where with aggregates humanoid', () => { + const s = testSourceFile({ + project, + file: 'user-scalar-where-with-aggregates.input.ts', + property: 'humanoid', + }); + expect(s.property?.type).toBe('BoolWithAggregatesFilter'); + }); + + it('user scalar where with aggregates money', () => { + const s = testSourceFile({ + project, + file: 'user-scalar-where-with-aggregates.input.ts', + property: 'money', + }); + expect(s.property?.type).toBe('DecimalWithAggregatesFilter'); + }); + + it('user scalar where with aggregates data', () => { + const s = testSourceFile({ + project, + file: 'user-scalar-where-with-aggregates.input.ts', + property: 'data', + }); + expect(s.property?.type).toBe('JsonWithAggregatesFilter'); + }); + + it('user scalar where with aggregates role', () => { + const s = testSourceFile({ + project, + file: 'user-scalar-where-with-aggregates.input.ts', + property: 'role', + }); + expect(s.property?.type).toBe('EnumRoleWithAggregatesFilter'); + }); }); describe('combine scalar filters on array', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` model User { id String @id str String[] int Int? } `, - options: [ - `outputFilePattern = "{name}.{type}.ts"`, - `combineScalarFilters = true`, - ], - })); - }); + options: [ + `outputFilePattern = "{name}.{type}.ts"`, + `combineScalarFilters = true`, + ], + })); + }); - it('smoke', () => { - 'no errors'; - }); + it('smoke', () => { + 'no errors'; + }); }); it('model with prisma keyword output', async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + ({ project, sourceFiles } = await testGenerate({ + schema: ` model Output { id Int @id Aggregate Aggregate[] @@ -1508,166 +1488,162 @@ it('model with prisma keyword output', async () => { Aggregate Aggregate[] } `, - options: [`outputFilePattern = "{name}.{type}.ts"`], - })); + options: [`outputFilePattern = "{name}.{type}.ts"`], + })); }); describe('reexport option', () => { - describe('reexport directories clean', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + describe('reexport directories clean', () => { + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` model User { id Int @id }`, - options: ['reExport = Directories'], - })); - }); + options: ['reExport = Directories'], + })); + }); - it('user index', () => { - setSourceFile('/user/index.ts'); - expect(sourceFile).toBeTruthy(); - expect(sourceFile.getText()).toContain( - `export { AggregateUser } from './aggregate-user.output'`, - ); - expect(sourceFile.getText()).toContain( - `export { User } from './user.model'`, - ); - }); + it('user index', () => { + setSourceFile('/user/index.ts'); + expect(sourceFile).toBeTruthy(); + expect(sourceFile.getText()).toContain( + `export { AggregateUser } from './aggregate-user.output'`, + ); + expect(sourceFile.getText()).toContain(`export { User } from './user.model'`); }); + }); - describe('reexport directories with existing file', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + describe('reexport directories with existing file', () => { + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` model User { id Int @id }`, - options: ['reExport = Directories'], - onConnect(emitter) { - emitter.on('PostBegin', ({ project, output }: EventArguments) => { - project.createSourceFile( - `${output}/user/index.ts`, - `export { User } from './user.model';`, - { overwrite: true }, - ); - }); - }, - })); - }); - - it('user index should not contain duplicate identifer', () => { - sourceFile = project.getSourceFile(s => - s.getFilePath().endsWith('/user/index.ts'), - )!; - const decls = sourceFile.getExportDeclarations().map(x => ({ - specifier: x.getModuleSpecifierValue(), - name: x.getNamedExports()[0].getName(), - })); - expect(decls).not.toContainEqual( - expect.objectContaining({ specifier: './index' }), + options: ['reExport = Directories'], + onConnect(emitter) { + emitter.on('PostBegin', ({ project, output }: EventArguments) => { + project.createSourceFile( + `${output}/user/index.ts`, + `export { User } from './user.model';`, + { overwrite: true }, ); - }); + }); + }, + })); }); - describe('reexport directories with output file pattern', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + it('user index should not contain duplicate identifer', () => { + sourceFile = project.getSourceFile(s => + s.getFilePath().endsWith('/user/index.ts'), + )!; + const decls = sourceFile.getExportDeclarations().map(x => ({ + specifier: x.getModuleSpecifierValue(), + name: x.getNamedExports()[0].getName(), + })); + expect(decls).not.toContainEqual( + expect.objectContaining({ specifier: './index' }), + ); + }); + }); + + describe('reexport directories with output file pattern', () => { + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` model User { id Int @id }`, - options: [ - 'reExport = Directories', - `outputFilePattern = "{model}/{plural.type}/{name}.{type}.ts"`, - ], - })); - }); - - it('user should export plural types', () => { - sourceFile = project.getSourceFile(s => - s.getFilePath().endsWith('/user/index.ts'), - )!; - - for (const exp of [ - `export * from './args';`, - `export * from './enums';`, - `export * from './inputs';`, - `export * from './models';`, - `export * from './outputs';`, - ]) { - expect(sourceFile.getText()).toContain(exp); - } - }); - }); - - describe('reexport single', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + options: [ + 'reExport = Directories', + `outputFilePattern = "{model}/{plural.type}/{name}.{type}.ts"`, + ], + })); + }); + + it('user should export plural types', () => { + sourceFile = project.getSourceFile(s => + s.getFilePath().endsWith('/user/index.ts'), + )!; + + for (const exp of [ + `export * from './args';`, + `export * from './enums';`, + `export * from './inputs';`, + `export * from './models';`, + `export * from './outputs';`, + ]) { + expect(sourceFile.getText()).toContain(exp); + } + }); + }); + + describe('reexport single', () => { + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` model User { id Int @id }`, - options: ['reExport = Single'], - })); - }); + options: ['reExport = Single'], + })); + }); - it('root index', () => { - const rootDirectory = project.getRootDirectories()[0].getParent(); - const sourceFile = rootDirectory?.getSourceFileOrThrow('index.ts')!; - expect(sourceFile).toBeTruthy(); - expect(sourceFile.getText()).toContain( - `export { SortOrder } from './prisma/sort-order.enum'`, - ); - expect(sourceFile.getText()).toContain( - `export { User } from './user/user.model'`, - ); - }); + it('root index', () => { + const rootDirectory = project.getRootDirectories()[0].getParent(); + const sourceFile = rootDirectory?.getSourceFileOrThrow('index.ts')!; + expect(sourceFile).toBeTruthy(); + expect(sourceFile.getText()).toContain( + `export { SortOrder } from './prisma/sort-order.enum'`, + ); + expect(sourceFile.getText()).toContain( + `export { User } from './user/user.model'`, + ); }); + }); - describe('reexport all', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + describe('reexport all', () => { + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` model User { id Int @id }`, - options: ['reExport = All'], - })); - }); - - it('root index', () => { - const rootDirectory = project.getRootDirectories()[0].getParent(); - const sourceFile = rootDirectory?.getSourceFileOrThrow('index.ts')!; - expect(sourceFile).toBeTruthy(); - expect(sourceFile.getText()).toMatch( - /export {.*AffectedRows,.*} from '\.\/prisma'/, - ); - expect(sourceFile.getText()).toMatch( - /export {.*UserWhereInput,.*} from '\.\/user'/, - ); - }); - - it('user index', () => { - sourceFile = project.getSourceFile(s => - s.getFilePath().endsWith('/user/index.ts'), - )!; - // sourceFile = project.getSourceFile('/user/index.ts')!; - expect(sourceFile).toBeTruthy(); - expect(sourceFile.getText()).toContain( - `export { AggregateUser } from './aggregate-user.output'`, - ); - expect(sourceFile.getText()).toContain( - `export { User } from './user.model'`, - ); - }); - }); + options: ['reExport = All'], + })); + }); + + it('root index', () => { + const rootDirectory = project.getRootDirectories()[0].getParent(); + const sourceFile = rootDirectory?.getSourceFileOrThrow('index.ts')!; + expect(sourceFile).toBeTruthy(); + expect(sourceFile.getText()).toMatch( + /export {.*AffectedRows,.*} from '\.\/prisma'/, + ); + expect(sourceFile.getText()).toMatch( + /export {.*UserWhereInput,.*} from '\.\/user'/, + ); + }); + + it('user index', () => { + sourceFile = project.getSourceFile(s => + s.getFilePath().endsWith('/user/index.ts'), + )!; + // sourceFile = project.getSourceFile('/user/index.ts')!; + expect(sourceFile).toBeTruthy(); + expect(sourceFile.getText()).toContain( + `export { AggregateUser } from './aggregate-user.output'`, + ); + expect(sourceFile.getText()).toContain(`export { User } from './user.model'`); + }); + }); }); describe('emit single and decorators', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` model User { id Int @id /// @Validator.MinLength(3) @@ -1676,50 +1652,50 @@ describe('emit single and decorators', () => { email String? } `, - options: [ - `emitSingle = true`, - `outputFilePattern = "{name}.{type}.ts"`, - `fields_Validator_from = "class-validator"`, - `fields_Validator_input = true`, - ], - })); - setSourceFile('index.ts'); - }); + options: [ + `emitSingle = true`, + `outputFilePattern = "{name}.{type}.ts"`, + `fields_Validator_from = "class-validator"`, + `fields_Validator_input = true`, + ], + })); + setSourceFile('index.ts'); + }); - it('should contain custom decorator import', () => { - const importDeclaration = importDeclarations.find( - x => x.moduleSpecifier === 'graphql-type-email', - ); - expect(importDeclaration).toEqual( - expect.objectContaining({ - namespaceImport: 'G', - }), - ); - }); + it('should contain custom decorator import', () => { + const importDeclaration = importDeclarations.find( + x => x.moduleSpecifier === 'graphql-type-email', + ); + expect(importDeclaration).toEqual( + expect.objectContaining({ + namespaceImport: 'G', + }), + ); + }); - it('validator namespace for name should be imported', () => { - expect(importDeclarations).toContainEqual( - expect.objectContaining({ - namespaceImport: 'Validator', - }), - ); - }); + it('validator namespace for name should be imported', () => { + expect(importDeclarations).toContainEqual( + expect.objectContaining({ + namespaceImport: 'Validator', + }), + ); + }); - describe('user create input name', () => { - let property: PropertyDeclaration; - before(() => { - property = sourceFile.getClass('UserCreateInput')?.getProperty('name')!; - }); + describe('user create input name', () => { + let property: PropertyDeclaration; + before(() => { + property = sourceFile.getClass('UserCreateInput')?.getProperty('name')!; + }); - it('decorator validator', () => { - const d = property.getDecorator(d => d.getFullText().includes('MinLength')); - expect(trim(d?.getFullText())).toEqual('@Validator.MinLength(3)'); - }); + it('decorator validator', () => { + const d = property.getDecorator(d => d.getFullText().includes('MinLength')); + expect(trim(d?.getFullText())).toEqual('@Validator.MinLength(3)'); }); + }); }); describe('emit single', () => { - const schema = ` + const schema = ` model User { id Int @id posts Post[] @@ -1730,90 +1706,81 @@ describe('emit single', () => { userId Int? } `; - describe('emit single green', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema, - options: [ - `emitSingle = true`, - `outputFilePattern = "{name}.{type}.ts"`, - ], - })); - setSourceFile('index.ts'); - }); + describe('emit single green', () => { + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema, + options: [`emitSingle = true`, `outputFilePattern = "{name}.{type}.ts"`], + })); + setSourceFile('index.ts'); + }); - it('should have one file', () => { - expect(project.getSourceFiles()).toHaveLength(1); - }); + it('should have one file', () => { + expect(project.getSourceFiles()).toHaveLength(1); + }); - it('should not contain relative import', () => { - const badImport = imports.find(x => x.specifier.startsWith('.')); - expect(badImport).toBeUndefined(); - }); + it('should not contain relative import', () => { + const badImport = imports.find(x => x.specifier.startsWith('.')); + expect(badImport).toBeUndefined(); + }); - it('should contains class user', () => { - expect(sourceText).toMatch(/export class User {/); - }); + it('should contains class user', () => { + expect(sourceText).toMatch(/export class User {/); + }); - it('should contains class post', () => { - expect(sourceText).toMatch(/export class Post {/); - }); + it('should contains class post', () => { + expect(sourceText).toMatch(/export class Post {/); + }); - it('should use InstanceType trick to avoid tdz', () => { - const struct = sourceFile - .getClass('Post') - ?.getProperty('user') - ?.getStructure(); - expect(struct?.type).toEqual('InstanceType | null'); - expect(struct?.hasQuestionToken).toEqual(true); - }); + it('should use InstanceType trick to avoid tdz', () => { + const struct = sourceFile.getClass('Post')?.getProperty('user')?.getStructure(); + expect(struct?.type).toEqual('InstanceType | null'); + expect(struct?.hasQuestionToken).toEqual(true); + }); - it('type for all properties should use InstanceType trick to avoid tdz', () => { - const types = sourceFile - .getClasses() - .flatMap(c => c.getProperties().map(p => ({ c, p }))) - .map(({ c, p }) => ({ c, p, type: p.getType() })) - .filter(({ type }) => type.isClass()) - .map(({ c, p }) => ({ - class: c.getName(), - property: p.getStructure().name, - type: p.getStructure().type, - })); - expect(types).toHaveLength(0); - }); + it('type for all properties should use InstanceType trick to avoid tdz', () => { + const types = sourceFile + .getClasses() + .flatMap(c => c.getProperties().map(p => ({ c, p }))) + .map(({ c, p }) => ({ c, p, type: p.getType() })) + .filter(({ type }) => type.isClass()) + .map(({ c, p }) => ({ + class: c.getName(), + property: p.getStructure().name, + type: p.getStructure().type, + })); + expect(types).toHaveLength(0); }); + }); - describe('emit single second gen', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema, - options: [ - `emitSingle = true`, - `outputFilePattern = "{name}.{type}.ts"`, - ], - onConnect(emitter) { - emitter.on('PostBegin', ({ project, output }: EventArguments) => { - project.createSourceFile( - `${output}/index.ts`, - `@ObjectType() export class User { }`, - { overwrite: true }, - ); - }); - }, - })); - setSourceFile('index.ts'); - }); + describe('emit single second gen', () => { + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema, + options: [`emitSingle = true`, `outputFilePattern = "{name}.{type}.ts"`], + onConnect(emitter) { + emitter.on('PostBegin', ({ project, output }: EventArguments) => { + project.createSourceFile( + `${output}/index.ts`, + `@ObjectType() export class User { }`, + { overwrite: true }, + ); + }); + }, + })); + setSourceFile('index.ts'); + }); - it('should not add to existing file', () => { - expect(sourceText.match(/export class User /g)).toHaveLength(1); - }); + it('should not add to existing file', () => { + expect(sourceText.match(/export class User /g)).toHaveLength(1); }); + }); }); describe('select input type', () => { - it('select input type all', async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + it('select input type all', async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` model User { id Int @id posts Post[] @@ -1824,19 +1791,19 @@ describe('select input type', () => { userId Int? } `, - options: [ - `outputFilePattern = "{name}.{type}.ts"`, - `useInputType_PostWhereInput_ALL = "WhereInput"`, - ], - })); - setSourceFile('post-where.input.ts'); - expect(t('user')).toEqual('() => UserWhereInput'); - expect(p('user')?.type).toEqual('UserWhereInput'); - }); + options: [ + `outputFilePattern = "{name}.{type}.ts"`, + `useInputType_PostWhereInput_ALL = "WhereInput"`, + ], + })); + setSourceFile('post-where.input.ts'); + expect(t('user')).toEqual('() => UserWhereInput'); + expect(p('user')?.type).toEqual('UserWhereInput'); + }); - it('select input type usercreateargs', async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + it('select input type usercreateargs', async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` model User { userId String @id articles Article[] @relation("ArticleAuthor") @@ -1847,20 +1814,20 @@ describe('select input type', () => { authorId String? } `, - options: [ - `outputFilePattern = "{name}.{type}.ts"`, - `useInputType_CreateOne_ALL = "UncheckedCreate"`, - ], - })); - setSourceFile('create-one-user.args.ts'); - expect(t('data')).toEqual('() => UserUncheckedCreateInput'); - expect(p('data')?.type).toEqual('UserUncheckedCreateInput'); - }); + options: [ + `outputFilePattern = "{name}.{type}.ts"`, + `useInputType_CreateOne_ALL = "UncheckedCreate"`, + ], + })); + setSourceFile('create-one-user.args.ts'); + expect(t('data')).toEqual('() => UserUncheckedCreateInput'); + expect(p('data')?.type).toEqual('UserUncheckedCreateInput'); + }); - describe('select input type articlewhereinput array config', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + describe('select input type articlewhereinput array config', () => { + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` model User { userId String @id articles Article[] @relation("ArticleAuthor") @@ -1871,36 +1838,36 @@ describe('select input type', () => { authorId String? } `, - options: [ - `outputFilePattern = "{name}.{type}.ts"`, - `useInputType_WhereInput_ALL = "WhereInput"`, - `useInputType_CreateOne_ALL = "UncheckedCreate"`, - ], - })); - }); + options: [ + `outputFilePattern = "{name}.{type}.ts"`, + `useInputType_WhereInput_ALL = "WhereInput"`, + `useInputType_CreateOne_ALL = "UncheckedCreate"`, + ], + })); + }); - it('article-where.input', () => { - setSourceFile('article-where.input.ts'); - expect(t('author')).toEqual('() => UserWhereInput'); - expect(p('author')?.type).toEqual('UserWhereInput'); - expect(importDeclarations).toContainEqual( - expect.objectContaining({ - moduleSpecifier: './user-where.input', - }), - ); - }); + it('article-where.input', () => { + setSourceFile('article-where.input.ts'); + expect(t('author')).toEqual('() => UserWhereInput'); + expect(p('author')?.type).toEqual('UserWhereInput'); + expect(importDeclarations).toContainEqual( + expect.objectContaining({ + moduleSpecifier: './user-where.input', + }), + ); + }); - it('select input type articlewhereinput array config', () => { - setSourceFile('create-one-user.args.ts'); - expect(t('data')).toEqual('() => UserUncheckedCreateInput'); - expect(p('data')?.type).toEqual('UserUncheckedCreateInput'); - }); + it('select input type articlewhereinput array config', () => { + setSourceFile('create-one-user.args.ts'); + expect(t('data')).toEqual('() => UserUncheckedCreateInput'); + expect(p('data')?.type).toEqual('UserUncheckedCreateInput'); }); + }); - describe('select input type no atomic operations', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + describe('select input type no atomic operations', () => { + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` model User { userId Int @id articles Article[] @relation("ArticleAuthor") @@ -1912,43 +1879,41 @@ describe('select input type', () => { authorId Int? } `, - options: [ - `outputFilePattern = "{name}.{type}.ts"`, - `useInputType_UpdateInput_ALL = "match:!*FieldUpdateOperationsInput"`, - `useInputType_UpdateMany_ALL = "match:!*FieldUpdateOperationsInput"`, - `useInputType_UpdateWithout_ALL = "match:!*FieldUpdateOperationsInput"`, - ], - })); - }); - - it('check all', () => { - for (const s of sourceFiles - .filter( - sourceFile => - !sourceFile - .getFilePath() - .endsWith('field-update-operations.input.ts') && - sourceFile.getClass(() => true), - ) - .map(sourceFile => sourceFile.getClass(() => true)) - .flatMap(c => { - return c!.getProperties().map(p => ({ - class: c?.getName(), - type: p.getStructure().type, - })); - })) { - expect(s).not.toEqual( - expect.objectContaining({ - type: expect.stringContaining('FieldUpdateOperationsInput'), - }), - ); - } - }); + options: [ + `outputFilePattern = "{name}.{type}.ts"`, + `useInputType_UpdateInput_ALL = "match:!*FieldUpdateOperationsInput"`, + `useInputType_UpdateMany_ALL = "match:!*FieldUpdateOperationsInput"`, + `useInputType_UpdateWithout_ALL = "match:!*FieldUpdateOperationsInput"`, + ], + })); + }); + + it('check all', () => { + for (const s of sourceFiles + .filter( + sourceFile => + !sourceFile.getFilePath().endsWith('field-update-operations.input.ts') && + sourceFile.getClass(() => true), + ) + .map(sourceFile => sourceFile.getClass(() => true)) + .flatMap(c => { + return c!.getProperties().map(p => ({ + class: c?.getName(), + type: p.getStructure().type, + })); + })) { + expect(s).not.toEqual( + expect.objectContaining({ + type: expect.stringContaining('FieldUpdateOperationsInput'), + }), + ); + } }); + }); - it('select input type list filter', async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + it('select input type list filter', async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` model User { userId String @id friends String[] @@ -1961,53 +1926,53 @@ describe('select input type', () => { // jsons Json[] } `, - options: [ - `outputFilePattern = "{name}.{type}.ts"`, - `useInputType_CreateInput_friends = "String"`, - `useInputType_CreateInput_ints = "Int"`, - ], - })); - setSourceFile('user-create.input.ts'); - expect(t('friends')).toEqual('() => [String]'); - expect(p('friends')?.type).toEqual('Array'); + options: [ + `outputFilePattern = "{name}.{type}.ts"`, + `useInputType_CreateInput_friends = "String"`, + `useInputType_CreateInput_ints = "Int"`, + ], + })); + setSourceFile('user-create.input.ts'); + expect(t('friends')).toEqual('() => [String]'); + expect(p('friends')?.type).toEqual('Array'); - expect(t('ints')).toEqual('() => [Int]'); - expect(p('ints')?.type).toEqual('Array'); - }); + expect(t('ints')).toEqual('() => [Int]'); + expect(p('ints')?.type).toEqual('Array'); + }); }); describe('model autoincrement int', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` model User { id Int @id @default(autoincrement()) } `, - })); - }); - - it('input types whithout fields', () => { - const files = sourceFiles - .map(s => s.getClass(() => true)) - .filter(Boolean) - .map(c => ({ className: c!.getName(), properties: c!.getProperties() })) - .filter(({ properties }) => properties.length === 0); - expect(files).toHaveLength(0); - }); - - it('post update many input should not exists', () => { - const f = project.getSourceFile(s => - s.getFilePath().endsWith('post-update-many-mutation.input.ts'), - ); - expect(f).toBeUndefined(); - }); + })); + }); + + it('input types whithout fields', () => { + const files = sourceFiles + .map(s => s.getClass(() => true)) + .filter(Boolean) + .map(c => ({ className: c!.getName(), properties: c!.getProperties() })) + .filter(({ properties }) => properties.length === 0); + expect(files).toHaveLength(0); + }); + + it('post update many input should not exists', () => { + const f = project.getSourceFile(s => + s.getFilePath().endsWith('post-update-many-mutation.input.ts'), + ); + expect(f).toBeUndefined(); + }); }); describe('output without fields', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` model Comment { id String @id @default(cuid()) dummy Dummy @relation(fields: [dummyId], references: [id]) @@ -2019,132 +1984,132 @@ describe('output without fields', () => { comments Comment[] } `, - options: [`outputFilePattern = "{name}.{type}.ts"`], - })); - }); + options: [`outputFilePattern = "{name}.{type}.ts"`], + })); + }); - it('count output', () => { - setSourceFile('dummy-count.output.ts'); - expect(t('comments')).toEqual('() => Int'); - }); + it('count output', () => { + setSourceFile('dummy-count.output.ts'); + expect(t('comments')).toEqual('() => Int'); + }); }); describe('noTypeId config', () => { - describe('disabled', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + describe('disabled', () => { + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` model User { id Int @id } `, - options: [`outputFilePattern = "{name}.{type}.ts"`], - })); - setSourceFile('user.model.ts'); - }); + options: [`outputFilePattern = "{name}.{type}.ts"`], + })); + setSourceFile('user.model.ts'); + }); - it('type should be ID', () => { - expect(t('id')).toEqual('() => ID'); - }); + it('type should be ID', () => { + expect(t('id')).toEqual('() => ID'); + }); - it('import contain ID', () => { - expect(imports).toContainEqual({ - name: 'ID', - specifier: '@nestjs/graphql', - }); - }); + it('import contain ID', () => { + expect(imports).toContainEqual({ + name: 'ID', + specifier: '@nestjs/graphql', + }); }); + }); - describe('enabled int', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + describe('enabled int', () => { + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` model User { id Int @id } `, - options: [`outputFilePattern = "{name}.{type}.ts"`, 'noTypeId = true'], - })); - setSourceFile('user.model.ts'); - }); + options: [`outputFilePattern = "{name}.{type}.ts"`, 'noTypeId = true'], + })); + setSourceFile('user.model.ts'); + }); - it('type should be Int', () => { - expect(t('id')).toEqual('() => Int'); - }); + it('type should be Int', () => { + expect(t('id')).toEqual('() => Int'); + }); - it('import contain Int', () => { - expect(imports).toContainEqual({ - name: 'Int', - specifier: '@nestjs/graphql', - }); - }); + it('import contain Int', () => { + expect(imports).toContainEqual({ + name: 'Int', + specifier: '@nestjs/graphql', + }); }); + }); }); describe('object model options', () => { - it('abstract true by objecttype', async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + it('abstract true by objecttype', async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` /// @ObjectType({ isAbstract: true }) model User { id Int @id }`, - options: [`outputFilePattern = "{name}.{type}.ts"`], - })); + options: [`outputFilePattern = "{name}.{type}.ts"`], + })); - const s = testSourceFile({ project, class: 'User' }); - const argument = s.classFile.getDecorator('ObjectType')?.getStructure() - .arguments?.[0]; - const json = JSON5.parse(argument); + const s = testSourceFile({ project, class: 'User' }); + const argument = s.classFile.getDecorator('ObjectType')?.getStructure() + .arguments?.[0]; + const json = JSON5.parse(argument); - expect(json).toEqual({ isAbstract: true }); - }); + expect(json).toEqual({ isAbstract: true }); + }); - it('should have abstract true and name robot', async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + it('should have abstract true and name robot', async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` /// user really /// @ObjectType({ name: 'Robot', isAbstract: true }) model User { id Int @id }`, - options: [`outputFilePattern = "{name}.{type}.ts"`], - })); + options: [`outputFilePattern = "{name}.{type}.ts"`], + })); - setSourceFile('user.model.ts'); - const [argument1, argument2] = objectTypeArguments() as string[]; - expect(argument1).toEqual("'Robot'"); - expect(JSON5.parse(argument2)).toEqual({ - description: 'user really', - isAbstract: true, - }); + setSourceFile('user.model.ts'); + const [argument1, argument2] = objectTypeArguments() as string[]; + expect(argument1).toEqual("'Robot'"); + expect(JSON5.parse(argument2)).toEqual({ + description: 'user really', + isAbstract: true, }); + }); - it('name by first argument string', async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + it('name by first argument string', async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` /// user really /// @ObjectType('Human', { isAbstract: true }) model User { id Int @id }`, - options: [`outputFilePattern = "{name}.{type}.ts"`], - })); + options: [`outputFilePattern = "{name}.{type}.ts"`], + })); - setSourceFile('user.model.ts'); - const [argument1, argument2] = objectTypeArguments() as string[]; - expect(JSON5.parse(argument1)).toEqual('Human'); - expect(JSON5.parse(argument2)).toEqual({ - description: 'user really', - isAbstract: true, - }); + setSourceFile('user.model.ts'); + const [argument1, argument2] = objectTypeArguments() as string[]; + expect(JSON5.parse(argument1)).toEqual('Human'); + expect(JSON5.parse(argument2)).toEqual({ + description: 'user really', + isAbstract: true, }); + }); }); describe('compound index', () => { - it('user unique input compound', async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + it('user unique input compound', async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` model User { id Int @id /// @Validator.MinLength(3) @@ -2158,63 +2123,63 @@ describe('compound index', () => { id Int @id } `, - options: [ - `outputFilePattern = "{name}.{type}.ts"`, - `fields_Validator_from = "class-validator"`, - `fields_Validator_input = true`, - ], - })); - setSourceFile('user-email-name-compound-unique.input.ts'); - const minLength = classFile.getProperty('name')?.getDecorator('MinLength'); - expect(minLength?.getText()).toEqual('@Validator.MinLength(3)'); - }); + options: [ + `outputFilePattern = "{name}.{type}.ts"`, + `fields_Validator_from = "class-validator"`, + `fields_Validator_input = true`, + ], + })); + setSourceFile('user-email-name-compound-unique.input.ts'); + const minLength = classFile.getProperty('name')?.getDecorator('MinLength'); + expect(minLength?.getText()).toEqual('@Validator.MinLength(3)'); + }); }); describe('field type', () => { - describe('it overwrites field type based on match expression', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + describe('it overwrites field type based on match expression', () => { + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` model User { id Int @id /// @FieldType({ name: 'GraphQLJSONObject', from: 'graphql-scalars', namedImport: true, match: 'User{Create,Update}Input' }) profile Json } `, - options: [`outputFilePattern = "{name}.{type}.ts"`], - })); - }); + options: [`outputFilePattern = "{name}.{type}.ts"`], + })); + }); - it('should use default scalar type in model', () => { - setSourceFile('user.model.ts'); - expect(t('profile')).toEqual('() => GraphQLJSON'); - }); + it('should use default scalar type in model', () => { + setSourceFile('user.model.ts'); + expect(t('profile')).toEqual('() => GraphQLJSON'); + }); - it('should use default scalar type in user-create-many.input', () => { - setSourceFile('user-create-many.input.ts'); - expect(t('profile')).toEqual('() => GraphQLJSON'); - }); + it('should use default scalar type in user-create-many.input', () => { + setSourceFile('user-create-many.input.ts'); + expect(t('profile')).toEqual('() => GraphQLJSON'); + }); - it('user-create.input', () => { - setSourceFile('user-create.input.ts'); - expect(t('profile')).toEqual('() => GraphQLJSONObject'); - }); + it('user-create.input', () => { + setSourceFile('user-create.input.ts'); + expect(t('profile')).toEqual('() => GraphQLJSONObject'); + }); - it('should use default scalar type in user-update-many-mutation.input', () => { - setSourceFile('user-update-many-mutation.input.ts'); - expect(t('profile')).toEqual('() => GraphQLJSON'); - }); + it('should use default scalar type in user-update-many-mutation.input', () => { + setSourceFile('user-update-many-mutation.input.ts'); + expect(t('profile')).toEqual('() => GraphQLJSON'); + }); - it('user-update.input', () => { - setSourceFile('user-update.input.ts'); - expect(t('profile')).toEqual('() => GraphQLJSONObject'); - }); + it('user-update.input', () => { + setSourceFile('user-update.input.ts'); + expect(t('profile')).toEqual('() => GraphQLJSONObject'); }); + }); }); it('fieldtype on groupby', async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + ({ project, sourceFiles } = await testGenerate({ + schema: ` model User { id Int @id /// @FieldType({ name: 'GraphQLJSONObject', from: 'graphql-scalars', namedImport: true, input: true, output: true }) @@ -2222,122 +2187,122 @@ it('fieldtype on groupby', async () => { profile Json } `, - options: [`outputFilePattern = "{name}.{type}.ts"`], - })); - setSourceFile('user-group-by.output.ts'); - expect(t('profile')).toEqual('() => GraphQLJSONObject'); + options: [`outputFilePattern = "{name}.{type}.ts"`], + })); + setSourceFile('user-group-by.output.ts'); + expect(t('profile')).toEqual('() => GraphQLJSONObject'); }); describe('property type', () => { - describe('it overwrites property type based on match expression', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + describe('it overwrites property type based on match expression', () => { + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` model User { id Int @id /// @PropertyType({ name: 'JsonObject', from: 'type-fest', namedImport: true, match: 'User{Create,Update}Input' }) profile Json } `, - options: [`outputFilePattern = "{name}.{type}.ts"`], - })); - }); + options: [`outputFilePattern = "{name}.{type}.ts"`], + })); + }); - it('should use default scalar type in model', () => { - setSourceFile('user.model.ts'); - expect(p('profile')?.type).toEqual('any'); - }); + it('should use default scalar type in model', () => { + setSourceFile('user.model.ts'); + expect(p('profile')?.type).toEqual('any'); + }); - it('should use default scalar type in user-create-many.input', () => { - setSourceFile('user-create-many.input.ts'); - expect(p('profile')?.type).toEqual('any'); - }); + it('should use default scalar type in user-create-many.input', () => { + setSourceFile('user-create-many.input.ts'); + expect(p('profile')?.type).toEqual('any'); + }); - it('user-create.input', () => { - setSourceFile('user-create.input.ts'); - expect(p('profile')?.type).toEqual('JsonObject'); - }); + it('user-create.input', () => { + setSourceFile('user-create.input.ts'); + expect(p('profile')?.type).toEqual('JsonObject'); + }); - it('should use default scalar type in user-update-many-mutation.input', () => { - setSourceFile('user-update-many-mutation.input.ts'); - expect(p('profile')?.type).toEqual('any'); - }); + it('should use default scalar type in user-update-many-mutation.input', () => { + setSourceFile('user-update-many-mutation.input.ts'); + expect(p('profile')?.type).toEqual('any'); + }); - it('user-update.input', () => { - setSourceFile('user-update.input.ts'); - expect(p('profile')?.type).toEqual('JsonObject'); - }); + it('user-update.input', () => { + setSourceFile('user-update.input.ts'); + expect(p('profile')?.type).toEqual('JsonObject'); }); + }); - describe('it respects input from generator level field configuration', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + describe('it respects input from generator level field configuration', () => { + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` model User { id Int @id /// @PropertyType('JsonObject') profile Json } `, - options: [ - ` + options: [ + ` fields_JsonObject_from = "type-fest" fields_JsonObject_namedImport = true fields_JsonObject_input = true fields_JsonObject_output = false `, - ], - })); - }); + ], + })); + }); - it('should use default scalar type in model', () => { - setSourceFile('user.model.ts'); - expect(p('profile')?.type).toEqual('any'); - }); + it('should use default scalar type in model', () => { + setSourceFile('user.model.ts'); + expect(p('profile')?.type).toEqual('any'); + }); - it('user-create.input', () => { - setSourceFile('user-create.input.ts'); - expect(p('profile')?.type).toEqual('JsonObject'); - }); + it('user-create.input', () => { + setSourceFile('user-create.input.ts'); + expect(p('profile')?.type).toEqual('JsonObject'); }); + }); - describe('it respects output from generator level field configuration', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + describe('it respects output from generator level field configuration', () => { + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` model User { id Int @id /// @PropertyType('JsonObject') profile Json } `, - options: [ - ` + options: [ + ` fields_JsonObject_from = "type-fest" fields_JsonObject_namedImport = true fields_JsonObject_input = false fields_JsonObject_output = true `, - ], - })); - }); + ], + })); + }); - it('should use default scalar type in model', () => { - setSourceFile('user.model.ts'); - expect(p('profile')?.type).toEqual('JsonObject'); - }); + it('should use default scalar type in model', () => { + setSourceFile('user.model.ts'); + expect(p('profile')?.type).toEqual('JsonObject'); + }); - it('user-create.input', () => { - setSourceFile('user-create.input.ts'); - expect(p('profile')?.type).toEqual('any'); - }); + it('user-create.input', () => { + setSourceFile('user-create.input.ts'); + expect(p('profile')?.type).toEqual('any'); }); + }); }); describe('hidefield on groupby output', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` model User { id Int @id /// @HideField({ match: '*GroupBy' }) @@ -2346,32 +2311,32 @@ describe('hidefield on groupby output', () => { profile Json } `, - options: [`outputFilePattern = "{name}.{type}.ts"`], - })); - setSourceFile('user-group-by.output.ts'); - }); + options: [`outputFilePattern = "{name}.{type}.ts"`], + })); + setSourceFile('user-group-by.output.ts'); + }); - it('no graphqljsonobject', () => { - expect(imports).not.toContainEqual( - expect.objectContaining({ - name: 'GraphQLJSONObject', - }), - ); - }); + it('no graphqljsonobject', () => { + expect(imports).not.toContainEqual( + expect.objectContaining({ + name: 'GraphQLJSONObject', + }), + ); + }); - it('no graphqljson', () => { - expect(imports).not.toContainEqual( - expect.objectContaining({ - name: 'GraphQLJSON', - }), - ); - }); + it('no graphqljson', () => { + expect(imports).not.toContainEqual( + expect.objectContaining({ + name: 'GraphQLJSON', + }), + ); + }); }); describe('non list optional properties should be nullable', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` model User { id String @id profile Profile? @@ -2387,103 +2352,103 @@ describe('non list optional properties should be nullable', () => { author User? @relation(name: "ArticleAuthor", fields: [authorId], references: [id]) authorId String? }`, - options: [`outputFilePattern = "{name}.{type}.ts"`], - })); - }); - - it('user model profile', () => { - setSourceFile('user.model.ts'); - expect(p('profile')?.type).toEqual('Profile | null'); - expect(p('profile')?.hasQuestionToken).toEqual(true); - }); - - it('user model count', () => { - const s = testSourceFile({ - project, - file: 'user.model.ts', - property: '_count', - }); - expect(s.property?.type).toEqual('UserCount'); - expect(s.fieldDecoratorOptions).toEqual('{nullable:false}'); - expect(s.property?.hasQuestionToken).toEqual(true); - }); - - it('user count output should undefineable ts type', () => { - const s = testSourceFile({ - project, - file: 'user-count.output.ts', - property: 'articles', - }); - expect(s.fieldDecoratorOptions).toEqual('{nullable:false}'); - expect(s.property?.hasQuestionToken).toBe(true); - }); - - it('article model author', () => { - setSourceFile('article.model.ts'); - expect(p('author')?.type).toEqual('User | null'); - }); - - it('list articles should not have null', () => { - setSourceFile('user.model.ts'); - expect(p('articles')?.type).toEqual('Array
'); - }); + options: [`outputFilePattern = "{name}.{type}.ts"`], + })); + }); + + it('user model profile', () => { + setSourceFile('user.model.ts'); + expect(p('profile')?.type).toEqual('Profile | null'); + expect(p('profile')?.hasQuestionToken).toEqual(true); + }); + + it('user model count', () => { + const s = testSourceFile({ + project, + file: 'user.model.ts', + property: '_count', + }); + expect(s.property?.type).toEqual('UserCount'); + expect(s.fieldDecoratorOptions).toEqual('{nullable:false}'); + expect(s.property?.hasQuestionToken).toEqual(true); + }); + + it('user count output should undefineable ts type', () => { + const s = testSourceFile({ + project, + file: 'user-count.output.ts', + property: 'articles', + }); + expect(s.fieldDecoratorOptions).toEqual('{nullable:false}'); + expect(s.property?.hasQuestionToken).toBe(true); + }); + + it('article model author', () => { + setSourceFile('article.model.ts'); + expect(p('author')?.type).toEqual('User | null'); + }); + + it('list articles should not have null', () => { + setSourceFile('user.model.ts'); + expect(p('articles')?.type).toEqual('Array
'); + }); }); describe('requireSingleFieldsInWhereUniqueInput', () => { - it('requireSingleFieldsInWhereUniqueInput several fields', async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + it('requireSingleFieldsInWhereUniqueInput several fields', async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` model User { id String @id email String @unique } `, - options: [ - `outputFilePattern = "{name}.{type}.ts"`, - `requireSingleFieldsInWhereUniqueInput = true`, - ], - })); - setSourceFile('user-where-unique.input.ts'); + options: [ + `outputFilePattern = "{name}.{type}.ts"`, + `requireSingleFieldsInWhereUniqueInput = true`, + ], + })); + setSourceFile('user-where-unique.input.ts'); - expect(p('id')).toEqual( - expect.objectContaining({ hasQuestionToken: true, type: 'string' }), - ); - expect(f('id')).toEqual(['() => String', '{nullable:true}']); - expect(p('email')).toEqual( - expect.objectContaining({ hasQuestionToken: true, type: 'string' }), - ); - expect(f('email')).toEqual(['() => String', '{nullable:true}']); - }); + expect(p('id')).toEqual( + expect.objectContaining({ hasQuestionToken: true, type: 'string' }), + ); + expect(f('id')).toEqual(['() => String', '{nullable:true}']); + expect(p('email')).toEqual( + expect.objectContaining({ hasQuestionToken: true, type: 'string' }), + ); + expect(f('email')).toEqual(['() => String', '{nullable:true}']); + }); - it('requireSingleFieldsInWhereUniqueInput single fields', async () => { - ({ project } = await testGenerate({ - schema: ` + it('requireSingleFieldsInWhereUniqueInput single fields', async () => { + ({ project } = await testGenerate({ + schema: ` model User { id String @id } `, - options: [ - `outputFilePattern = "{name}.{type}.ts"`, - `requireSingleFieldsInWhereUniqueInput = true`, - ], - })); - - const s = testSourceFile({ - project, - file: 'user-where-unique.input.ts', - property: 'id', - }); + options: [ + `outputFilePattern = "{name}.{type}.ts"`, + `requireSingleFieldsInWhereUniqueInput = true`, + ], + })); - expect(s.property).toEqual( - expect.objectContaining({ hasQuestionToken: false, type: 'string' }), - ); - expect(s.fieldDecoratorType).toEqual('() => String'); - expect(s.fieldDecoratorOptions).toEqual('{nullable:false}'); + const s = testSourceFile({ + project, + file: 'user-where-unique.input.ts', + property: 'id', }); - it('requireSingleFieldsInWhereUniqueInput compound', async () => { - ({ project } = await testGenerate({ - schema: ` + expect(s.property).toEqual( + expect.objectContaining({ hasQuestionToken: false, type: 'string' }), + ); + expect(s.fieldDecoratorType).toEqual('() => String'); + expect(s.fieldDecoratorOptions).toEqual('{nullable:false}'); + }); + + it('requireSingleFieldsInWhereUniqueInput compound', async () => { + ({ project } = await testGenerate({ + schema: ` model User { name String email String @@ -2491,101 +2456,101 @@ describe('requireSingleFieldsInWhereUniqueInput', () => { @@unique([name,email]) } `, - options: [ - `outputFilePattern = "{name}.{type}.ts"`, - `requireSingleFieldsInWhereUniqueInput = true`, - ], - })); - - const s = testSourceFile({ - project, - file: 'user-where-unique.input.ts', - property: 'name_email', - }); + options: [ + `outputFilePattern = "{name}.{type}.ts"`, + `requireSingleFieldsInWhereUniqueInput = true`, + ], + })); - expect(s.property?.hasQuestionToken).toEqual(false); - expect(s.property?.type).toEqual('UserNameEmailCompoundUniqueInput'); - expect(s.fieldDecoratorType).toEqual('() => UserNameEmailCompoundUniqueInput'); - expect(s.fieldDecoratorOptions).toEqual('{nullable:false}'); + const s = testSourceFile({ + project, + file: 'user-where-unique.input.ts', + property: 'name_email', }); + + expect(s.property?.hasQuestionToken).toEqual(false); + expect(s.property?.type).toEqual('UserNameEmailCompoundUniqueInput'); + expect(s.fieldDecoratorType).toEqual('() => UserNameEmailCompoundUniqueInput'); + expect(s.fieldDecoratorOptions).toEqual('{nullable:false}'); + }); }); describe('configuration custom scalars', () => { - describe('bigint', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + describe('bigint', () => { + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` model User { id String @id bigInt BigInt }`, - options: [ - `outputFilePattern = "{name}.{type}.ts"`, - `graphqlScalars_BigInt_name = "GraphQLBigInt"`, - `graphqlScalars_BigInt_specifier = "graphql-scalars"`, - ], - })); - }); - - it('big-int-filter equals', () => { - const s = testSourceFile({ - project, - file: 'big-int-filter.input.ts', - property: 'equals', - }); - - expect(s.fieldDecoratorType).toEqual('() => GraphQLBigInt'); - - expect(s.namedImports).toContainEqual({ - name: 'GraphQLBigInt', - specifier: 'graphql-scalars', - }); - }); - - it('big-int-filter in', () => { - const s = testSourceFile({ - project, - file: 'big-int-filter.input.ts', - property: 'in', - }); - - expect(s.fieldDecoratorType).toEqual('() => [GraphQLBigInt]'); - }); - - it('user model', () => { - const s = testSourceFile({ - project, - file: 'user.model.ts', - property: 'bigInt', - }); - - expect(s.namedImports).toContainEqual({ - name: 'GraphQLBigInt', - specifier: 'graphql-scalars', - }); - expect(s.fieldDecoratorType).toEqual('() => GraphQLBigInt'); - }); - - it('user-sum-aggregate', () => { - const s = testSourceFile({ - project, - file: 'user-sum-aggregate.output.ts', - property: 'bigInt', - }); - - expect(s.namedImports).toContainEqual({ - name: 'GraphQLBigInt', - specifier: 'graphql-scalars', - }); - expect(s.fieldDecoratorType).toEqual('() => GraphQLBigInt'); - }); - }); + options: [ + `outputFilePattern = "{name}.{type}.ts"`, + `graphqlScalars_BigInt_name = "GraphQLBigInt"`, + `graphqlScalars_BigInt_specifier = "graphql-scalars"`, + ], + })); + }); + + it('big-int-filter equals', () => { + const s = testSourceFile({ + project, + file: 'big-int-filter.input.ts', + property: 'equals', + }); + + expect(s.fieldDecoratorType).toEqual('() => GraphQLBigInt'); + + expect(s.namedImports).toContainEqual({ + name: 'GraphQLBigInt', + specifier: 'graphql-scalars', + }); + }); + + it('big-int-filter in', () => { + const s = testSourceFile({ + project, + file: 'big-int-filter.input.ts', + property: 'in', + }); + + expect(s.fieldDecoratorType).toEqual('() => [GraphQLBigInt]'); + }); + + it('user model', () => { + const s = testSourceFile({ + project, + file: 'user.model.ts', + property: 'bigInt', + }); + + expect(s.namedImports).toContainEqual({ + name: 'GraphQLBigInt', + specifier: 'graphql-scalars', + }); + expect(s.fieldDecoratorType).toEqual('() => GraphQLBigInt'); + }); + + it('user-sum-aggregate', () => { + const s = testSourceFile({ + project, + file: 'user-sum-aggregate.output.ts', + property: 'bigInt', + }); + + expect(s.namedImports).toContainEqual({ + name: 'GraphQLBigInt', + specifier: 'graphql-scalars', + }); + expect(s.fieldDecoratorType).toEqual('() => GraphQLBigInt'); + }); + }); }); describe('multiple description', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` /// Model description /// Model 2 model User { @@ -2594,83 +2559,83 @@ describe('multiple description', () => { /// Second line name String }`, - options: [`outputFilePattern = "{name}.{type}.ts"`], - })); - }); + options: [`outputFilePattern = "{name}.{type}.ts"`], + })); + }); - it('field', () => { - const s = testSourceFile({ project, class: 'User' }); - expect(s.sourceText).toContain(` + it('field', () => { + const s = testSourceFile({ project, class: 'User' }); + expect(s.sourceText).toContain(` /** * Name description * Second line */ `); - }); + }); - it('model', () => { - const s = testSourceFile({ project, class: 'User' }); - expect(s.sourceText).toContain(`/** + it('model', () => { + const s = testSourceFile({ project, class: 'User' }); + expect(s.sourceText).toContain(`/** * Model description * Model 2 */`); - }); + }); }); describe('deprecation reason', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` model User { id Int @id /// Name description /// @deprecated Use name2 instead name String }`, - options: [`outputFilePattern = "{name}.{type}.ts"`], - })); - }); - - it('deprecation reason default', async () => { - const s = testSourceFile({ project, class: 'User', property: 'name' }); - - expect(JSON5.parse(s.fieldDecoratorOptions)).toEqual( - expect.objectContaining({ - deprecationReason: 'Use name2 instead', - description: 'Name description', - }), - ); - }); + options: [`outputFilePattern = "{name}.{type}.ts"`], + })); + }); - for (const className of [ - 'UserWhereInput', - 'UserCountAggregateInput', - 'UserCountAggregate', - 'UserMaxAggregateInput', - ]) { - it(className, () => { - const s = testSourceFile({ - project, - class: 'UserCountAggregateInput', - property: 'name', - }); - expect(JSON5.parse(s.fieldDecoratorOptions)).toEqual( - expect.objectContaining({ deprecationReason: 'Use name2 instead' }), - ); - }); - } + it('deprecation reason default', async () => { + const s = testSourceFile({ project, class: 'User', property: 'name' }); - it('deprecated decorator in comment', () => { - const s = testSourceFile({ project, class: 'User', property: 'name' }); - const jsdoc = s.classFile.getProperty('name')?.getJsDocs().at(0)?.getText(); - expect(jsdoc).toContain('* Name description'); - expect(jsdoc).toContain('* @deprecated Use name2 instead'); - - expect(JSON5.parse(s.fieldDecoratorOptions)).toEqual( - expect.objectContaining({ - description: 'Name description', - deprecationReason: 'Use name2 instead', - }), - ); - }); + expect(JSON5.parse(s.fieldDecoratorOptions)).toEqual( + expect.objectContaining({ + deprecationReason: 'Use name2 instead', + description: 'Name description', + }), + ); + }); + + for (const className of [ + 'UserWhereInput', + 'UserCountAggregateInput', + 'UserCountAggregate', + 'UserMaxAggregateInput', + ]) { + it(className, () => { + const s = testSourceFile({ + project, + class: 'UserCountAggregateInput', + property: 'name', + }); + expect(JSON5.parse(s.fieldDecoratorOptions)).toEqual( + expect.objectContaining({ deprecationReason: 'Use name2 instead' }), + ); + }); + } + + it('deprecated decorator in comment', () => { + const s = testSourceFile({ project, class: 'User', property: 'name' }); + const jsdoc = s.classFile.getProperty('name')?.getJsDocs().at(0)?.getText(); + expect(jsdoc).toContain('* Name description'); + expect(jsdoc).toContain('* @deprecated Use name2 instead'); + + expect(JSON5.parse(s.fieldDecoratorOptions)).toEqual( + expect.objectContaining({ + description: 'Name description', + deprecationReason: 'Use name2 instead', + }), + ); + }); }); diff --git a/src/test/helpers.ts b/src/test/helpers.ts index 8dd409d9..70f278ee 100644 --- a/src/test/helpers.ts +++ b/src/test/helpers.ts @@ -1,88 +1,87 @@ import { - ImportSpecifierStructure, - Project, - PropertyDeclaration, - PropertyDeclarationStructure, - SourceFile, + ImportSpecifierStructure, + Project, + PropertyDeclaration, + PropertyDeclarationStructure, + SourceFile, } from 'ts-morph'; export function getFieldOptions( - sourceFile: SourceFile, - property: string | PropertyDeclaration, + sourceFile: SourceFile, + property: string | PropertyDeclaration, ) { - let propertyDeclaration: PropertyDeclaration | undefined; - if (typeof property === 'string') { - propertyDeclaration = sourceFile.getClass(() => true)?.getProperty(property); - } - const result = propertyDeclaration?.getStructure()?.decorators?.[0]?.arguments?.[1]; - return result as string; - // return new Function(`return ${text}`)(); + let propertyDeclaration: PropertyDeclaration | undefined; + if (typeof property === 'string') { + propertyDeclaration = sourceFile.getClass(() => true)?.getProperty(property); + } + const result = propertyDeclaration?.getStructure()?.decorators?.[0]?.arguments?.[1]; + return result as string; + // return new Function(`return ${text}`)(); } export function getPropertyStructure(sourceFile: SourceFile, name: string) { - return sourceFile - .getClass(() => true) - ?.getProperty(p => p.getName() === name) - ?.getStructure(); + return sourceFile + .getClass(() => true) + ?.getProperty(p => p.getName() === name) + ?.getStructure(); } export function testSourceFile(args: { - project: Project; - file?: string; - class?: string; - property?: string; + project: Project; + file?: string; + class?: string; + property?: string; }) { - const { project, file, property, class: className } = args; - let sourceFile: SourceFile; - if (file) { - sourceFile = project.getSourceFileOrThrow(s => s.getFilePath().endsWith(file)); - } else if (className) { - sourceFile = project.getSourceFileOrThrow(s => Boolean(s.getClass(className))); - } else { - throw new TypeError('file or class must be provided'); - } + const { project, file, property, class: className } = args; + let sourceFile: SourceFile; + if (file) { + sourceFile = project.getSourceFileOrThrow(s => s.getFilePath().endsWith(file)); + } else if (className) { + sourceFile = project.getSourceFileOrThrow(s => Boolean(s.getClass(className))); + } else { + throw new TypeError('file or class must be provided'); + } - const importDeclarations = sourceFile - .getImportDeclarations() - .map(d => d.getStructure()); - const classFile = sourceFile.getClass(() => true)!; - const propertyStructure = - property && - classFile.getProperty(p => p.getName() === property)?.getStructure(); - const propertyDecorators = ( - propertyStructure as PropertyDeclarationStructure | undefined - )?.decorators; - const fieldDecorator = propertyDecorators?.find(d => d.name === 'Field'); + const importDeclarations = sourceFile + .getImportDeclarations() + .map(d => d.getStructure()); + const classFile = sourceFile.getClass(() => true)!; + const propertyStructure = + property && classFile.getProperty(p => p.getName() === property)?.getStructure(); + const propertyDecorators = ( + propertyStructure as PropertyDeclarationStructure | undefined + )?.decorators; + const fieldDecorator = propertyDecorators?.find(d => d.name === 'Field'); - type ImportElement = { name: string; specifier: string }; - const namedImports: ImportElement[] = []; - const namespaceImports: ImportElement[] = []; + type ImportElement = { name: string; specifier: string }; + const namedImports: ImportElement[] = []; + const namespaceImports: ImportElement[] = []; - for (const d of importDeclarations) { - if (d.namespaceImport) { - namespaceImports.push({ - name: d.namespaceImport, - specifier: d.moduleSpecifier, - }); - } - for (const s of (d.namedImports || []) as ImportSpecifierStructure[]) { - namedImports.push({ - name: s.name, - specifier: d.moduleSpecifier, - }); - } + for (const d of importDeclarations) { + if (d.namespaceImport) { + namespaceImports.push({ + name: d.namespaceImport, + specifier: d.moduleSpecifier, + }); + } + for (const s of (d.namedImports || []) as ImportSpecifierStructure[]) { + namedImports.push({ + name: s.name, + specifier: d.moduleSpecifier, + }); } + } - return { - sourceFile, - classFile, - sourceText: sourceFile.getText(), - namedImports, - namespaceImports, - property: propertyStructure as PropertyDeclarationStructure | undefined, - propertyDecorators, - fieldDecorator, - fieldDecoratorType: fieldDecorator?.arguments?.[0], - fieldDecoratorOptions: fieldDecorator?.arguments?.[1], - }; + return { + sourceFile, + classFile, + sourceText: sourceFile.getText(), + namedImports, + namespaceImports, + property: propertyStructure as PropertyDeclarationStructure | undefined, + propertyDecorators, + fieldDecorator, + fieldDecoratorType: fieldDecorator?.arguments?.[0], + fieldDecoratorOptions: fieldDecorator?.arguments?.[1], + }; } diff --git a/src/test/hide-field.spec.ts b/src/test/hide-field.spec.ts index 21487190..6af1a9af 100644 --- a/src/test/hide-field.spec.ts +++ b/src/test/hide-field.spec.ts @@ -9,9 +9,9 @@ let imports: { name: string; specifier: string }[]; let s: ReturnType; describe('scalar field', () => { - before(async () => { - ({ project } = await testGenerate({ - schema: ` + before(async () => { + ({ project } = await testGenerate({ + schema: ` model User { id String @id /// Password1 @@ -22,60 +22,56 @@ describe('scalar field', () => { password2 String } `, - options: [], - })); + options: [], + })); + }); + + describe('model', () => { + it('TypeGraphQL omit should hide password1', () => { + const s = testSourceFile({ + project, + file: 'user.model.ts', + property: 'password1', + }); + expect(s.propertyDecorators).toContainEqual( + expect.objectContaining({ name: 'HideField', arguments: [] }), + ); }); - describe('model', () => { - it('TypeGraphQL omit should hide password1', () => { - const s = testSourceFile({ - project, - file: 'user.model.ts', - property: 'password1', - }); - expect(s.propertyDecorators).toContainEqual( - expect.objectContaining({ name: 'HideField', arguments: [] }), - ); - }); - - it('HideField should hide field', () => { - const s = testSourceFile({ - project, - file: 'user.model.ts', - property: 'password2', - }); - expect(s.propertyDecorators).toContainEqual( - expect.objectContaining({ name: 'HideField', arguments: [] }), - ); - }); + it('HideField should hide field', () => { + const s = testSourceFile({ + project, + file: 'user.model.ts', + property: 'password2', + }); + expect(s.propertyDecorators).toContainEqual( + expect.objectContaining({ name: 'HideField', arguments: [] }), + ); }); + }); + + describe('other outputs', () => { + it('user-max-aggregate', () => { + const s = testSourceFile({ + project, + file: 'user-max-aggregate.output.ts', + }); + + expect( + s.classFile.getProperty('password1')?.getStructure().decorators, + ).toContainEqual(expect.objectContaining({ name: 'HideField', arguments: [] })); - describe('other outputs', () => { - it('user-max-aggregate', () => { - const s = testSourceFile({ - project, - file: 'user-max-aggregate.output.ts', - }); - - expect( - s.classFile.getProperty('password1')?.getStructure().decorators, - ).toContainEqual( - expect.objectContaining({ name: 'HideField', arguments: [] }), - ); - - expect( - s.classFile.getProperty('password2')?.getStructure().decorators, - ).toContainEqual( - expect.objectContaining({ name: 'HideField', arguments: [] }), - ); - }); + expect( + s.classFile.getProperty('password2')?.getStructure().decorators, + ).toContainEqual(expect.objectContaining({ name: 'HideField', arguments: [] })); }); + }); }); describe('hide on non scalar', () => { - before(async () => { - ({ project } = await testGenerate({ - schema: ` + before(async () => { + ({ project } = await testGenerate({ + schema: ` model User { id String @id /// @HideField() @@ -87,28 +83,28 @@ describe('hide on non scalar', () => { users User[] } `, - options: [], - })); - }); + options: [], + })); + }); - describe('model', () => { - it('type should be imported', () => { - const s = testSourceFile({ - project, - file: 'user.model.ts', - }); - - expect(s.namedImports).toContainEqual( - expect.objectContaining({ name: 'Secret' }), - ); - }); + describe('model', () => { + it('type should be imported', () => { + const s = testSourceFile({ + project, + file: 'user.model.ts', + }); + + expect(s.namedImports).toContainEqual( + expect.objectContaining({ name: 'Secret' }), + ); }); + }); }); describe('hide field using match', () => { - before(async () => { - ({ project } = await testGenerate({ - schema: ` + before(async () => { + ({ project } = await testGenerate({ + schema: ` model User { id String @id /// @HideField({ match: '@(User|Comment)Create*Input' }) @@ -117,77 +113,77 @@ describe('hide field using match', () => { updatedAt DateTime @updatedAt } `, - options: [`outputFilePattern = "{name}.{type}.ts"`], - })); + options: [`outputFilePattern = "{name}.{type}.ts"`], + })); + }); + + it('in model nothing should be hidden', () => { + const s = testSourceFile({ + project, + file: 'user.model.ts', + property: 'createdAt', }); - it('in model nothing should be hidden', () => { - const s = testSourceFile({ - project, - file: 'user.model.ts', - property: 'createdAt', - }); + expect(s.propertyDecorators).toHaveLength(1); + expect(s.fieldDecorator).toEqual(expect.objectContaining({ name: 'Field' })); + }); - expect(s.propertyDecorators).toHaveLength(1); - expect(s.fieldDecorator).toEqual(expect.objectContaining({ name: 'Field' })); + it('user-create-many.input', () => { + const s = testSourceFile({ + project, + file: 'user-create-many.input.ts', + property: 'createdAt', }); - it('user-create-many.input', () => { - const s = testSourceFile({ - project, - file: 'user-create-many.input.ts', - property: 'createdAt', - }); - - expect(s.propertyDecorators).toHaveLength(1); - expect(s.propertyDecorators).toContainEqual( - expect.objectContaining({ name: 'HideField' }), - ); - }); + expect(s.propertyDecorators).toHaveLength(1); + expect(s.propertyDecorators).toContainEqual( + expect.objectContaining({ name: 'HideField' }), + ); + }); - it('user-create.input', () => { - const s = testSourceFile({ - project, - file: 'user-create.input.ts', - property: 'createdAt', - }); - - expect(s.propertyDecorators).toHaveLength(1); - expect(s.propertyDecorators).toContainEqual( - expect.objectContaining({ name: 'HideField' }), - ); + it('user-create.input', () => { + const s = testSourceFile({ + project, + file: 'user-create.input.ts', + property: 'createdAt', }); - it('user-update-many-mutation.input', () => { - const s = testSourceFile({ - project, - file: 'user-update-many-mutation.input.ts', - property: 'updatedAt', - }); - - expect(s.propertyDecorators).toHaveLength(1); - expect(s.propertyDecorators).toContainEqual( - expect.objectContaining({ name: 'HideField' }), - ); + expect(s.propertyDecorators).toHaveLength(1); + expect(s.propertyDecorators).toContainEqual( + expect.objectContaining({ name: 'HideField' }), + ); + }); + + it('user-update-many-mutation.input', () => { + const s = testSourceFile({ + project, + file: 'user-update-many-mutation.input.ts', + property: 'updatedAt', }); - it('user-update.input', () => { - const s = testSourceFile({ - project, - file: 'user-update.input.ts', - property: 'updatedAt', - }); - - expect(s.propertyDecorators).toHaveLength(1); - expect(s.propertyDecorators).toContainEqual( - expect.objectContaining({ name: 'HideField' }), - ); + expect(s.propertyDecorators).toHaveLength(1); + expect(s.propertyDecorators).toContainEqual( + expect.objectContaining({ name: 'HideField' }), + ); + }); + + it('user-update.input', () => { + const s = testSourceFile({ + project, + file: 'user-update.input.ts', + property: 'updatedAt', }); + + expect(s.propertyDecorators).toHaveLength(1); + expect(s.propertyDecorators).toContainEqual( + expect.objectContaining({ name: 'HideField' }), + ); + }); }); it('hidden relations result in un-imported types', async () => { - ({ project } = await testGenerate({ - schema: ` + ({ project } = await testGenerate({ + schema: ` model User { id String @id @default(uuid()) userApiKey UserApiKey[] @@ -200,28 +196,28 @@ it('hidden relations result in un-imported types', async () => { user User @relation(fields: [userId], references: [id]) } `, - options: [`outputFilePattern = "{name}.{type}.ts"`], - })); - - const s = testSourceFile({ - project, - file: 'user-api-key-where.input.ts', - }); - - expect(s.classFile.getProperty('user')?.getStructure().type).toEqual( - 'UserRelationFilter', - ); - - expect(s.namedImports).toContainEqual({ - name: 'UserRelationFilter', - specifier: './user-relation-filter.input', - }); + options: [`outputFilePattern = "{name}.{type}.ts"`], + })); + + const s = testSourceFile({ + project, + file: 'user-api-key-where.input.ts', + }); + + expect(s.classFile.getProperty('user')?.getStructure().type).toEqual( + 'UserRelationFilter', + ); + + expect(s.namedImports).toContainEqual({ + name: 'UserRelationFilter', + specifier: './user-relation-filter.input', + }); }); describe('enums are not imported in classes when decorated', () => { - before(async () => { - ({ project } = await testGenerate({ - schema: ` + before(async () => { + ({ project } = await testGenerate({ + schema: ` model User { id Int @id /// @HideField({ input: true, output: true }) @@ -232,40 +228,40 @@ describe('enums are not imported in classes when decorated', () => { ADMIN } `, - options: [`outputFilePattern = "{name}.{type}.ts"`], - })); + options: [`outputFilePattern = "{name}.{type}.ts"`], + })); + }); + + for (const file of [ + 'user-group-by.output.ts', + 'user-max-aggregate.output.ts', + 'user-min-aggregate.output.ts', + 'user-create-many.input.ts', + 'user.model.ts', + ]) { + it(`check files ${file}`, () => { + const s = testSourceFile({ + project, + file, + property: 'role', + }); + + expect(s.namedImports).toContainEqual({ + name: 'Role', + specifier: './role.enum', + }); + + expect(s.propertyDecorators).toContainEqual( + expect.objectContaining({ name: 'HideField' }), + ); }); - - for (const file of [ - 'user-group-by.output.ts', - 'user-max-aggregate.output.ts', - 'user-min-aggregate.output.ts', - 'user-create-many.input.ts', - 'user.model.ts', - ]) { - it(`check files ${file}`, () => { - const s = testSourceFile({ - project, - file, - property: 'role', - }); - - expect(s.namedImports).toContainEqual({ - name: 'Role', - specifier: './role.enum', - }); - - expect(s.propertyDecorators).toContainEqual( - expect.objectContaining({ name: 'HideField' }), - ); - }); - } + } }); describe.skip('hide enum', () => { - before(async () => { - ({ project } = await testGenerate({ - schema: ` + before(async () => { + ({ project } = await testGenerate({ + schema: ` model User { id Int @id /// @HideField({ input: true, output: true, model: true }) @@ -276,59 +272,59 @@ describe.skip('hide enum', () => { ADMIN } `, - options: [`outputFilePattern = "{name}.{type}.ts"`], - })); - }); - - it('should not call registerEnumType', () => { - const s = testSourceFile({ - project, - file: 'role.enum.ts', - }); + options: [`outputFilePattern = "{name}.{type}.ts"`], + })); + }); - expect(s.namedImports).not.toContainEqual({ - name: 'registerEnumType', - specifier: '@nestjs/graphql', - }); + it('should not call registerEnumType', () => { + const s = testSourceFile({ + project, + file: 'role.enum.ts', }); - it('check usage in files', () => { - const files = [ - // 'user-group-by.output.ts', - // 'user-max-aggregate.output.ts', - // 'user-min-aggregate.output.ts', - // 'user-create.input.ts', - // 'user-update-many-mutation.input.ts', - // 'user-create-many.input.ts', - // 'user.model.ts', - // 'user-where.input.ts', - 'enum-role-filter.input.ts', - ]; - - for (const file of files) { - const s = testSourceFile({ - project, - file, - property: 'role', - }); - - console.log('s', s); - - expect(s.namedImports).toContainEqual({ - name: 'Role', - specifier: './role.enum', - }); - expect(s.propertyDecorators).toContainEqual( - expect.objectContaining({ name: 'HideField' }), - ); - } + expect(s.namedImports).not.toContainEqual({ + name: 'registerEnumType', + specifier: '@nestjs/graphql', }); + }); + + it('check usage in files', () => { + const files = [ + // 'user-group-by.output.ts', + // 'user-max-aggregate.output.ts', + // 'user-min-aggregate.output.ts', + // 'user-create.input.ts', + // 'user-update-many-mutation.input.ts', + // 'user-create-many.input.ts', + // 'user.model.ts', + // 'user-where.input.ts', + 'enum-role-filter.input.ts', + ]; + + for (const file of files) { + const s = testSourceFile({ + project, + file, + property: 'role', + }); + + console.log('s', s); + + expect(s.namedImports).toContainEqual({ + name: 'Role', + specifier: './role.enum', + }); + expect(s.propertyDecorators).toContainEqual( + expect.objectContaining({ name: 'HideField' }), + ); + } + }); }); describe('hide with self reference', () => { - before(async () => { - ({ project } = await testGenerate({ - schema: `model User { + before(async () => { + ({ project } = await testGenerate({ + schema: `model User { id Int @id parentId Int /// @HideField({ output: false, input: true }) @@ -336,24 +332,24 @@ describe('hide with self reference', () => { /// @HideField({ output: false, input: true }) user User[] @relation("UserToUser") }`, - })); - }); + })); + }); - it('smoke', () => { - const files = project.getSourceFiles().map(s => s.getBaseName()); - expect(files).toBeTruthy(); - }); + it('smoke', () => { + const files = project.getSourceFiles().map(s => s.getBaseName()); + expect(files).toBeTruthy(); + }); - it('order by with relation self import', () => { - const s = testSourceFile({ - project, - class: 'UserOrderByWithRelationAndSearchRelevanceInput', - }); - - expect(s.namedImports).not.toContainEqual( - expect.objectContaining({ - name: 'UserOrderByWithRelationAndSearchRelevanceInput', - }), - ); + it('order by with relation self import', () => { + const s = testSourceFile({ + project, + class: 'UserOrderByWithRelationAndSearchRelevanceInput', }); + + expect(s.namedImports).not.toContainEqual( + expect.objectContaining({ + name: 'UserOrderByWithRelationAndSearchRelevanceInput', + }), + ); + }); }); diff --git a/src/test/mongodb.spec.ts b/src/test/mongodb.spec.ts index cbacc718..25bcef2f 100644 --- a/src/test/mongodb.spec.ts +++ b/src/test/mongodb.spec.ts @@ -8,10 +8,10 @@ let project: Project; let sourceFiles: SourceFile[]; describe('type has been treated as model #99', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - provider: 'mongodb', - schema: ` + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + provider: 'mongodb', + schema: ` model User { id String @id @default(auto()) @map("_id") @db.ObjectId preferences Preference[] @@ -21,74 +21,74 @@ describe('type has been treated as model #99', () => { value String } `, - options: [ - // `outputFilePattern = "{name}.{type}.ts"` - ], - })); - }); + options: [ + // `outputFilePattern = "{name}.{type}.ts"` + ], + })); + }); - it('smoke', () => { - expect(project).toBeTruthy(); - }); + it('smoke', () => { + expect(project).toBeTruthy(); + }); - it('files', () => { - const files = project.getSourceFiles().map(s => s.getBaseName()); - expect(files.length).toBeGreaterThan(0); - }); + it('files', () => { + const files = project.getSourceFiles().map(s => s.getBaseName()); + expect(files.length).toBeGreaterThan(0); + }); - it('user model', () => { - const s = testSourceFile({ - project, - file: 'user.model.ts', - property: 'preferences', - }); - expect(s.namedImports).toContainEqual({ - name: 'Preference', - specifier: '../preference/preference.model', - }); - expect(s.property?.type).toEqual('Array'); - expect(s.fieldDecoratorType).toEqual('() => [Preference]'); + it('user model', () => { + const s = testSourceFile({ + project, + file: 'user.model.ts', + property: 'preferences', + }); + expect(s.namedImports).toContainEqual({ + name: 'Preference', + specifier: '../preference/preference.model', }); + expect(s.property?.type).toEqual('Array'); + expect(s.fieldDecoratorType).toEqual('() => [Preference]'); + }); }); describe('mongodb json', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - provider: 'mongodb', - schema: ` + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + provider: 'mongodb', + schema: ` model User { id String @id @default(auto()) @map("_id") @db.ObjectId json Json? } `, - options: [`outputFilePattern = "{name}.{type}.ts"`], - })); - }); + options: [`outputFilePattern = "{name}.{type}.ts"`], + })); + }); - it('smoke', () => { - expect(project).toBeTruthy(); - }); + it('smoke', () => { + expect(project).toBeTruthy(); + }); }); describe('single model and field mongodb', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - provider: 'mongodb', - schema: ` + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + provider: 'mongodb', + schema: ` model Product { id String @id @default(auto()) @map("_id") @db.ObjectId } `, - options: [`outputFilePattern = "{name}.{type}.ts"`], - })); - }); + options: [`outputFilePattern = "{name}.{type}.ts"`], + })); + }); - it('example input update type', () => { - const s = testSourceFile({ - project, - file: 'update-one-product.args.ts', - }); - // data field is missing because of single id field - expect(s.classFile.getProperties()).toHaveLength(1); + it('example input update type', () => { + const s = testSourceFile({ + project, + file: 'update-one-product.args.ts', }); + // data field is missing because of single id field + expect(s.classFile.getProperties()).toHaveLength(1); + }); }); diff --git a/src/test/proxy-generator.ts b/src/test/proxy-generator.ts index 1dcfabbd..041a3910 100644 --- a/src/test/proxy-generator.ts +++ b/src/test/proxy-generator.ts @@ -3,18 +3,18 @@ import { ok } from 'assert'; import { promises as fs } from 'fs'; generatorHandler({ - async onGenerate(options) { - const generatorOutput = options.generator.output?.value; - ok(generatorOutput, 'Missing generator configuration: output'); - await fs.writeFile( - `${generatorOutput}/options-${options.generator.config.hash}.js`, - `module.exports = ${JSON.stringify(options, undefined, 2)}`, - ); - }, - onManifest() { - return { - defaultOutput: '.', - prettyName: 'proxy generator', - }; - }, + async onGenerate(options) { + const generatorOutput = options.generator.output?.value; + ok(generatorOutput, 'Missing generator configuration: output'); + await fs.writeFile( + `${generatorOutput}/options-${options.generator.config.hash}.js`, + `module.exports = ${JSON.stringify(options, undefined, 2)}`, + ); + }, + onManifest() { + return { + defaultOutput: '.', + prettyName: 'proxy generator', + }; + }, }); diff --git a/src/test/test-generate.ts b/src/test/test-generate.ts index 9ac80cf4..e8e85eab 100644 --- a/src/test/test-generate.ts +++ b/src/test/test-generate.ts @@ -13,116 +13,108 @@ import { generateFileName } from '../helpers/generate-file-name'; import { DMMF, EventArguments } from '../types'; const { '@prisma/generator-helper': generatorVersion } = - // eslint-disable-next-line unicorn/prefer-module @typescript-eslint/no-var-requires - require('../../package.json').dependencies; + // eslint-disable-next-line unicorn/prefer-module @typescript-eslint/no-var-requires + require('../../package.json').dependencies; export async function testGenerate(args: { - schema: string; - options?: string[]; - provider?: 'postgresql' | 'mongodb'; - createSouceFile?: { - text: string; - name: string; - type: string; - }; - onConnect?: (emitter: AwaitEventEmitter) => void; + schema: string; + options?: string[]; + provider?: 'postgresql' | 'mongodb'; + createSouceFile?: { + text: string; + name: string; + type: string; + }; + onConnect?: (emitter: AwaitEventEmitter) => void; }) { - const { schema, options, provider, createSouceFile, onConnect } = args; - let project: Project | undefined; - const connectCallback = (emitter: AwaitEventEmitter) => { - onConnect && onConnect(emitter); - if (createSouceFile) { - emitter.on( - 'PostBegin', - ({ config, project, output, getModelName }: EventArguments) => { - const filePath = generateFileName({ - type: createSouceFile.type, - name: createSouceFile.name, - getModelName, - template: config.outputFilePattern, - }); - project.createSourceFile( - `${output}/${filePath}`, - createSouceFile.text, - { overwrite: true }, - ); - }, - ); - } - emitter.on('End', (args: { project: Project }) => { - ({ project } = args); - }); - }; - await generate({ - ...(await createGeneratorOptions(schema, options, provider)), - skipAddOutputSourceFiles: true, - connectCallback, + const { schema, options, provider, createSouceFile, onConnect } = args; + let project: Project | undefined; + const connectCallback = (emitter: AwaitEventEmitter) => { + onConnect && onConnect(emitter); + if (createSouceFile) { + emitter.on( + 'PostBegin', + ({ config, project, output, getModelName }: EventArguments) => { + const filePath = generateFileName({ + type: createSouceFile.type, + name: createSouceFile.name, + getModelName, + template: config.outputFilePattern, + }); + project.createSourceFile(`${output}/${filePath}`, createSouceFile.text, { + overwrite: true, + }); + }, + ); + } + emitter.on('End', (args: { project: Project }) => { + ({ project } = args); }); + }; + await generate({ + ...(await createGeneratorOptions(schema, options, provider)), + skipAddOutputSourceFiles: true, + connectCallback, + }); - ok(project, 'Project is not defined'); - const sourceFiles = project.getSourceFiles(); - const emptyFieldsFiles: string[] = []; + ok(project, 'Project is not defined'); + const sourceFiles = project.getSourceFiles(); + const emptyFieldsFiles: string[] = []; - for (const sourceFile of sourceFiles) { - const filePath = sourceFile.getFilePath(); - const text = sourceFile.getText(); - if (!text) { - let message = `Project should not contain empty files: ${filePath}`; - const fileLower = sourceFile - .getBaseNameWithoutExtension() - .replace(/-/g, '') - .split('.')[0]; - const sources = sourceFiles.filter(s => - s - .getClass(() => true) - ?.getProperties() - .find(p => - String(p.getStructure().type).toLowerCase().includes(fileLower), - ), - ); - if (sources.length > 0) { - message += `, reference: ${sources - .map(s => s.getBaseName()) - .join(', ')}`; - } - throw new Error(message); - } - const imports = sourceFile - .getImportDeclarations() - .map(d => d.getStructure()) - .flatMap(s => { - return [ - ...((s.namedImports || []) as ImportSpecifierStructure[]).map( - x => x.name, - ), - s.namespaceImport, - ].filter(Boolean); - }); - if (uniq(imports).length !== imports.length) { - throw new Error(`Duplicated import in ${filePath}: ${imports.toString()}`); - } - // Find classes without @Field() (must define one or more fields) - const properties = sourceFile.getClass(() => true)?.getProperties(); - if (properties && !properties.some(p => p.getDecorator('Field'))) { - emptyFieldsFiles.push(sourceFile.getBaseName()); - } + for (const sourceFile of sourceFiles) { + const filePath = sourceFile.getFilePath(); + const text = sourceFile.getText(); + if (!text) { + let message = `Project should not contain empty files: ${filePath}`; + const fileLower = sourceFile + .getBaseNameWithoutExtension() + .replace(/-/g, '') + .split('.')[0]; + const sources = sourceFiles.filter(s => + s + .getClass(() => true) + ?.getProperties() + .find(p => String(p.getStructure().type).toLowerCase().includes(fileLower)), + ); + if (sources.length > 0) { + message += `, reference: ${sources.map(s => s.getBaseName()).join(', ')}`; + } + throw new Error(message); + } + const imports = sourceFile + .getImportDeclarations() + .map(d => d.getStructure()) + .flatMap(s => { + return [ + ...((s.namedImports || []) as ImportSpecifierStructure[]).map(x => x.name), + s.namespaceImport, + ].filter(Boolean); + }); + if (uniq(imports).length !== imports.length) { + throw new Error(`Duplicated import in ${filePath}: ${imports.toString()}`); } - if (emptyFieldsFiles.length > 0) { - throw new Error(`No defined fields in ${emptyFieldsFiles.join(', ')}`); + // Find classes without @Field() (must define one or more fields) + const properties = sourceFile.getClass(() => true)?.getProperties(); + if (properties && !properties.some(p => p.getDecorator('Field'))) { + emptyFieldsFiles.push(sourceFile.getBaseName()); } + } + if (emptyFieldsFiles.length > 0) { + throw new Error(`No defined fields in ${emptyFieldsFiles.join(', ')}`); + } - return { project, sourceFiles }; + return { project, sourceFiles }; } /** * Get generator options after run prisma generate. */ async function createGeneratorOptions( - schema: string, - options?: string[], - provider: 'postgresql' | 'mongodb' = 'postgresql', + schema: string, + options?: string[], + provider: 'postgresql' | 'mongodb' = 'postgresql', ): Promise { - const schemaHeader = ` + const schemaHeader = ` datasource db { provider = "${provider}" url = env("DATABASE_URL") @@ -132,12 +124,12 @@ async function createGeneratorOptions( previewFeatures = ["filterJson", "fullTextSearch", "referentialIntegrity", "extendedIndexes", "fullTextIndex"] } `; - // eslint-disable-next-line prefer-rest-params - const hash = createHash(generatorVersion, schemaHeader, arguments); - const cacheFile = `${cachePath}/options-${hash}.js`; - if (!fs.existsSync(cacheFile)) { - const schemaFile = `${cachePath}/schema-${hash}.prisma`; - const schemaContent = ` + // eslint-disable-next-line prefer-rest-params + const hash = createHash(generatorVersion, schemaHeader, arguments); + const cacheFile = `${cachePath}/options-${hash}.js`; + if (!fs.existsSync(cacheFile)) { + const schemaFile = `${cachePath}/schema-${hash}.prisma`; + const schemaContent = ` ${schemaHeader} generator proxy { provider = "node -r ts-node/register/transpile-only src/test/proxy-generator.ts" @@ -147,29 +139,29 @@ async function createGeneratorOptions( } ${schema} `; - fs.writeFileSync(schemaFile, schemaContent); + fs.writeFileSync(schemaFile, schemaContent); - await new Promise((resolve, reject) => { - const proc = exec( - `node node_modules/prisma/build/index.js generate --schema=${schemaFile}`, - ); - if (!proc.stderr) { - throw new Error('Generate error'); - } - proc.stdout?.pipe(process.stdout); - proc.stderr.on('data', data => { - reject(String(data)); - }); - proc.on('error', reject); - proc.on('exit', code => { - code === 0 ? resolve(0) : reject(); - }); - }); - } - // eslint-disable-next-line unicorn/prefer-module - return require(cacheFile); + await new Promise((resolve, reject) => { + const proc = exec( + `node node_modules/prisma/build/index.js generate --schema=${schemaFile}`, + ); + if (!proc.stderr) { + throw new Error('Generate error'); + } + proc.stdout?.pipe(process.stdout); + proc.stderr.on('data', data => { + reject(String(data)); + }); + proc.on('error', reject); + proc.on('exit', code => { + code === 0 ? resolve(0) : reject(); + }); + }); + } + // eslint-disable-next-line unicorn/prefer-module + return require(cacheFile); } function createHash(...data: unknown[]) { - return crypto.createHash('md5').update(JSON.stringify(data)).digest('hex'); + return crypto.createHash('md5').update(JSON.stringify(data)).digest('hex'); } diff --git a/src/test/test.spec.ts b/src/test/test.spec.ts index e3476ff0..549efba7 100644 --- a/src/test/test.spec.ts +++ b/src/test/test.spec.ts @@ -1,11 +1,11 @@ import expect from 'expect'; import { - ClassDeclaration, - ImportDeclarationStructure, - ImportSpecifierStructure, - Project, - PropertyDeclarationStructure, - SourceFile, + ClassDeclaration, + ImportDeclarationStructure, + ImportSpecifierStructure, + Project, + PropertyDeclarationStructure, + SourceFile, } from 'ts-morph'; import { getPropertyStructure } from './helpers'; @@ -23,25 +23,25 @@ let imports: { name: string; specifier: string }[]; const p = (name: string) => getPropertyStructure(sourceFile, name); const d = (name: string) => getPropertyStructure(sourceFile, name)?.decorators?.[0]; const t = (name: string) => - getPropertyStructure(sourceFile, name)?.decorators?.find(d => d.name === 'Field') - ?.arguments?.[0]; + getPropertyStructure(sourceFile, name)?.decorators?.find(d => d.name === 'Field') + ?.arguments?.[0]; const setSourceFile = (name: string) => { - sourceFile = project.getSourceFile(s => s.getFilePath().endsWith(name))!; - classFile = sourceFile.getClass(() => true)!; - sourceText = sourceFile.getText(); - importDeclarations = sourceFile.getImportDeclarations().map(d => d.getStructure()); - imports = importDeclarations.flatMap(d => - (d.namedImports as ImportSpecifierStructure[]).map(x => ({ - name: x.name, - specifier: d.moduleSpecifier, - })), - ); + sourceFile = project.getSourceFile(s => s.getFilePath().endsWith(name))!; + classFile = sourceFile.getClass(() => true)!; + sourceText = sourceFile.getText(); + importDeclarations = sourceFile.getImportDeclarations().map(d => d.getStructure()); + imports = importDeclarations.flatMap(d => + (d.namedImports as ImportSpecifierStructure[]).map(x => ({ + name: x.name, + specifier: d.moduleSpecifier, + })), + ); }; describe.skip('user test', () => { - before(async () => { - ({ project, sourceFiles } = await testGenerate({ - schema: ` + before(async () => { + ({ project, sourceFiles } = await testGenerate({ + schema: ` model User { id Int @id @default(autoincrement()) email String @unique @@ -58,43 +58,43 @@ model Post { authorId Int? } `, - options: [ - `outputFilePattern = "{name}.{type}.ts"`, - `useInputType_WhereInput_ALL = "WhereInput"`, - `useInputType_CreateOne_ALL = "UncheckedCreate"`, - ], - })); - }); + options: [ + `outputFilePattern = "{name}.{type}.ts"`, + `useInputType_WhereInput_ALL = "WhereInput"`, + `useInputType_CreateOne_ALL = "UncheckedCreate"`, + ], + })); + }); - it('^', () => { - for (const sourceFile of project.getSourceFiles()) { - const classDeclaration = sourceFile.getClass(() => true); - if (!classDeclaration) { - continue; - } - const referencedSymbols = classDeclaration.findReferences(); - if (referencedSymbols.length > 1) { - continue; - } - console.log('class name', classDeclaration.getName()); - // console.log('referencedSymbols.length', referencedSymbols.length); - // for (const referencedSymbol of referencedSymbols) { - // for (const reference of referencedSymbol.getReferences()) { - // console.log('---------'); - // console.log('REFERENCE'); - // console.log('---------'); - // console.log( - // 'File path: ' + reference.getSourceFile().getFilePath(), - // ); - // console.log('Start: ' + reference.getTextSpan().getStart()); - // console.log('Length: ' + reference.getTextSpan().getLength()); - // console.log( - // 'Parent kind: ' + - // reference.getNode().getParentOrThrow().getKindName(), - // ); - // console.log('\n'); - // } - // } - } - }); + it('^', () => { + for (const sourceFile of project.getSourceFiles()) { + const classDeclaration = sourceFile.getClass(() => true); + if (!classDeclaration) { + continue; + } + const referencedSymbols = classDeclaration.findReferences(); + if (referencedSymbols.length > 1) { + continue; + } + console.log('class name', classDeclaration.getName()); + // console.log('referencedSymbols.length', referencedSymbols.length); + // for (const referencedSymbol of referencedSymbols) { + // for (const reference of referencedSymbol.getReferences()) { + // console.log('---------'); + // console.log('REFERENCE'); + // console.log('---------'); + // console.log( + // 'File path: ' + reference.getSourceFile().getFilePath(), + // ); + // console.log('Start: ' + reference.getTextSpan().getStart()); + // console.log('Length: ' + reference.getTextSpan().getLength()); + // console.log( + // 'Parent kind: ' + + // reference.getNode().getParentOrThrow().getKindName(), + // ); + // console.log('\n'); + // } + // } + } + }); }); diff --git a/src/types.ts b/src/types.ts index 499cf748..86b1dced 100644 --- a/src/types.ts +++ b/src/types.ts @@ -15,32 +15,32 @@ export type Model = DMMF.Model; export type FieldOutputType = SchemaField['outputType']; export type TypeRecord = Partial<{ - /** - * TypeScript field/property type - * @type {string} - */ - fieldType: string; - fieldModule: string; - graphqlType: string; - graphqlModule: string; + /** + * TypeScript field/property type + * @type {string} + */ + fieldType: string; + fieldModule: string; + graphqlType: string; + graphqlModule: string; }>; export type GeneratorConfiguration = ReturnType; export type EventArguments = { - models: Map; - modelNames: string[]; - modelFields: Map>; - fieldSettings: Map>; - config: GeneratorConfiguration; - project: Project; - output: string; - getSourceFile(args: { type: string; name: string }): SourceFile; - eventEmitter: AwaitEventEmitter; - typeNames: Set; - removeTypes: Set; - enums: Record; - getModelName(name: string): string | undefined; + models: Map; + modelNames: string[]; + modelFields: Map>; + fieldSettings: Map>; + config: GeneratorConfiguration; + project: Project; + output: string; + getSourceFile(args: { type: string; name: string }): SourceFile; + eventEmitter: AwaitEventEmitter; + typeNames: Set; + removeTypes: Set; + enums: Record; + getModelName(name: string): string | undefined; }; export type ImportNameSpec = { name: string; specifier?: string };