AlmondTill/G3N API

On this page

collectionProducts

query · in the family Reading your records

What it does

What a collection actually contains right now — the evaluated product list (pins plus rule matches).

THE MEMBERSHIP EVALUATION: a collection's products = its pins UNION (predicate matches MINUS exclusions), gated to ACTIVE products of ACTIVE styles, ordered per sortMode (newest | price-asc | price-desc | manual-pins-first). A static collection reads as its ACTIVE members' surviving products by ordinal (all pinned). A STAGED (inactive) collection EVALUATES — previewing is what staging is for; a doomed one reads as an empty list. Requires authentication; the collection is tenant-scoped server-side.

What happens

Reads only.

Who may call it

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

Arguments

NameTypeRequiredNotes
collectionIdID ID!yesNo further notes.

Returns

CollectionProductHit [CollectionProductHit!]! — One evaluated collection hit: the surviving Product + whether an ACTIVE CollectionMember record backs it (a pin on dynamic collections; every static hit is member-backed).

Example request

query ExampleCollectionProducts($collectionId: ID!) {
  collectionProducts(collectionId: $collectionId) {
    pinned
  }
}

Variables:

{
  "collectionId": "01900000-0000-7000-8000-8d2b0a040000"
}

Example response

{
  "data": {
    "collectionProducts": [
      {
        "pinned": true
      }
    ]
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer