Hi all! Running into an issue with the generation of resolversTypes.ts for the SDL generator.
(property) FeaturesArgs.cursor?: ElementAWhereUniqueInput
Subsequent property declarations must have the same type. Property 'cursor' must be of type 'ElementAWhereUniqueInput', but here has type 'ElementBWhereUniqueInput'.ts(2717)
resolversTypes.ts(8851, 3): 'cursor' was also declared here.
Because everything is dropped into the resolversTypes.ts file, there are several collisions where the same interface is exported. Example that generates the above error message:
// resolversTypes.ts
// Generated for use with Foo.features
export interface FeaturesArgs {
where?: ElementAWhereInput | null
orderBy?: ElementAOrderByInput[] | null
cursor?: ElementAWhereUniqueInput | null
take?: number | null
skip?: number | null
distinct?: ElementAScalarFieldEnum[] | null
}
// Generated for use with Bar.features
export interface FeaturesArgs {
where?: ElementBWhereInput | null
orderBy?: ElementBOrderByInput[] | null
cursor?: ElementBWhereUniqueInput | null
take?: number | null
skip?: number | null
distinct?: ElementBScalarFieldEnum[] | null
}
The associated models in the schema.prisma file contain the same feature attribute, but of different types
// schema.prisma
model Foo {
features ElementA[]
}
model Bar {
features ElementB[]
}
Hi all! Running into an issue with the generation of
resolversTypes.ts
for the SDL generator.Because everything is dropped into the
resolversTypes.ts
file, there are several collisions where the same interface is exported. Example that generates the above error message:The associated models in the
schema.prisma
file contain the samefeature
attribute, but of different types