72 lines
1.0 KiB
GraphQL
72 lines
1.0 KiB
GraphQL
query listCertificates @auth(level: USER) {
|
|
certificates {
|
|
id
|
|
name
|
|
description
|
|
expiry
|
|
status
|
|
fileUrl
|
|
icon
|
|
staffId
|
|
certificationType
|
|
issuer
|
|
validationStatus
|
|
certificateNumber
|
|
createdAt
|
|
|
|
staff {
|
|
id
|
|
fullName
|
|
}
|
|
}
|
|
}
|
|
|
|
query getCertificateByKey($staffId: UUID!, $certificationType: ComplianceType!)
|
|
@auth(level: USER) {
|
|
certificate(
|
|
key: { staffId: $staffId, certificationType: $certificationType }
|
|
) {
|
|
id
|
|
name
|
|
description
|
|
expiry
|
|
status
|
|
fileUrl
|
|
icon
|
|
certificationType
|
|
issuer
|
|
staffId
|
|
validationStatus
|
|
certificateNumber
|
|
updatedAt
|
|
|
|
staff {
|
|
id
|
|
fullName
|
|
}
|
|
}
|
|
}
|
|
|
|
query listCertificatesByStaffId($staffId: UUID!) @auth(level: USER) {
|
|
certificates(where: { staffId: { eq: $staffId } }) {
|
|
id
|
|
name
|
|
description
|
|
expiry
|
|
status
|
|
fileUrl
|
|
icon
|
|
staffId
|
|
certificationType
|
|
issuer
|
|
validationStatus
|
|
certificateNumber
|
|
createdAt
|
|
|
|
staff {
|
|
id
|
|
fullName
|
|
}
|
|
}
|
|
}
|