On this page
relationshipCounts
query · in the family Reading your records
What it does
How many records point at this one, per family — the folder counts on a record’s Explore page.
How many records point at ONE record, per referencing family and field: the doors derive from the declared filter rosters (every family whose ref field names type), and EACH COUNT IS THAT DOOR'S OWN FILTERED LISTING'S matchCount — the number the door shows when opened, by construction (the doomed-drop and the tenant fence are the listing's). A family whose listing the caller's roles refuse is OMITTED (never 0). BOUNDED: the call hydrates at most 5000 rows across every door family — the families are measured keys-only first and walk smallest-first; a family that does not fit answers count null and partial: true rides the answer (the face renders the glyph alone). type must be a known construct type (VALIDATION/INVALID names it); id is any id — a foreign or unknown id counts zero everywhere (no existence read). Requires authentication.
What happens
A read over the same listings each door opens; a family too large for one call answers no number rather than a guess.
Who may call it
Capability area: Reading your records — Looking up and listing the records of your organization.
- Owner
- System Administrator
- Manager
- Associate Manager
- Warehouse Associate
- Sales Associate
- An API key whose scope allows
api:relationshipCounts
Arguments
| Name | Type | Required | Notes |
|---|---|---|---|
type | String String! | yes | No further notes. |
id | ID ID! | yes | The id of the record. |
Returns
RelationshipCounts RelationshipCounts! — The relationshipCounts answer: every door the caller may open (a family whose listing the caller's roles refuse is OMITTED, never 0) with its count; partial = at least one door answered null (the hydration budget ran out on that family).
Example request
query ExampleRelationshipCounts($type: String!, $id: ID!) {
relationshipCounts(type: $type, id: $id) {
partial
}
}
Variables:
{
"type": "<type>",
"id": "01900000-0000-7000-8000-37386ae00000"
}
Example response
{
"data": {
"relationshipCounts": {
"partial": true
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": null,
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}
Errors this call can answer
VALIDATION/INVALID— Something in the request is not valid. (VALIDATION)AUTHN/REQUIRED— Sign in to do this. (AUTHN)AUTHZ/FORBIDDEN— Your role does not allow this action. (AUTHZ)RATE_LIMIT/THROTTLED— Too many requests in a short time. (RATE_LIMIT)NOT_FOUND/*— That record could not be found. (NOT_FOUND)