UmweltDocs
Reference/Queries/groupCoverage
groupCoveragequerysince 0.1

Who in a group holds a claim, who holds nothing about it, and whether the group itself does.

Request
umwelt call story.umw groupCoverage '{
  "projectId": "ball",
  "group": "household",
  "claim": {
    "subject": "bob",
    "predicate": "stole",
    "object": { "kind": "entity", "id": "necklace" },
    "polarity": true
  },
  "at": { "tick": 6 }
}'
Request
const result = await client.groupCoverage({ projectId: 'ball', group: 'household', claim: theft, at: { tick: 6 } });
Request
var result = engine.GroupCoverage(new GroupCoveragePayload
{
    ProjectId = "ball",
    Group = "household",
    Claim = theft,
    At = new At { Tick = 6 },
});
Response
{
  "group": "household",
  "holding": [
    {
      "holder": "maid",
      "attitude": "believes",
      "confidence": 0.9,
      "polarity": true,
      "recordId": "maid-heard"
    }
  ],
  "members": ["butler", "maid"],
  "missing": ["butler"]
}

Payload

FieldTypeDescription
projectIdrequiredstringThe project to read.
grouprequiredstringThe group entity.
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.
timelineIdstringdefault "main"The timeline to read.

Result

FieldTypeDescription
groupalwaysstringThe group.
membersalwaysstring[]Its members at the position.
holdingalwaysWhoHoldsItem[]Members who hold the claim, with their Holdings.
missingalwaysstring[]Members who hold nothing about it.
groupHoldingWhoHoldsItemThe group’s own Holding, if the group itself holds the claim.

Rules

Members knowing is not the group knowing. groupHolding is the group’s own record. It is absent even when every member holds the claim.

Membership is read at the position. Members are those with an active umwelt:member-of Fact at at.

Errors

VALIDATION_FAILEDThe payload is malformed, or gives neither claim nor claimKey.
NOT_FOUNDThe project, group 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?