GraphQL Resources
This page provides example GraphQL queries and mutations for accessing and maintaining information in Contract Eagle.
Contract Documents - Folder Configuration
Please refer to the GraphQL Schema, available from your site's /graphql/ui browser UI (eg: https://acme-connect.contracteagle.com/graphql/ui) for field descriptions.
query getFolder ($getFolderInput: DocumentFolderFilterInput)
{
documentFolders(inputFilter: $getFolderInput)
{
folderId
folderName
folderDescription
folderTag
sortOrder
businessUnitId
isActive
lastUpdatedDateUtc
documentFolderBusinessUnit {
businessUnitDescription
}
}
}
With parameter variables
{
"getFolderInput": {
"includeInactive": true,
"folderNameDescriptionFilter": null
}
}
When creating a folder, only a Folder Name and Business Unit Id are required. The Business Unit Id is only used to control access to maintain the folder definition - it does not affect user access on a contract.
Sort order is optional - folders are sorted in the UI by Sort Order if specified, with remaining folders sorted in alphabetic order.
mutation createFolder ($docfolderInput: CreateDocumentFolderInput!)
{
createDocumentFolder (createDocumentFolderInput: $docfolderInput) {
documentFolderId
warnings {
code
message
}
}
}
With parameter variables
{
"docfolderInput": {
"folderName": {string},
"folderDescription": {string?},
"folderTag": {string?},
"sortOrder": {int?},
"businessUnitId": {int}
}
}
When updating a folder, only the Document Folder ID is required. Any fields not being updated should be omitted from the parameter variables.
In order to clear the sort order, set the value to "-1"
mutation updateFolder ($docfolderInput: UpdateDocumentFolderInput!)
{
updateDocumentFolder (updateDocumentFolderInput: $docfolderInput) {
documentFolderId
warnings {
code
message
}
}
}
With parameter variables
{
docfolderInput": {
"documentFolderId": {int},
"folderName": {string?},
"folderDescription": {string?},
"folderTag": {string?},
"sortOrder": {int?},
"businessUnitId": {int?},
"isActive": {bool?}
}
}
A folder will not be deleted if it is referenced from other configuration items (Date Types and Task Types) or has been used on Contracts - in this case the folder will be set to inactive instead. Inactive folders will continue to be available on previously configured Date Types and Task Types and on Contracts containing documents in the folder. Once all documents have been removed from a folder on a contract, an inactive folder will no longer be available on the contract.
mutation deleFolder ($docfolderInput: DeleteOrInactivateDocumentFolderInput!)
{
deleteOrInactivateDocumentFolder (deleteOrInactivateDocumentFolderInput: $docfolderInput) {
documentFolderId
warnings {
code
message
}
}
}
With parameter variables
{
"docfolderInput": {
"documentFolderId": {int}
}
}