Updating permissions

Permissions are an example of a dependent object in the CE object model. Most dependent objects are system classes corresponding to system properties and as such there are well known input fields for setting permissions.
The following mutation updates the permissions of a document:
mutation {
  updateDocument(
    repositoryIdentifier:"Daph1"
    identifier:"{A0CC2C69-0000-C618-A0A4-3FA294C1AE56}"
    documentProperties:{
      permissions:{
        replace:[
          {
            type:ACCESS_PERMISSION
            inheritableDepth:OBJECT_ONLY
            accessMask:998903
            subAccessPermission:{
              accessType:ALLOW
              granteeName:"CEAdmin"
            }
          }
        ]
      }
    }
  )
  {
    id
    name
  }
}

The input permissions to a mutation are an example of input types that correspond to a hierarchy of classes in the CE object model (the different classes of Permission). They are represented as input types by a field that indicates the concrete class of object (the type field). Other fields may be common to the base class of object, for example, inheritableDepth. The subAccessPermission sub field references another input type with fields specific to that concrete class of object.