Skip to content

Commit

Permalink
feat: Combine zoo of nested/nullable filters
Browse files Browse the repository at this point in the history
  • Loading branch information
unlight committed Aug 29, 2020
1 parent 2121885 commit 20f965b
Show file tree
Hide file tree
Showing 27 changed files with 172 additions and 610 deletions.
6 changes: 3 additions & 3 deletions src/@generated/article/article-scalar-where.input.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Field, InputType } from '@nestjs/graphql';

import { CommentFilter } from '../comment/comment-filter.input';
import { BooleanFilter } from '../prisma/boolean-filter.input';
import { DateTimeFilter } from '../prisma/date-time-filter.input';
import { IntFilter } from '../prisma/int-filter.input';
import { NullableBooleanFilter } from '../prisma/nullable-boolean-filter.input';
import { StringFilter } from '../prisma/string-filter.input';
import { TagFilter } from '../tag/tag-filter.input';
import { UserFilter } from '../user/user-filter.input';
Expand Down Expand Up @@ -82,11 +82,11 @@ export class ArticleScalarWhereInput {
})
comments?: CommentFilter | null;

@Field(() => NullableBooleanFilter, {
@Field(() => BooleanFilter, {
nullable: true,
description: undefined,
})
active?: boolean | NullableBooleanFilter | null;
active?: boolean | BooleanFilter | null;

@Field(() => [ArticleScalarWhereInput], {
nullable: true,
Expand Down
6 changes: 3 additions & 3 deletions src/@generated/article/article-where.input.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Field, InputType } from '@nestjs/graphql';

import { CommentFilter } from '../comment/comment-filter.input';
import { BooleanFilter } from '../prisma/boolean-filter.input';
import { DateTimeFilter } from '../prisma/date-time-filter.input';
import { IntFilter } from '../prisma/int-filter.input';
import { NullableBooleanFilter } from '../prisma/nullable-boolean-filter.input';
import { StringFilter } from '../prisma/string-filter.input';
import { TagFilter } from '../tag/tag-filter.input';
import { UserFilter } from '../user/user-filter.input';
Expand Down Expand Up @@ -83,11 +83,11 @@ export class ArticleWhereInput {
})
comments?: CommentFilter | null;

@Field(() => NullableBooleanFilter, {
@Field(() => BooleanFilter, {
nullable: true,
description: undefined,
})
active?: boolean | NullableBooleanFilter | null;
active?: boolean | BooleanFilter | null;

@Field(() => [ArticleWhereInput], {
nullable: true,
Expand Down
5 changes: 2 additions & 3 deletions src/@generated/comment/comment-scalar-where.input.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Field, InputType } from '@nestjs/graphql';

import { DateTimeFilter } from '../prisma/date-time-filter.input';
import { NullableStringFilter } from '../prisma/nullable-string-filter.input';
import { StringFilter } from '../prisma/string-filter.input';

@InputType({})
Expand Down Expand Up @@ -36,11 +35,11 @@ export class CommentScalarWhereInput {
})
authorId?: string | StringFilter;

@Field(() => NullableStringFilter, {
@Field(() => StringFilter, {
nullable: true,
description: undefined,
})
articleId?: string | NullableStringFilter | null;
articleId?: string | StringFilter | null;

@Field(() => [CommentScalarWhereInput], {
nullable: true,
Expand Down
5 changes: 2 additions & 3 deletions src/@generated/comment/comment-where.input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Field, InputType } from '@nestjs/graphql';

import { ArticleRelationFilter } from '../article/article-relation-filter.input';
import { DateTimeFilter } from '../prisma/date-time-filter.input';
import { NullableStringFilter } from '../prisma/nullable-string-filter.input';
import { StringFilter } from '../prisma/string-filter.input';
import { UserRelationFilter } from '../user/user-relation-filter.input';

Expand Down Expand Up @@ -38,11 +37,11 @@ export class CommentWhereInput {
})
authorId?: string | StringFilter;

@Field(() => NullableStringFilter, {
@Field(() => StringFilter, {
nullable: true,
description: undefined,
})
articleId?: string | NullableStringFilter | null;
articleId?: string | StringFilter | null;

@Field(() => [CommentWhereInput], {
nullable: true,
Expand Down
18 changes: 0 additions & 18 deletions src/@generated/prisma/bool-nullable-filter.input.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { Field, InputType } from '@nestjs/graphql';

@InputType({})
export class NestedBoolNullableFilter {
export class BooleanFilter {
@Field(() => Boolean, {
nullable: true,
description: undefined,
})
equals?: boolean | null;

@Field(() => NestedBoolNullableFilter, {
@Field(() => BooleanFilter, {
nullable: true,
description: undefined,
})
not?: NestedBoolNullableFilter | null;
not?: boolean | null | BooleanFilter;
}
48 changes: 0 additions & 48 deletions src/@generated/prisma/int-nullable-filter.input.ts

This file was deleted.

46 changes: 0 additions & 46 deletions src/@generated/prisma/nested-date-time-filter.input.ts

This file was deleted.

46 changes: 0 additions & 46 deletions src/@generated/prisma/nested-int-filter.input.ts

This file was deleted.

46 changes: 0 additions & 46 deletions src/@generated/prisma/nested-int-nullable-filter.input.ts

This file was deleted.

64 changes: 0 additions & 64 deletions src/@generated/prisma/nested-string-filter.input.ts

This file was deleted.

Loading

0 comments on commit 20f965b

Please sign in to comment.