Files
Krow-workspace/backend/dataconnect/example/teamHudDeparment/queries.gql

69 lines
1.2 KiB
GraphQL

# ----------------------------------------------------------
# LIST ALL (admin/debug)
# ----------------------------------------------------------
query listTeamHudDepartments(
$offset: Int
$limit: Int
) @auth(level: USER) {
teamHudDepartments(offset: $offset, limit: $limit) {
id
name
costCenter
teamHubId
teamHub {
id
hubName
}
createdAt
}
}
# ----------------------------------------------------------
# GET BY ID
# ----------------------------------------------------------
query getTeamHudDepartmentById($id: UUID!) @auth(level: USER) {
teamHudDepartment(id: $id) {
id
name
costCenter
teamHubId
teamHub {
id
hubName
}
createdAt
}
}
# ----------------------------------------------------------
# LIST BY TEAM HUB ID
# ----------------------------------------------------------
query listTeamHudDepartmentsByTeamHubId(
$teamHubId: UUID!
$offset: Int
$limit: Int
) @auth(level: USER) {
teamHudDepartments(
where: { teamHubId: { eq: $teamHubId } }
offset: $offset
limit: $limit
) {
id
name
costCenter
teamHubId
teamHub {
id
hubName
}
createdAt
}
}