Shaping of complex fields

The schema maps closely with the CE object model of classes and properties. Many fields of an interface or type correspond to CE object valued properties – single, list, or enum. These fields can be further shaped in the output data to return these additional objects.

In most cases the data is requested from CE in a single round trip using the appropriate property filter.

Shaping a single value object:
{
  document(
    repositoryIdentifier:"OS1"
    identifier:"{D0D98E6A-0000-CD12-BB33-2DC8E5CABEE1}"
  )
  {
    id
    name
    versionSeries {
      id
      isReserved
      isVersioningEnabled
    }
  }
}
Permissions are one example of dependent objects in the CE object model. Dependent objects are returned as an array of objects. The fields of the dependent objects can be shaped:
{
  folder(repositoryIdentifier:"OS1", 
  identifier:"/Folder for Browsing/GraphQL Folder") {
    id
    name
    permissions {
      permissionSource
      inheritableDepth
      ... on AccessPermissionType {
        granteeName
        granteeType
        accessType
        accessMask
      }
    }
  }
}
Many CE properties reference a collection of other independent objects. These collections are returned as an enumeration. In GraphQL the collections are returned as a type such as DocumentSet, FolderSet or IndependentObjectSet. These types return the collection itself and also page information if all the items could not be returned in a single page. The fields of the Set object and the independent objects themselves can be shaped:
{
  folder(
    repositoryIdentifier:"OS1"
    identifier:"/Folder for Browsing")
  {
    name
    id
    containedDocuments {
      documents {
        id
        name
        mimeType
        majorVersionNumber
        minorVersionNumber
      }
      pageInfo {
        token
      }
    }
  }
}