Relate

Read Responses & Evidence

Relate returns compact evidence by default from get, query, and both kinds of traverse. The same default applies to reads and queries inside an action handler. Values, authorization, freshness rules, and pagination are identical in compact and full modes; only the evidence presentation changes.

Choosing evidence detail

// Compact is the default. Select only the properties needed for the task.
const customer = await objects.Customer.get(customerId, {
  select: ['name', 'status'],
});

// Ask for full provenance when inspecting an observation.
const detailed = await objects.Customer.get(customerId, {
  select: ['name'],
  evidence: 'full',
});

// The same option works with collection reads.
const page = await objects.Customer.query({
  select: ['name'],
  limit: 20,
  evidence: 'compact',
});

An explicit evidence: 'full' makes meta.fields and meta.warnings required in the typed result after checking status: 'ok'. If your options type makes evidence optional, the result includes compact as a possibility even when that option's declared value is 'full': it may be omitted at runtime. Check meta.evidence === 'full' or use optional access in that case.

A later full read is a new authorized read and may observe newer data. It is not a lookup of the exact evidence from an earlier compact response.

Single-object response

get and to-one traversal return one of these shapes. IDs and revisions below are illustrative.

{
  "status": "ok",
  "id": "b2375d21-941a-4bc7-b9ae-669a3b798ecf",
  "data": { "name": "Mothlight", "status": "active" },
  "meta": {
    "evidence": "compact",
    "completeness": "complete",
    "degraded": false,
    "definitionRevision": "sha256:…"
  }
}
{ "status": "not-found" }
FieldMeaning and use
statusok means the object is readable. not-found covers missing and hidden objects without revealing which; it has no id, data, or meta.
idRelate's canonical object ID. Use it in subsequent graph operations. It is not the provider's source key and is present even if id was not selected in data.
dataSelected, authorized property values, keyed by the graph's property names. Fields can be omitted; never assume selection guarantees a value. null, false, 0, and empty strings are legitimate values. Business properties named meta are left untouched.
metaEvidence about this selection, described below. It is separate from business data.

The lower-level @relate/runtime method read returns the same envelope without the top-level id; its caller already supplies the ID. The typed @relate/node get result includes it.

Response metadata

FieldMeaning and use
meta.evidencecompact or full. Identifies the presentation actually returned.
meta.completenesscomplete means every selected field is available or known absent. partial means at least one is forbidden or unavailable. This describes the field selection, not provider coverage.
meta.degradedtrue when the read has stale/unavailable evidence, failed refresh, or retention/ordering warnings. A permission-only omission can be partial with degraded: false. Inspect exceptional fields and warnings for the reason.
meta.definitionRevisionHash of the compiled graph definition used for this read. Use it to associate the response with the model; it is not a data version or snapshot identifier.
meta.fieldsEvidence keyed by selected property name. Full mode includes all selected fields. Compact mode includes only exceptions and omits this member when none exist. Use optional access, such as result.meta.fields?.name.
meta.warningsObservation retention or ordering warnings. Full mode always includes an array, possibly empty. Compact mode omits an empty array but preserves every nonempty warning.

Compact omits a field's evidence only when it is available, fresh, has confirmed retention and ordering, and refresh was not-needed or succeeded. It keeps full evidence for every other field, including known absence, forbidden/unavailable values, stale values, failed or superseded refresh, and uncertain retention or ordering.

Omitted routine evidence does not promise persistent storage or complete provider coverage. Request full evidence if source identity, observation time, or storage durability matters to your decision.

Full field evidence

A full response has meta.evidence: "full" and includes this shape for each available or known absent field:

{
  "status": "available",
  "freshness": "fresh",
  "observedAt": "2026-10-09T07:00:00.000Z",
  "source": "source",
  "sourceDefinitionId": "crm.customers",
  "orderingBasis": "fetch-start",
  "retention": "confirmed",
  "retentionDurability": "volatile",
  "ordering": "confirmed",
  "refresh": "not-needed"
}
FieldValues and use
statusavailable: a value is supplied. absent: an optional value is known to be absent and omitted from data; this still counts as complete. forbidden: the caller lacks the selected field's access group. unavailable: no value can be supplied, including an unknown field, omitted stale value, or undisclosable reference target.
freshnessfresh or stale under this read's freshness rules. Freshness is relative to Relate's observation, not a guarantee that the provider has not changed.
observedAtISO timestamp of the observation. Useful for assessing age. It is not necessarily the provider's last-modified timestamp.
sourcesource for connector-backed values, native for values owned by Relate.
sourceDefinitionIdStable source-definition ID for a source-backed value. Omitted for native values. Identifies the modeled source, not credentials or a provider record key.
orderingBasissource-version if source version ordering is available; otherwise fetch-start. Omitted for native values. Explains how competing observations are ordered.
retentionconfirmed: the observation was retained; failed: retention failed; unconfirmed: its retention outcome is uncertain. A returned value need not have been retained.
retentionDurabilityvolatile for memory storage or persistent for storage that survives process restart. Confirmed retention alone does not imply persistence.
orderingconfirmed or unconfirmed. Whether observation ordering was established. Use this alongside retention when assessing concurrent refreshes.
refreshnot-needed: no refresh was needed; succeeded: refresh succeeded; unavailable: the source could not supply a refresh; invalid: the refreshed observation was invalid; superseded: a newer observation won.

Forbidden and unavailable fields contain only their status:

{
  "revenue": { "status": "forbidden" },
  "manager": { "status": "unavailable" }
}

They contain no private source or policy details. A hidden reference target is indistinguishable from a missing target. Default selection includes only permitted fields, so it does not enumerate forbidden fields.

Warnings

WarningMeaning and use
observation_not_retainedA fetched observation could not be retained. The value may still be returned; do not assume a later read can recover it from storage.
retention_unconfirmedWhether the observation was retained could not be confirmed.
ordering_unconfirmedObservation ordering could not be confirmed. Do not treat the result as proof that no newer observation exists.

Collection responses

query and to-many traversal return a QueryResult. Await it for one page:

{
  "data": [
    {
      "id": "b2375d21-941a-4bc7-b9ae-669a3b798ecf",
      "data": { "name": "Mothlight" },
      "meta": {
        "evidence": "compact",
        "completeness": "complete",
        "degraded": false,
        "definitionRevision": "sha256:…"
      }
    }
  ],
  "meta": { "exhausted": false, "continuationCursor": "opaque-token" }
}
FieldMeaning and use
dataArray of authorized records. Each has id, data, and the same per-record meta described above, but no status member.
meta.exhaustedtrue when the graph scan has finished. false means continuation is required, even when this page has no records.
meta.continuationCursorOpaque continuation token, present exactly when exhausted is false. Pass it as cursor with the same operation, principal, selection, filters and other options; the evidence mode may change between pages. Do not decode or alter it.

Collections enumerate adopted graph members, not all provider records. Exhaustion does not establish provider-wide coverage. Pages are not a frozen snapshot; concurrent changes can affect later reads.

for await automatically follows pages. When returning data to an agent, await one page and pass on its continuation instead of gathering an unbounded array. Compact evidence reduces repetition, but does not bound large values or total collection size. Use select, filters and a small limit as well.

Read options

OptionDefault and behavior
evidencecompact. Set full for every selected field's evidence. Does not change resolution or authorization.
selectAll permitted properties. An explicit array limits returned properties; at most 100 names. An empty array requests no property values.
maxAgeMs60000. Maximum acceptable observation age before attempting refresh. Must be finite and nonnegative.
refreshfalse. true requests refresh even within the freshness window.
staleallow. omit withholds stale values and reports them as unavailable.
requireCompletefalse. true throws ReadError('incomplete') when any selected field is forbidden or unavailable. Known absence is complete; use assertFields to require actual values.
timeoutMs3000. Source-operation timeout; must be greater than zero and at most 10000.
limit25, from 1 to 100. Applies to query and to-many traversal. A page can contain fewer records because of filtering or authorization.
cursorNo continuation by default. Applies to query and to-many traversal.
whereNo filters. Query and to-many traversal: scalar equality or eq/in on the returned object's property names; numbers and timestamps also accept gt/gte/lt/lte. Properties and operators combine with AND. At most 100 properties and 100 values per in. Filter values must conform to the property schema and the caller must have field access.

Invalid requests throw ReadError('invalid-request'). Reads that cannot be performed can throw ReadError('unavailable'); incomplete required evidence can throw ReadError('incomplete'). These are errors, not additional status values. Compact mode does not hide them.

Request errors

An invalid request reports every problem at once, before any record is read:

await consumer.objects.Customer.query({ pageSize: 10, pageIndex: 0 });
ReadError: invalid-request in Customer.query:
- pageSize: unknown option; use "limit" (integer 1–100).
- pageIndex: unknown option; there is no offset or page-number paging; pass page.meta.continuationCursor from the previous page as "cursor", or iterate with for await.
Accepted options: where, select, limit, cursor, evidence, stale, maxAgeMs, refresh, requireComplete, timeoutMs.

The same detail is structured on the error:

error.operation; // 'Customer.query'
error.issues; // [{ path: ['pageSize'], problem: 'unknown-option', message: '…' }, …]
error.acceptedOptions; // present when an option was unknown
problemMeaning
unknown-optionNot a read option. Common paging, filter and selection names point to the generic option.
not-supportedA read option this operation does not take, such as where on a to-one traversal.
invalid-valueAn option, filter value or argument has the wrong type or range; the message says expected.
unknown-propertyA where name that is not a filterable property for this reader; accepted lists them.
unknown-traversalA traversal this reader cannot use from that object; accepted lists those it can.
invalid-cursorA cursor from a different call or options, altered, or expired.

Issues name only options, arguments and properties the reader can already discover. A property the reader may not read and one that does not exist give the same issue, and the cursor issue does not say why a cursor was rejected.

Embedded consumers and the implemented MCP interface use these result and evidence contracts. A standalone HTTP consumer adapter remains planned.

On this page