merge with dev
This commit is contained in:
@@ -1,47 +1,30 @@
|
||||
|
||||
# ----------------------------------------------------------
|
||||
# LIST ALL COST CENTERS
|
||||
# ----------------------------------------------------------
|
||||
query listCostCenters(
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
) @auth(level: USER) {
|
||||
costCenters(offset: $offset, limit: $limit) {
|
||||
query listCostCenters @auth(level: USER) {
|
||||
costCenters {
|
||||
id
|
||||
name
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
businessId
|
||||
}
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------
|
||||
# GET BY ID
|
||||
# ----------------------------------------------------------
|
||||
query getCostCenterById($id: UUID!) @auth(level: USER) {
|
||||
costCenter(id: $id) {
|
||||
id
|
||||
name
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
businessId
|
||||
}
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------
|
||||
# GET COST CENTER LINKED TO A SPECIFIC HUB
|
||||
# ----------------------------------------------------------
|
||||
query getCostCenterByHubId($hubId: UUID!) @auth(level: USER) {
|
||||
hubs(where: { id: { eq: $hubId } }) {
|
||||
query filterCostCenters(
|
||||
$name: String,
|
||||
$businessId: UUID
|
||||
) @auth(level: USER) {
|
||||
costCenters(
|
||||
where: {
|
||||
name: { eq: $name },
|
||||
businessId: { eq: $businessId }
|
||||
}) {
|
||||
id
|
||||
name
|
||||
costCenterId
|
||||
costCenter {
|
||||
id
|
||||
name
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
}
|
||||
businessId
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user