Im currently doing the GraphQL node.js demo tutori...
# orm-help
d
Im currently doing the GraphQL node.js demo tutorial, and I'm unable to complete it - when I try to update my data model to include
Vote
, I get an error when trying to run
prisma deploy
Copy code
I  ~/w/hackernews-node  prisma deploy
Deploying service `hackernews-node` to stage `dev` to server `prisma-eu1` 208ms

Errors:

  Link
    ✖ One field of the type `Link` must be marked as the id field with the `@id` directive.

  User
    ✖ One field of the type `User` must be marked as the id field with the `@id` directive.

  Vote
    ✖ One field of the type `Vote` must be marked as the id field with the `@id` directive.

Deployment canceled. Please fix the above errors to continue deploying.
Read more about deployment errors here: <https://bit.ly/prisma-force-flag>
2
n
Hey Dario, we've just updated Prisma to use a new datamodel syntax. Actually the tutorial is also already updated, just refresh the page 🙂
Copy code
type Link {
  id: ID! @id
  createdAt: DateTime! @createdAt
  description: String!
  url: String!
  postedBy: User
  votes: [Vote!]!
}

type User {
  id: ID! @id
  name: String!
  email: String! @unique
  password: String!
  links: [Link!]!
  votes: [Vote!]!
}

type Vote {
  id: ID! @id
  link: Link!
  user: User!
}
d
hahaha isn't that a coincidence!
❤️ thanks a bunch!
🙌 1