teamhub is hub
This commit is contained in:
@@ -1,62 +0,0 @@
|
||||
mutation createHub(
|
||||
$name: String!
|
||||
$locationName: String
|
||||
$address: String
|
||||
$nfcTagId: String
|
||||
$ownerId: UUID!
|
||||
) @auth(level: USER) {
|
||||
hub_insert(
|
||||
data: {
|
||||
name: $name
|
||||
locationName: $locationName
|
||||
address: $address
|
||||
nfcTagId: $nfcTagId
|
||||
ownerId: $ownerId
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
mutation updateHub(
|
||||
$id: UUID!
|
||||
$name: String
|
||||
$locationName: String
|
||||
$address: String
|
||||
$nfcTagId: String
|
||||
$ownerId: UUID
|
||||
) @auth(level: USER) {
|
||||
hub_update(
|
||||
id: $id
|
||||
data: {
|
||||
name: $name
|
||||
locationName: $locationName
|
||||
address: $address
|
||||
nfcTagId: $nfcTagId
|
||||
ownerId: $ownerId
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
)
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
query listHubs @auth(level: USER) {
|
||||
hubs {
|
||||
id
|
||||
name
|
||||
locationName
|
||||
address
|
||||
nfcTagId
|
||||
ownerId
|
||||
costCenterId
|
||||
costCenter {
|
||||
id
|
||||
name
|
||||
}
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
}
|
||||
}
|
||||
|
||||
query getHubById($id: UUID!) @auth(level: USER) {
|
||||
hub(id: $id) {
|
||||
id
|
||||
name
|
||||
locationName
|
||||
address
|
||||
nfcTagId
|
||||
ownerId
|
||||
costCenterId
|
||||
costCenter {
|
||||
id
|
||||
name
|
||||
}
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
}
|
||||
}
|
||||
|
||||
query getHubsByOwnerId($ownerId: UUID!) @auth(level: USER) {
|
||||
hubs(where: { ownerId: { eq: $ownerId } }) {
|
||||
id
|
||||
name
|
||||
locationName
|
||||
address
|
||||
nfcTagId
|
||||
ownerId
|
||||
costCenterId
|
||||
costCenter {
|
||||
id
|
||||
name
|
||||
}
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
}
|
||||
}
|
||||
|
||||
query filterHubs(
|
||||
$ownerId: UUID
|
||||
$name: String
|
||||
$nfcTagId: String
|
||||
) @auth(level: USER) {
|
||||
hubs(
|
||||
where: {
|
||||
ownerId: { eq: $ownerId }
|
||||
name: { eq: $name }
|
||||
nfcTagId: { eq: $nfcTagId }
|
||||
}
|
||||
) {
|
||||
id
|
||||
name
|
||||
locationName
|
||||
address
|
||||
nfcTagId
|
||||
ownerId
|
||||
costCenterId
|
||||
costCenter {
|
||||
id
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user