AlmondTill/G3N API

searchAll

query · in the family Reading your records

What it does

One search over every kind of record you may read — a word, a code or an id finds products, vendors, contacts and more, grouped by kind.

ONE search over every kind of record you may read — a word, a code or an id finds products, vendors, contacts and more, grouped by kind. The prefix is ONE word (a space inside refuses VALIDATION/INVALID — the face sends one word at a time; slice 3's grammar compiles phrases) of at least 2 folded characters (a one-character prefix is refused, never searched) and at most the caption length; it folds case- and diacritic-insensitively and matches the start of a caption word, the sysId or the record's own code. The lens: only the kinds whose plural read your roles permit ever answer — a hit of any other kind is dropped before the page is cut (a cashier never sees a collaborator's name in a suggestion). first defaults to 20 and clamps to 50; more says rows remained. The variant's SKU is NOT here by the catalogue ruling — resolveIdentifier is its exact door.

Before you call

A bearer session from an API key (see Authentication and key hygiene) or a signed-in user.

Capability area: Reading your records — Looking up and listing the records of your organization.

Roles that may call it:

What happens

Reads only — changes nothing. Only the kinds your role can list ever answer; a variant’s barcode or SKU is found through the identifier lookup instead.

Arguments

NameTypeRequiredNotes
prefixString String!yes
firstIntno

Returns

SearchAllPage SearchAllPage! — ONE typeahead page over every kind of record the caller may read — the hits grouped by type in the searchable-type order; more says rows remained beyond this page (a typeahead page is born bounded — no cursor; a face opens the full results elsewhere).

Example request

graphql
query ExampleSearchAll($prefix: String!, $first: Int) {
  searchAll(prefix: $prefix, first: $first) {
    more
    groups {
      type
      hits {
        id
        sysId
        caption
        status
        token
      }
    }
  }
}

Variables:

json
{
  "prefix": "blue",
  "first": 10
}

Example response

json
{
  "data": {
    "searchAll": {
      "more": false,
      "groups": [
        {
          "type": "User",
          "hits": [
            {
              "id": "01900000-0000-7000-8000-37386ae00000",
              "sysId": "US-EXMP-0000-000F",
              "caption": "Blue jeans",
              "status": "active",
              "token": "blue"
            }
          ]
        }
      ]
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer