Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment Error with Boxed Error #197

Open
juicycleff opened this issue Apr 6, 2018 · 9 comments
Open

Deployment Error with Boxed Error #197

juicycleff opened this issue Apr 6, 2018 · 9 comments
Labels

Comments

@juicycleff
Copy link

Checking, if schema file changed !

ERROR: Boxed Error

{
  "errors": [
    {
      "message": "Boxed Error",
      "requestId": "api:api:cjfnvn2m6mf0n0b62e001snv5"
    }
  ],
  "status": 500
}

After a new prisma init, deployment to the cloud fails with Boxed error. Old projects deploy fine.

@marktani
Copy link
Contributor

marktani commented Apr 6, 2018

Which cluster are you deploying to?

@juicycleff
Copy link
Author

To prisma-us1

@juicycleff
Copy link
Author

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

@marktani
Copy link
Contributor

marktani commented Apr 6, 2018

Thanks, that's super helpful! I'll try to reproduce this and report in the Prisma repo.

@marktani
Copy link
Contributor

marktani commented Apr 6, 2018

I can't reproduce this, can you share your entire datamodel?

@BatuhanW
Copy link

BatuhanW commented May 4, 2018

@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?

@marktani marktani added the bug label May 5, 2018
@marktani
Copy link
Contributor

marktani commented May 5, 2018

That discussion provides further context: https://www.graph.cool/forum/t/graphql-prepare-issue-again/3414?u=nilan

@marktani
Copy link
Contributor

marktani commented May 5, 2018

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 🙂

@marktani
Copy link
Contributor

marktani commented May 5, 2018

Note that this error is returned when running graphql get-schema --project db.

@marktani marktani changed the title Deployment Error with BoxError Deployment Error with Boxed Error May 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants