Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find name 'IntFilter' #204

Open
Dilanjer opened this issue Dec 27, 2023 · 0 comments
Open

Cannot find name 'IntFilter' #204

Dilanjer opened this issue Dec 27, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@Dilanjer
Copy link

Dilanjer commented Dec 27, 2023

Hello, when generating code I am missing In IntFilter,
but when I set false combineScalarFilters then everything is create

prisma Version 5.7.1
prisma-nestjs-graphql Version 20.0.2

my prisma schema

generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

generator nestgraphql {
  provider                = "node node_modules/prisma-nestjs-graphql"
  output                  = "../src/@gql-types"
  purgeOutput             = false
  combineScalarFilters    = true
  emitSingle              = true
  noAtomicOperations      = true
  // field validator
  fields_Validator_input  = true
  fields_Validator_output = true
  fields_Validator_model  = true
  fields_Validator_from   = "class-validator"
  // Args where|data nested validator
  decorate_1_type         = "*Args"
  decorate_1_field        = "@(data|where)"
  decorate_1_name         = ValidateNested
  decorate_1_from         = "class-validator"
  decorate_1_arguments    = "[]"
}

model User {
  id        String   @id @default(uuid())
  createdAt DateTime @default(now()) @map("created_at")
  updatedAt DateTime @updatedAt @map("updated_at")

  @@map("user")
}

@InputType()
export class DateTimeWithAggregatesFilter {
    @Field(() => Date, {nullable:true})
    equals?: Date | string;
    @Field(() => [Date], {nullable:true})
    in?: Array<Date> | Array<string>;
    @Field(() => [Date], {nullable:true})
    notIn?: Array<Date> | Array<string>;
    @Field(() => Date, {nullable:true})
    lt?: Date | string;
    @Field(() => Date, {nullable:true})
    lte?: Date | string;
    @Field(() => Date, {nullable:true})
    gt?: Date | string;
    @Field(() => Date, {nullable:true})
    gte?: Date | string;
    @Field(() => DateTimeWithAggregatesFilter, {nullable:true})
    not?: InstanceType<typeof DateTimeWithAggregatesFilter>;
    @Field(() => IntFilter, {nullable:true}) // IntFilter error
    _count?: InstanceType<typeof IntFilter>; // IntFilter error
    @Field(() => DateTimeFilter, {nullable:true})
    _min?: InstanceType<typeof DateTimeFilter>;
    @Field(() => DateTimeFilter, {nullable:true})
    _max?: InstanceType<typeof DateTimeFilter>;
}

vscode error Cannot find name 'IntFilter'. Public property '_count' of exported class has or is using private name 'IntFilter'.

@unlight unlight added the bug Something isn't working label Jan 26, 2025
@unlight unlight self-assigned this Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants