UmweltDocs
Reference/Queries/whoHolds
whoHoldsquerysince 0.1

Everyone who holds a claim at a position, believers of the opposite included.

Request
umwelt call story.umw whoHolds '{
  "projectId": "ball",
  "claim": {
    "subject": "bob",
    "predicate": "stole",
    "object": { "kind": "entity", "id": "necklace" },
    "polarity": true
  },
  "at": { "tick": 3 }
}'
Request
const result = await client.whoHolds({ projectId: 'ball', claim: theft, at: { tick: 3 } });
Request
var result = engine.WhoHolds(new WhoHoldsPayload
{
    ProjectId = "ball",
    Claim = theft,
    At = new At { Tick = 3 },
});
Response
[
  {
    "holder": "ana",
    "attitude": "knows",
    "confidence": 1.0,
    "polarity": true,
    "recordId": "ana-saw"
  },
  {
    "holder": "bob",
    "attitude": "knows",
    "confidence": 1.0,
    "polarity": true,
    "recordId": "bob-did"
  },
  {
    "holder": "duchess",
    "attitude": "believes",
    "confidence": 0.8,
    "polarity": false,
    "recordId": "duchess-told"
  }
]

Payload

FieldTypeDescription
projectIdrequiredstringThe project to read.
claimClaimThe claim, by its parts: subject, predicate, object and polarity. Give claim or claimKey.
claimKeystringThe claim by its stable key. See Claim keys.
atAtdefault {}Where to read: tick, an optional axis, and asOfVersion. Defaults to the latest.
filterWhoHoldsFilterdefault {"attitude":[]}Narrows the list: attitude (any of the ones listed), polarity, and memberOf, only members of that group at the position.
timelineIdstringdefault "main"The timeline to read.

Result

A list of WhoHoldsItem, each with:

FieldTypeDescription
holderalwaysstringWho holds it.
attitudealways"knows" | "believes" | "suspects" | "remembers"How it is held.
confidencealwaysnumberBetween 0 and 1.
polarityalwaysbooleanTrue: they hold the claim. False: they hold that it is not so.
recordIdalwaysstringThe Holding behind it: the latest, in story order.

Rules

Being there is not knowing. Participants of the event, people aware of the subject and members of a group are not listed unless they hold the claim themselves.

Both polarities answer. Someone who holds that the claim is false is listed, with polarity: false. Filter on polarity to keep one side.

Membership is read at the position. With memberOf, a member who left the group before at is not counted.

Errors

VALIDATION_FAILEDThe payload is malformed, or gives neither claim nor claimKey.
NOT_FOUNDThe project or timeline does not exist, or the draft read was purged.
INVALID_STATEThe timeline read is a draft that was promoted. details.promotedInto names the timeline to read instead.
HANDSHAKE_REQUIREDOver the protocol, hello was not sent first.

Every code is listed in Errors.

See also

Was this page helpful?