fix: Update staffDocument mutation file
This commit is contained in:
@@ -31,6 +31,42 @@ mutation updateStaffDocument(
|
||||
data: {
|
||||
status: $status
|
||||
documentUrl: $documentUrl
|
||||
expiryDate: $expiryDate
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# UPSERT STAFF DOCUMENT
|
||||
# Creates the document record if it does not exist, or updates
|
||||
# it if it already exists (matched by staffId + documentId key).
|
||||
# Use this when uploading a document for the first time or
|
||||
# re-uploading/updating an existing one.
|
||||
#
|
||||
# To update multiple documents in a single network call, use
|
||||
# aliased mutations in one GraphQL request from the client:
|
||||
#
|
||||
# mutation {
|
||||
# doc1: upsertStaffDocument(staffId: $id, staffName: $name, documentId: $d1, ...)
|
||||
# doc2: upsertStaffDocument(staffId: $id, staffName: $name, documentId: $d2, ...)
|
||||
# }
|
||||
# ------------------------------------------------------------
|
||||
mutation upsertStaffDocument(
|
||||
$staffId: UUID!
|
||||
$staffName: String!
|
||||
$documentId: UUID!
|
||||
$status: DocumentStatus!
|
||||
$documentUrl: String
|
||||
$expiryDate: Timestamp
|
||||
) @auth(level: USER) {
|
||||
staffDocument_upsert(
|
||||
data: {
|
||||
staffId: $staffId
|
||||
staffName: $staffName
|
||||
documentId: $documentId
|
||||
status: $status
|
||||
documentUrl: $documentUrl
|
||||
expiryDate: $expiryDate
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user