type NOTIFIED {
  from: NotificationSource
  to: User
  createdAt: String
  updatedAt: String
  read: Boolean
  reason: NotificationReason
}

union NotificationSource = Post | Comment

enum NotificationOrdering {
  createdAt_asc
  createdAt_desc
  updatedAt_asc
  updatedAt_desc
}

enum NotificationReason {
  mentioned_in_post
  mentioned_in_comment
  commented_on_post
}

type Query {
  notifications(read: Boolean, orderBy: NotificationOrdering): [NOTIFIED]
}

type Mutation {
  markAsRead(id: ID!): NOTIFIED
}
