Open juicycleff opened 6 years ago
Which cluster are you deploying to?
To prisma-us1
So @marktani I figured it out. It was syntax error on my end but to help anyone that gets this error, It means your db schema is bad and in my case here is the issue i added the unique directive to a field of type User
type Answers{ id: ID! @unique question: Questions! @relation(name:"QuestionAnswers") user: User! @unique value: OptionsEnum! }
The unique directive on the user of type User there which I placed accidentally was the issue. So boxed error is a syntax error
Thanks, that's super helpful! I'll try to reproduce this and report in the Prisma repo.
I can't reproduce this, can you share your entire datamodel?
@marktani You can reproduce this error like this;
type Profile {
id: ID! @unique
user: User! @unique
name: String!
username: String! @unique
}
Notice user
type here. It's not field, it's relation.
In my case I intentionally did that, because I want every user to have single profile. How can I achieve this?
That discussion provides further context: https://www.graph.cool/forum/t/graphql-prepare-issue-again/3414?u=nilan
In my case I intentionally did that, because I want every user to have single profile. How can I achieve this?
@BatuhanW, you cannot mark list or relation fields as @unique
🙂
Note that this error is returned when running graphql get-schema --project db
.
After a new prisma init, deployment to the cloud fails with Boxed error. Old projects deploy fine.