query Users {
  users {
    id
    email
    name
    permissions
    interests
  }
}

mutation UserSignup($email: String!, $password: String!, $name: String!) {
  userSignup(email: $email, password: $password, name: $name) {
    id
    email
    name
  }
}

mutation UserLogin($email: String!, $password: String!) {
  userLogin(email: $email, password: $password) {
    id
    email
    name
  }
}

mutation UserLogout {
  userLogout
}

query CurrentUser {
  currentUser {
    id
    email
    name
    permissions
    interests
  }
}

mutation RequestReset($email: String!) {
  requestReset(email: $email)
}

mutation ResetPassword($token: String!, $password: String!) {
  resetPassword(token: $token, password: $password) {
    id
    name
  }
}

mutation UserDelete($id: ID!) {
  deleteUser(id: $id) {
    id
  }
}

mutation UserUpdate($id: ID!, $data: UserUpdateInput!) {
  updateUser(id: $id, data: $data) {
    id
    name
    email
    permissions
    interests
  }
}

mutation updatePermissions($id: ID!, $permissions: [Permission!]!) {
  updatePermissions(id: $id, permissions: $permissions) {
    id
  }
}
