new query to validate if a hub has orders before delete
This commit is contained in:
@@ -392,3 +392,43 @@ query getRapidOrders(
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#to validate if an hub has orders before delete
|
||||
query listOrdersByBusinessAndTeamHub(
|
||||
$businessId: UUID!
|
||||
$teamHubId: UUID!
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
) @auth(level: USER) {
|
||||
orders(
|
||||
where: {
|
||||
businessId: { eq: $businessId }
|
||||
teamHubId: { eq: $teamHubId }
|
||||
}
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
orderBy: { createdAt: DESC }
|
||||
) {
|
||||
id
|
||||
eventName
|
||||
orderType
|
||||
status
|
||||
duration
|
||||
|
||||
businessId
|
||||
vendorId
|
||||
teamHubId
|
||||
|
||||
date
|
||||
startDate
|
||||
endDate
|
||||
|
||||
requested
|
||||
total
|
||||
notes
|
||||
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user