Skip to content
Snippets Groups Projects
types.graphql 558 B
Newer Older
Tamlyn Rhodes's avatar
Tamlyn Rhodes committed
type User @model {
  id: ID! @isUnique
  type: String
  username: String!
  email: String! @isUnique
  password: String!
  admin: Boolean!
  teams: [Team!]! @relation(name: "TeamMembers")
  posts: [Post!]! @relation(name: "PostOwners")
}


type Team @model {
  id: ID! @isUnique
  type: String!
  name: String!
  members: [User!]! @relation(name: "TeamMembers")
}

type Post @model {
  id: ID! @isUnique
  title: String!
  published: Boolean
  source: String
  presentation: String
  publishedAt: DateTime
  owners: [User!]! @relation(name: "PostOwners")
}