summaryrefslogtreecommitdiffstats
path: root/backend/database/datamodel.graphql
blob: 605e2424700439d2c2bcdc6b87244fe06f7e67ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
type Post {
  id: ID! @unique
  createdAt: DateTime!
  updatedAt: DateTime!
  isPublished: Boolean! @default(value: "false")
  title: String!
  text: String!
  author: User!
}

type User {
  id: ID! @unique
  email: String! @unique
  password: String!
  name: String!
  posts: [Post!]!
  website: String
  age: Int
}

type Item {
  id: ID! @unique
  title: String!
  description: String!
  price: Int!
}