Pascal Sthamer
10/19/2020, 1:26 PMprisma-client-js
generates the following invalid TypeScript types t.crud.updateOne*
export type Game_server_port.gameServerId_binding_protocol_uniqueCompoundUniqueInput = {
gameServerId: number
binding: number
protocol: GameServerPortProtocol
}
export type Game_server_port.gameServerId_identifier_uniqueCompoundUniqueInput = {
gameServerId: number
identifier: string
}
export type Game_server_port.gameServerId_number_protocol_uniqueCompoundUniqueInput = {
gameServerId: number
number: number
protocol: GameServerPortProtocol
}
export type Game_server_setting.gameServerId_gameSettingId_uniqueCompoundUniqueInput = {
gameServerId: number
gameSettingId: number
}
export type Game_server_setting_preset.gameServerId_name_uniqueCompoundUniqueInput = {
gameServerId: number
name: string
}
janpio
t.crud
is not part of Prisma CLient - are you also using Nexus Plugin Prisma?Pascal Sthamer
10/19/2020, 1:33 PMgenerated/prisma-client/index.d.ts
(the path I defined in schema.prisma under generator.output) instead of generated/nexus-prisma.ts
(the path I configured for nexus-plugin-prisma in outputs.typegen)janpio
prisma init
, put your schema in that project and run prisma generate
to confirm?Pascal Sthamer
10/19/2020, 1:35 PMPascal Sthamer
10/19/2020, 1:39 PMprisma init
in a fresh directory, copied only my prisma.schema
and then ran prisma generate
.Pascal Sthamer
10/19/2020, 1:41 PMmodel GameServer {
id Int @id @default(autoincrement())
ports GameServerPort[]
@@map("game_server")
}
model GameServerPort {
id Int @id @default(autoincrement())
/// varchar(32)
identifier String
protocol GameServerPortProtocol
/// unsigned smallint, container port
number Int
/// unsigned smallint, host port
binding Int
gameServerId Int
/// ON UPDATE CASCADE, ON DELETE CASCADE
gameServer GameServer @relation(fields: [gameServerId], references: [id])
@@unique([gameServerId, binding, protocol], name: "game_server_port.gameServerId_binding_protocol_unique")
@@unique([gameServerId, identifier], name: "game_server_port.gameServerId_identifier_unique")
@@unique([gameServerId, number, protocol], name: "game_server_port.gameServerId_number_protocol_unique")
@@map("game_server_port")
}
enum GameServerPortProtocol {
TCP
UDP
@@map("game_server_port_protocol")
}
Pascal Sthamer
10/19/2020, 1:42 PMprisma migrate
.janpio
Pascal Sthamer
10/19/2020, 1:44 PMjanpio
Pascal Sthamer
10/19/2020, 1:56 PM