models.graphql 475 Bytes
type User {
  id: ID!
  avatarUrl: String
  name: String
  email: String!
  password: String
  phoneNumber: String
  emailSecret: String
  phoneSecret: String
  bio: String
  rooms: [Room]
  createdAt: String
  messages: [Message]
}

type Room {
  id: ID!
  participants: [User]
  categories: [Category]
}

type Category {
  id: ID!
  name: String
  rooms: [Room]
}

type Message {
  id: ID!
  text: String
  sender: User
}

type AuthPayload {
  token: String
  user: User
}