query listTeam (
    $orderByCreatedDate: OrderDirection
    $limit: Int
  ) @auth(level: USER) {
  teams(
    orderBy: { createdDate: $orderByCreatedDate }
    limit: $limit
  ) {
    id
    teamName
    ownerId
    ownerName
    ownerRole
    favoriteStaff
    blockedStaff
  }
}

query getTeamById(
  $id: UUID!
) @auth(level: USER) {
  team(id: $id) {
    id
    teamName
    ownerId
    ownerName
    ownerRole
    favoriteStaff
    blockedStaff
  }
}

query filterTeam(
  $teamName: String,
  $ownerId: String,
  $ownerRole: TeamOwnerRole
) @auth(level: USER) {
  teams(
    where: {
      teamName: { eq: $teamName }
      ownerId: { eq: $ownerId }
      ownerRole: { eq: $ownerRole }
    }
  ) {
    id
    teamName
    ownerId
    ownerName
    ownerRole
    favoriteStaff
    blockedStaff
  }
}
