Reference

Queries

Package Trax.Api.GraphQLSurface GraphQL schemaSource RootQuery.cs, OperationsQueries.cs

The root query type, RootQuery, has two namespaces:

type Query {
  discover: DiscoverQueries!
  operations: OperationsQueries!  # only when ExposeOperationQueries() is set
}
NamespaceResolved byHoldsPage
discoverDiscoverQueriesOne generated field per train marked [TraxQuery], and the query model fieldsdiscover queries
operationsOperationsQueriesHealth, trains, manifests, executions, machine instances, and the nested namespaces below. Off by default: the host opts in with ExposeOperationQueries()this page, below
operations.deadLettersDeadLetterQueriesDead letters and the requeue-all joboperations.deadLetters queries
operations.configConfigQueriesScheduler settings, environment, version, log levelsoperations.config queries
operations.metricsMetricsQueriesDashboard metrics and process metricsoperations.metrics queries
operations.logsLogQueriesThe trax.log tableoperations.logs queries
operations.manifestGroupsManifestGroupQueriesManifest groups and their dependency graphsoperations.manifestGroups queries
operations.workQueueWorkQueueQueriesThe work queueoperations.workQueue queries

Every paged field returns PagedResult.

Operations queries

The fields directly under operations, each on the page that documents it.

health

The scheduler's health, as the /trax/health check reports it, for the dashboard; a monitor reads /trax/health. operations: system queries

trains

Every registered train with its input schema. operations: system queries

adminTrainNames

The full names of the scheduler's own trains. operations: system queries

hosts

The processes that have run trains. operations: system queries

trainStats

Run counts for one train. operations: system queries

effects

The effects registered in the API process and their settings. operations: system queries

manifests

The paged manifest list. operations: manifest queries

manifestDetail

One manifest with its input and scheduling settings. operations: manifest queries

manifestStats

Run counts for one manifest. operations: manifest queries

manifestExclusions

A manifest's exclusion windows. operations: manifest queries

executions

The paged, filtered execution list. operations: execution queries

executionDetail

One execution with its input, output and stack trace. operations: execution queries

executionChildren

The runs started from inside one run. operations: execution queries

junctionRuns

The steps one run recorded. operations: execution queries

runGraph

One run drawn on its train's declared chain. operations: execution queries

decisions

One run's recorded decisions. operations: execution queries

machines

Every registered machine with its graph, with or without instances. operations: machine queries

machineInstances

The paged list of persisted state machine instances. operations: machine queries

machineInstance

One instance with the runs it invoked. operations: machine queries

machineInstanceCounts

Instance counts by machine, state and owner kind. operations: machine queries

bulkOperations

The bulk operations this node knows, newest first. operations: bulk operations

bulkOperation

One bulk operation, with its failures. operations: bulk operations

deadLetters (nested under operations)

deadLetters, deadLetter and requeueAllJob: operations.deadLetters queries.

config (nested under operations)

scheduler, environmentName, version, logLevels and canManagePersistedOperations: operations.config queries.

metrics (nested under operations)

dashboard, server and serverCpuPercent: operations.metrics queries.

logs (nested under operations)

logs: operations.logs queries.

manifestGroups (nested under operations)

groups, group, stats, graph and dependencyGraph: operations.manifestGroups queries.

workQueue (nested under operations)

workQueues and detail: operations.workQueue queries.

detail

One work queue entry with its input. operations.workQueue queries

Train inputs and the operations gate

An execution's input, a manifest's properties and a work queue entry's input are on executionDetail, manifestDetail and workQueue.detail only, never on a list type, and an effect's settings are on effects. All of them sit under the operations namespace, so the gate it carries (GateOperations(...) or GateOperationsToAuthenticatedUsers(), see AddTraxGraphQL) decides who reads them. There is no separate field-level gate: a caller who can read one execution's input can read a manifest's properties too. Authorization explains the choice.

A member marked [TraxSensitive] is masked in all three, written as {"_redacted": true}. An execution's input is recorded that way. A manifest's properties and a work queue entry's input are stored with the real value, because a run starts from them, so the read masks them: it reads the stored JSON back as the input type of the train registered on this host and writes it with the mask. When the host has no registered train whose input type the copy names, or the JSON does not read as that type, the whole value reads as {"_redacted": true}.

A member whose declared type does not say what it holds is masked on those two reads whether or not anything under it is marked: object, JsonElement, JsonNode, JsonDocument, a collection without an element type, and a collection or dictionary whose elements are one of those. The copy was stored from the runtime value, so record Pay(object Details) holding a Card with a [TraxSensitive] Number stores the number, and reading it back as Pay gives JSON with no member left to mark. Such a member reads as {"_redacted": true}; the members whose types are declared read as stored.

An effect's settings on effects are written from the settings object itself, so a [TraxSensitive] member at any depth there reads as {"_redacted": true} too.

See also