/pal-repro

Reproduction of Pal.js incomplete one-to-many codegen

Primary LanguageTypeScript

Reproduction of Pal.js bug

For git issue paljs/prisma-tools#252

This is a clone of paljs/prisma-tools/packages/create/examples/apollo-sdl-first. A bare minimum reproduction of a simple one-to-many example not code generating the ProductUpdateManyMutationInput interface.

model User {
id Int @id @default(autoincrement())
username String @unique
password String
products Product[]
}
model Product {
id Int @id @default(autoincrement())
owner User @relation(fields: [ownerId], references: [id])
ownerId Int
}

Notice how the definition for ProductUpdateManyMutationInput is not being generated.

/*
export interface ProductUpdateManyMutationInput {
   ... missing ...
}
*/

export interface UpdateManyProductArgs {
data: ProductUpdateManyMutationInput
where?: ProductWhereInput
}

Though UserUpdateManyMutationInput is being generated.

export interface UserUpdateManyMutationInput {
username?: StringFieldUpdateOperationsInput
password?: StringFieldUpdateOperationsInput
}