Prisma 生成:要合并的字段配置具有重复的字段名称
Prisma generate: Field configuration to merge has duplicate field names
运行 prisma generate 我在这个输出中遇到了,没有生成代码。
prisma generate
Generating schema...
[ { species: { type: [Object], args: [Object] } },
{ species: { type: [Object], args: [Object] },
Generating schema !
! Field configuration to merge has duplicate field names.
我的架构有什么问题?
type User {
id: ID! @unique
email: String! @unique
name: String!
password: String!
entries: [Entry!]!
createdAt: DateTime!
updatedAt: DateTime!
}
type Language {
id: ID! @unique
language: String! @unique
createdAt: DateTime!
updatedAt: DateTime!
}
type EntryScientificName {
id: ID! @unique
entry: Entry!
isMain: Boolean!
scientificName: String! @unique
language: Language!
createdAt: DateTime!
updatedAt: DateTime!
}
type EntryName {
id: ID! @unique
entry: Entry!
isMain: Boolean!
name: String! @unique
Language: Language!
createdAt: DateTime!
updatedAt: DateTime!
}
type Species {
id: ID! @unique
species: String! @unique
description: String
createdAt: DateTime!
updatedAt: DateTime!
}
type Genus {
id: ID! @unique
genus: String! @unique
description: String
createdAt: DateTime!
updatedAt: DateTime!
}
type Family {
id: ID! @unique
family: String! @unique
description: String
createdAt: DateTime!
updatedAt: DateTime!
}
type Order {
id: ID! @unique
order: String! @unique
description: String
createdAt: DateTime!
updatedAt: DateTime!
}
type Habitat {
id: ID! @unique
habitat: String! @unique
description: String
createdAt: DateTime!
updatedAt: DateTime!
}
type Month {
id: ID! @unique
month: String! @unique
}
type Anthesis {
id: ID! @unique
entry: Entry
fromMonth: Month! @relation(name: "FromMonth")
toMonth: Month! @relation(name: "ToMonth")
note: String
createdAt: DateTime!
updatedAt: DateTime!
}
type Nation {
id: ID! @unique
nation: String! @unique
createdAt: DateTime!
updatedAt: DateTime!
}
type Region {
id: ID! @unique
nation: Nation!
region: String! @unique
createdAt: DateTime!
updatedAt: DateTime!
}
type DistributionDetail {
id: ID! @unique
detail: String!
createdAt: DateTime!
updatedAt: DateTime!
}
type GeographicDistribution {
id: ID! @unique
entry: Entry!
region: Region!
detail: DistributionDetail
createdAt: DateTime!
updatedAt: DateTime!
}
type Altitude {
id: ID! @unique
entry: Entry! @unique
altitudeFrom: Int! @unique @constraint(min: -10894, max: 408000)
altitudeTo: Int! @unique @constraint(min: -10894, max: 408000)
}
type Entry {
id: ID! @unique
name: [EntryName!]!
scientificName: [EntryScientificName!]!
species: Species
genus: Genus
family: Family
order: Order
biologicalForm: String
plantDescription: String
leafDescription: String
flowerDescription: String
fruitDescriptio: String
chorologicalType: String
habitat: [Habitat!]!
geographicDistribution: [GeographicDistribution!]!
altitude: [Altitude!]!
etymology: String
propertiesUses: String
curiosities: String
notes: String
links: [Link!]!
entryPicture: String
draft: Boolean @default(value: "true")
published: Boolean @default(value: "false")
toBeReviewed: Boolean @default(value: "false")
createdAt: DateTime!
updatedAt: DateTime!
author: User
}
type Link {
id: ID! @unique
createdAt: DateTime!
updatedAt: DateTime!
url: String!
description: String!
postedby: User
}
运行 prisma generate 我在这个输出中遇到了,没有生成代码。
prisma generate
Generating schema...
[ { species: { type: [Object], args: [Object] } },
{ species: { type: [Object], args: [Object] },
Generating schema !
! Field configuration to merge has duplicate field names.
我的架构有什么问题?
type User {
id: ID! @unique
email: String! @unique
name: String!
password: String!
entries: [Entry!]!
createdAt: DateTime!
updatedAt: DateTime!
}
type Language {
id: ID! @unique
language: String! @unique
createdAt: DateTime!
updatedAt: DateTime!
}
type EntryScientificName {
id: ID! @unique
entry: Entry!
isMain: Boolean!
scientificName: String! @unique
language: Language!
createdAt: DateTime!
updatedAt: DateTime!
}
type EntryName {
id: ID! @unique
entry: Entry!
isMain: Boolean!
name: String! @unique
Language: Language!
createdAt: DateTime!
updatedAt: DateTime!
}
type Species {
id: ID! @unique
species: String! @unique
description: String
createdAt: DateTime!
updatedAt: DateTime!
}
type Genus {
id: ID! @unique
genus: String! @unique
description: String
createdAt: DateTime!
updatedAt: DateTime!
}
type Family {
id: ID! @unique
family: String! @unique
description: String
createdAt: DateTime!
updatedAt: DateTime!
}
type Order {
id: ID! @unique
order: String! @unique
description: String
createdAt: DateTime!
updatedAt: DateTime!
}
type Habitat {
id: ID! @unique
habitat: String! @unique
description: String
createdAt: DateTime!
updatedAt: DateTime!
}
type Month {
id: ID! @unique
month: String! @unique
}
type Anthesis {
id: ID! @unique
entry: Entry
fromMonth: Month! @relation(name: "FromMonth")
toMonth: Month! @relation(name: "ToMonth")
note: String
createdAt: DateTime!
updatedAt: DateTime!
}
type Nation {
id: ID! @unique
nation: String! @unique
createdAt: DateTime!
updatedAt: DateTime!
}
type Region {
id: ID! @unique
nation: Nation!
region: String! @unique
createdAt: DateTime!
updatedAt: DateTime!
}
type DistributionDetail {
id: ID! @unique
detail: String!
createdAt: DateTime!
updatedAt: DateTime!
}
type GeographicDistribution {
id: ID! @unique
entry: Entry!
region: Region!
detail: DistributionDetail
createdAt: DateTime!
updatedAt: DateTime!
}
type Altitude {
id: ID! @unique
entry: Entry! @unique
altitudeFrom: Int! @unique @constraint(min: -10894, max: 408000)
altitudeTo: Int! @unique @constraint(min: -10894, max: 408000)
}
type Entry {
id: ID! @unique
name: [EntryName!]!
scientificName: [EntryScientificName!]!
species: Species
genus: Genus
family: Family
order: Order
biologicalForm: String
plantDescription: String
leafDescription: String
flowerDescription: String
fruitDescriptio: String
chorologicalType: String
habitat: [Habitat!]!
geographicDistribution: [GeographicDistribution!]!
altitude: [Altitude!]!
etymology: String
propertiesUses: String
curiosities: String
notes: String
links: [Link!]!
entryPicture: String
draft: Boolean @default(value: "true")
published: Boolean @default(value: "false")
toBeReviewed: Boolean @default(value: "false")
createdAt: DateTime!
updatedAt: DateTime!
author: User
}
type Link {
id: ID! @unique
createdAt: DateTime!
updatedAt: DateTime!
url: String!
description: String!
postedby: User
}