fix: Issue 523, 536 to delete duplicate queries and create cost center schema and queries
This commit is contained in:
@@ -39,3 +39,24 @@ mutation updateHub(
|
||||
mutation deleteHub($id: UUID!) @auth(level: USER) {
|
||||
hub_delete(id: $id)
|
||||
}
|
||||
|
||||
mutation assignCostCenterToHub(
|
||||
$hubId: UUID!
|
||||
$costCenterId: UUID!
|
||||
) @auth(level: USER) {
|
||||
hub_update(
|
||||
id: $hubId
|
||||
data: {
|
||||
costCenterId: $costCenterId
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
mutation removeCostCenterFromHub($hubId: UUID!) @auth(level: USER) {
|
||||
hub_update(
|
||||
id: $hubId
|
||||
data: {
|
||||
costCenterId: null
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
@@ -6,6 +6,11 @@ query listHubs @auth(level: USER) {
|
||||
address
|
||||
nfcTagId
|
||||
ownerId
|
||||
costCenterId
|
||||
costCenter {
|
||||
id
|
||||
name
|
||||
}
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
@@ -20,6 +25,11 @@ query getHubById($id: UUID!) @auth(level: USER) {
|
||||
address
|
||||
nfcTagId
|
||||
ownerId
|
||||
costCenterId
|
||||
costCenter {
|
||||
id
|
||||
name
|
||||
}
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
@@ -34,6 +44,11 @@ query getHubsByOwnerId($ownerId: UUID!) @auth(level: USER) {
|
||||
address
|
||||
nfcTagId
|
||||
ownerId
|
||||
costCenterId
|
||||
costCenter {
|
||||
id
|
||||
name
|
||||
}
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
@@ -58,5 +73,10 @@ query filterHubs(
|
||||
address
|
||||
nfcTagId
|
||||
ownerId
|
||||
costCenterId
|
||||
costCenter {
|
||||
id
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user