prisma / prisma-admin-feedback

Feedback for Prisma Admin (currently in invite-only preview)
6 stars 1 forks source link

'id' Int value expected after the first relation #151

Open createvo opened 4 years ago

createvo commented 4 years ago

Hello, I think I find a little bug on prisma admin on Prisma Server 1.34.

I have a datamodel like this:

type Immobile {
    id: Int! @id
    createdAt: DateTime! @createdAt
    updatedAt: DateTime! @updatedAt
    piani: [ImmobilePiano]
}

type ImmobilePiano {
    id: Int! @id
    createdAt: DateTime! @createdAt
    updatedAt: DateTime! @updatedAt
    nome: String!
}

While create a record in Immobile, at the first create relation of ImmobilePiano all works well, but then at the second insert of another ImmobilePiano relation I retrieve this error:

[
  "Argument 'where' expected type 'ImmobilePianoWhereUniqueInput!' but got: {id: \"cjysyzz320002285vn1fw7wck\"}. Reason: 'id' Int value expected [...]
]

Then I need to relaod the page to continue and insert other relations.

I think is because the Int Value on ID is not well implement.

ratio91 commented 4 years ago

I face the same issue: Variable '$where' expected value of type 'EntityWhereUniqueInput!' but got: {"gln":"1"}. Reason: 'gln' Int value expected