GraphQL schema

Data access in MintJams CMS is consolidated into GraphQL. Content (JCR), workspaces, the cluster, BPM and EIP are all handled through one API.

Endpoint & calling

POST /bin/graphql.cgi/<workspace>
GET  /bin/graphql.cgi/<workspace>?query=...
  • <workspace> is the target workspace name (e.g. system, web)
  • an authenticated session is required (guests are rejected)
  • Content-Type: application/json; the body is a standard GraphQL request (query and optional variables)
  • the response is { "data": ..., "errors": [...] }
  • Subscriptions are delivered over SSE (Server-Sent Events)

Queries (excerpt, by domain)

Content (JCR)

  • node(path) — fetch a node by path
  • children(path, first, after) / references(path, ...) — list children / referrers
  • query(statement, language, ...) / xpath(query, ...) / search(text, path, ...) — search (JCR-SQL2 / XPath / full-text)
  • accessControl(path) / versionHistory(path) — ACL / version history

Workspace / cluster / apps

  • workspaces / cluster / apps(path, ...)

BPM

  • processDefinitions(...) / processInstances(...) / tasks(...) / taskCounts(...) / incidents(...) (plus the singular processDefinition / processInstance / task / incident)

EIP

  • camelContexts / routes(...) / components / routeTemplates / endpoints
  • routeStats(...) / historyExchanges(...) / historyExchange(exchangeId)

List queries return Relay-style connections (edges { node cursor } pageInfo { hasNextPage endCursor } totalCount).

Mutations (excerpt)

Content: createFolder / createFile / deleteNode / renameNode / setProperties / addMixin / deleteMixin / lockNode / unlockNode / setAccessControl / deleteAccessControl / checkin / checkout / restoreVersion

Upload: initiateMultipartUpload / appendMultipartUploadChunk / completeMultipartUpload / abortMultipartUpload

Workspace: createWorkspace / deleteWorkspace (run asynchronously as jobs)

BPM: startProcess / suspendProcessInstance / cancelProcessInstance / claimTask / assignTask / completeTask / setTaskVariables / deployProcess / setJobRetries / resolveIncident / migrateProcessInstance

EIP: startRoute / stopRoute / suspendRoute / resumeRoute / createRoute / updateRoute / deleteRoute / sendToEndpoint / startCamelContext

Subscriptions (SSE)

  • nodeChanged(path, deep) / queryChanged(statement, ...)
  • taskAssigned(assignee) / taskCompleted(processInstanceId) / processStarted(definitionKey) / processEnded(definitionKey)
  • routeStateChanged(routeId) / systemNotification

Scalars & key enums

  • scalars: DateTime, Long, JSON, Base64
  • enums (excerpt): SortOrder, WorkspaceState (ONLINE/STARTING/FAILED), TaskSortField, RouteState, NodeEventType, NotificationType

Key types

  • Nodepath / name / nodeType / uuid / audit fields / file attributes (mimeType / size / downloadUrl) / lock / properties / children / parent
  • Propertyname and propertyValue (a union of typed values, 22 scalar/array variants)
  • PropertyInput / PropertyValueInput — for setProperties; exactly one of stringValue / longValue / dateValue / referenceValue, …
  • Workspace / ProcessInstance / Task / Route / AccessControl — each carries its state and relations

Examples

Fetch a node:

{
  node(path: "/content/page1") {
    path name nodeType modified
    properties { name propertyValue { __typename ... on StringPropertyValue { value } } }
  }
}

Update properties:

mutation {
  setProperties(path: "/content/page1", properties: [
    { name: "title", value: { stringValue: "New Title" } },
    { name: "tags",  value: { stringArrayValue: ["a", "b"] } }
  ]) { node { path } errors { propertyName message } }
}

Start a process:

mutation {
  startProcess(input: {
    definitionKey: "approvalProcess", businessKey: "DOC-12345",
    variables: [{ name: "amount", type: "Long", value: 10000 }]
  }) { id businessKey startTime }
}

For the data model behind this, see "JCR data model & schema".