query listTeamHubs @auth(level: USER) {
  teamHubs {
    id
    teamId
    hubName
    address
    city
    state
    zipCode
    managerName
    isActive
    departments
    createdAt
    updatedAt
    createdBy
  }
}

query getTeamHubById($id: UUID!) @auth(level: USER) {
  teamHub(id: $id) {
    id
    teamId
    hubName
    address
    city
    state
    zipCode
    managerName
    isActive
    departments
    createdAt
    updatedAt
    createdBy
  }
}

query getTeamHubsByTeamId($teamId: UUID!) @auth(level: USER) {
  teamHubs(where: { teamId: { eq: $teamId } }) {
    id
    teamId
    hubName
    address
    city
    state
    zipCode
    managerName
    isActive
    departments
    createdAt
    updatedAt
    createdBy
  }
}

# ------------------------------------------------------------
# LIST TEAM HUBS BY OWNER (Vendor/Business)
# ------------------------------------------------------------
query listTeamHubsByOwnerId(
  $ownerId: UUID!
) @auth(level: USER) {
  teamHubs(
    where: {
      team: {
        ownerId: { eq: $ownerId }
      }
    }
  ) {
    id
    teamId
    hubName
    address
    city
    state
    zipCode
    managerName
    isActive
    departments
    createdAt
  }
}