prisma-nestjs-graphql icon indicating copy to clipboard operation
prisma-nestjs-graphql copied to clipboard

combineScalarFilters produces unresolvable type

Open scarrico-divergent opened this issue 2 years ago • 2 comments

when specifying combineScalarFilters config property, the generated ts definitions produce output similar to this

TS2304: Cannot find name 'FloatFilter'.
    1036 |     _count?: InstanceType<typeof IntFilter>;
    1037 |     @Field(() => FloatFilter, {nullable:true})
  > 1038 |     _avg?: InstanceType<typeof FloatFilter>;
         |                                ^^^^^^^^^^^
    1039 |     @Field(() => IntFilter, {nullable:true})
    1040 |     _sum?: InstanceType<typeof IntFilter>;
    1041 |     @Field(() => IntFilter, {nullable:true})

but FloatFilter is not defined..

seeing this issue on 18.0.2 and 18.1.1 (Prisma 4 compatible releases)

scarrico-divergent avatar Sep 07 '23 22:09 scarrico-divergent

@scarrico-divergent Could you provide your schema or part of it to reproduce the error?

unlight avatar Sep 16 '23 16:09 unlight

Are you using combineScalarFilters with emitSingle?

unlight avatar Sep 16 '23 16:09 unlight