# ------------------------------------------------------
# THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)
# ------------------------------------------------------

type Person {
  _id: UUID!
  givenName: String!
  familyName: String!
  email: EmailAddress!
  token: String
  _adminOf: [UUID!]
  adminOf: [Organizer!]
  _organizerOf: [UUID!]
  organizerOf: [Organizer!]
}

"""UUID"""
scalar UUID

"""
A field whose value conforms to the standard internet email address format as specified in RFC822: https://www.w3.org/Protocols/rfc822/.
"""
scalar EmailAddress

type Organizer {
  _id: UUID!
  name: String!
  plz: Int
  ort: String
  logo: String
  _admins: [UUID!]
  _organizers: [UUID!]
  _pending: [UUID!]
  admins: [Person!]
  organizers: [Person!]
  pending: [Person!]
}

type Apparatus {
  _id: UUID!
  name: String!
  logo: String
}

type Timeslot {
  _id: UUID!
  time: Time!
}

"""A time string HH:MM:SS"""
scalar Time

type Event {
  _id: UUID!
  name: String
  date: Date!
  timeslots: [Timeslot!]!
  _organizer: UUID!
  organizer: Organizer!
}

"""A date string YYYY-MM-DD"""
scalar Date

type Query {
  Person(id: UUID!): Person
  PersonFind(offset: Int, limit: Int, email: String, familyName: String, givenName: String): [Person!]
  Apparatus(id: UUID!): Apparatus
  ApparatusFind(offset: Int, limit: Int, name: String): [Apparatus!]
  Organizer(id: UUID!): Organizer
  OrganizerFind(offset: Int, limit: Int, ort: String, plz: Int, name: String): [Organizer!]
  Event(id: UUID!): Event
  EventFind(offset: Int, limit: Int, organizer: UUID, date: Date): [Event!]
}

type Mutation {
  login(token: String, passwort: String, email: String): Person!
  PersonRegister(passwort: String!, email: EmailAddress!, familyName: String!, givenName: String!, organizer: UUID!): Person!
  PersonConfirmMail(confirmCode: String!, email: String!): Person
  ChangePassword(newPassword: String!, oldPassword: String!): Boolean!
  OrganizerRegister(ort: String, plz: Int, name: String!): Organizer!
  EventCreate(name: String, date: Date!, organizer: UUID!): Event!
}

type Subscription {
  PersonUpdated: Person!
}
