feat: Integrate Data Connect and Implement Staff List View Directory
This commit is contained in:
73
backend/dataconnect/example/team/mutations.gql
Normal file
73
backend/dataconnect/example/team/mutations.gql
Normal file
@@ -0,0 +1,73 @@
|
||||
mutation createTeam(
|
||||
$teamName: String!
|
||||
$ownerId: UUID!
|
||||
$ownerName: String!
|
||||
$ownerRole: String!
|
||||
$email: String
|
||||
$companyLogo: String
|
||||
$totalMembers: Int
|
||||
$activeMembers: Int
|
||||
$totalHubs: Int
|
||||
$departments: Any
|
||||
$favoriteStaffCount: Int
|
||||
$blockedStaffCount: Int
|
||||
$favoriteStaff: Any
|
||||
$blockedStaff: Any
|
||||
) @auth(level: USER) {
|
||||
team_insert(
|
||||
data: {
|
||||
teamName: $teamName
|
||||
ownerId: $ownerId
|
||||
ownerName: $ownerName
|
||||
ownerRole: $ownerRole
|
||||
email: $email
|
||||
companyLogo: $companyLogo
|
||||
totalMembers: $totalMembers
|
||||
activeMembers: $activeMembers
|
||||
totalHubs: $totalHubs
|
||||
departments: $departments
|
||||
favoriteStaffCount: $favoriteStaffCount
|
||||
blockedStaffCount: $blockedStaffCount
|
||||
favoriteStaff: $favoriteStaff
|
||||
blockedStaff: $blockedStaff
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
mutation updateTeam(
|
||||
$id: UUID!
|
||||
$teamName: String
|
||||
$ownerName: String
|
||||
$ownerRole: String
|
||||
$companyLogo: String
|
||||
$totalMembers: Int
|
||||
$activeMembers: Int
|
||||
$totalHubs: Int
|
||||
$departments: Any
|
||||
$favoriteStaffCount: Int
|
||||
$blockedStaffCount: Int
|
||||
$favoriteStaff: Any
|
||||
$blockedStaff: Any
|
||||
) @auth(level: USER) {
|
||||
team_update(
|
||||
id: $id
|
||||
data: {
|
||||
teamName: $teamName
|
||||
ownerName: $ownerName
|
||||
ownerRole: $ownerRole
|
||||
companyLogo: $companyLogo
|
||||
totalMembers: $totalMembers
|
||||
activeMembers: $activeMembers
|
||||
totalHubs: $totalHubs
|
||||
departments: $departments
|
||||
favoriteStaffCount: $favoriteStaffCount
|
||||
blockedStaffCount: $blockedStaffCount
|
||||
favoriteStaff: $favoriteStaff
|
||||
blockedStaff: $blockedStaff
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
mutation deleteTeam($id: UUID!) @auth(level: USER) {
|
||||
team_delete(id: $id)
|
||||
}
|
||||
68
backend/dataconnect/example/team/queries.gql
Normal file
68
backend/dataconnect/example/team/queries.gql
Normal file
@@ -0,0 +1,68 @@
|
||||
query listTeams @auth(level: USER) {
|
||||
teams {
|
||||
id
|
||||
teamName
|
||||
ownerId
|
||||
ownerName
|
||||
ownerRole
|
||||
email
|
||||
companyLogo
|
||||
totalMembers
|
||||
activeMembers
|
||||
totalHubs
|
||||
departments
|
||||
favoriteStaffCount
|
||||
blockedStaffCount
|
||||
favoriteStaff
|
||||
blockedStaff
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
}
|
||||
}
|
||||
|
||||
query getTeamById($id: UUID!) @auth(level: USER) {
|
||||
team(id: $id) {
|
||||
id
|
||||
teamName
|
||||
ownerId
|
||||
ownerName
|
||||
ownerRole
|
||||
email
|
||||
companyLogo
|
||||
totalMembers
|
||||
activeMembers
|
||||
totalHubs
|
||||
departments
|
||||
favoriteStaffCount
|
||||
blockedStaffCount
|
||||
favoriteStaff
|
||||
blockedStaff
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
}
|
||||
}
|
||||
|
||||
query getTeamsByOwnerId($ownerId: UUID!) @auth(level: USER) {
|
||||
teams(where: { ownerId: { eq: $ownerId } }) {
|
||||
id
|
||||
teamName
|
||||
ownerId
|
||||
ownerName
|
||||
ownerRole
|
||||
email
|
||||
companyLogo
|
||||
totalMembers
|
||||
activeMembers
|
||||
totalHubs
|
||||
departments
|
||||
favoriteStaffCount
|
||||
blockedStaffCount
|
||||
favoriteStaff
|
||||
blockedStaff
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user