AlmondTill/G3N API

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.

Arguments

NameTypeRequiredNotes
typeString String!yesNo further notes.
idID ID!yesThe 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