62 lines
913 B
GraphQL
62 lines
913 B
GraphQL
query listRequiredDocs @auth(level: USER) {
|
|
requiredDocs {
|
|
id
|
|
name
|
|
description
|
|
status
|
|
staffId
|
|
fileUrl
|
|
createdAt
|
|
updatedAt
|
|
createdBy
|
|
}
|
|
}
|
|
|
|
query getRequiredDocById($id: UUID!) @auth(level: USER) {
|
|
requiredDoc(id: $id) {
|
|
id
|
|
name
|
|
description
|
|
status
|
|
staffId
|
|
fileUrl
|
|
createdAt
|
|
updatedAt
|
|
createdBy
|
|
}
|
|
}
|
|
|
|
query getRequiredDocsByStaffId($staffId: UUID!) @auth(level: USER) {
|
|
requiredDocs(where: { staffId: { eq: $staffId } }) {
|
|
id
|
|
name
|
|
description
|
|
status
|
|
staffId
|
|
fileUrl
|
|
createdAt
|
|
updatedAt
|
|
createdBy
|
|
}
|
|
}
|
|
|
|
query filterRequiredDocs(
|
|
$staffId: UUID
|
|
$status: ReqDocumentStatus
|
|
$name: String
|
|
) @auth(level: USER) {
|
|
requiredDocs(
|
|
where: {
|
|
staffId: { eq: $staffId }
|
|
status: { eq: $status }
|
|
name: { eq: $name }
|
|
}
|
|
) {
|
|
id
|
|
name
|
|
status
|
|
staffId
|
|
fileUrl
|
|
}
|
|
}
|