chore(legacy): relocate v1 dataconnect source
This commit is contained in:
29
legacy/dataconnect-v1/connector/costCenter/mutations.gql
Normal file
29
legacy/dataconnect-v1/connector/costCenter/mutations.gql
Normal file
@@ -0,0 +1,29 @@
|
||||
mutation createCostCenter(
|
||||
$name: String!
|
||||
$businessId: UUID!
|
||||
) @auth(level: USER) {
|
||||
costCenter_insert(
|
||||
data: {
|
||||
name: $name
|
||||
businessId: $businessId
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
mutation updateCostCenter(
|
||||
$id: UUID!
|
||||
$name: String
|
||||
$businessId: UUID
|
||||
) @auth(level: USER) {
|
||||
costCenter_update(
|
||||
id: $id,
|
||||
data: {
|
||||
name: $name
|
||||
businessId: $businessId
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
mutation deleteCostCenter($id: UUID!) @auth(level: USER) {
|
||||
costCenter_delete(id: $id)
|
||||
}
|
||||
30
legacy/dataconnect-v1/connector/costCenter/queries.gql
Normal file
30
legacy/dataconnect-v1/connector/costCenter/queries.gql
Normal file
@@ -0,0 +1,30 @@
|
||||
query listCostCenters @auth(level: USER) {
|
||||
costCenters {
|
||||
id
|
||||
name
|
||||
businessId
|
||||
}
|
||||
}
|
||||
|
||||
query getCostCenterById($id: UUID!) @auth(level: USER) {
|
||||
costCenter(id: $id) {
|
||||
id
|
||||
name
|
||||
businessId
|
||||
}
|
||||
}
|
||||
|
||||
query filterCostCenters(
|
||||
$name: String,
|
||||
$businessId: UUID
|
||||
) @auth(level: USER) {
|
||||
costCenters(
|
||||
where: {
|
||||
name: { eq: $name },
|
||||
businessId: { eq: $businessId }
|
||||
}) {
|
||||
id
|
||||
name
|
||||
businessId
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user