Skip to content

Catalog Attribute Families — Datagrid Listing (GraphQL) ​

Cursor-paginated GraphQL query that mirrors the Bagisto admin Catalog → Attribute Families datagrid. Returns the flat family list with filtering, sorting, and cursor pagination.

For how a family's attribute groups and attributes are structured, and the delete guards, see the Attribute Families overview.

Operation ​

OperationTypePagination
adminAttributeFamiliesQueryCursor (first / after)

Arguments ​

ArgumentTypeDescriptionExample
firstIntNumber of items per page (default 10, max 50)10
afterStringCursor from a previous pageInfo.endCursor for keyset pagination"MA=="
lastIntPage size when paging backwards10
beforeStringCursor from a previous pageInfo.startCursor"MA=="
idStringFilter by family ID — single integer or comma-separated list (e.g. "1" or "1,2")"1"
codeStringPartial family code match (SQL LIKE %value%)"default"
nameStringPartial family name match (SQL LIKE %value%)"Apparel"
sortStringColumn to sort by (see Sorting section below)"id"
orderStringSort direction: "asc" or "desc" (default "desc")"desc"

Every filter is a first-class GraphQL argument — pass them alongside first and after, not inside a nested filter object. Filters combine with AND, so each one narrows the result.

Node Fields ​

Each edges[].node object contains:

FieldTypeDescription
idIDAPI Platform IRI (e.g. /api/admin/catalog/families/1)
_idIntRaw family ID
codeStringFamily code (e.g. default, apparel)
nameStringFamily display name (e.g. Default, Apparel)

Fields That Are Not Here ​

The listing is deliberately three fields. Families carry no timestamps at all — there is no createdAt or updatedAt on this resource, unlike every other admin listing — so you cannot sort or filter by date here.

attributeGroups resolves only on adminAttributeFamily(id:); selecting it on the listing returns null.

Sorting ​

Pass sort with the column name and order for direction.

Sortable columns:

sort valueSorts by
idFamily ID (default)
codeFamily code
nameFamily display name

Cursor Pagination ​

  • first controls the page size (default 10, max 50).
  • To fetch the next page, pass the pageInfo.endCursor value as after in the next request.
  • totalCount reflects the full count of matching families across all pages.

Notes ​

  • Same provider as the REST endpoint — AdminAttributeFamilyCollectionProvider serves both transports with identical filter and sort semantics.
  • Only 3 node fields are available. The listing is intentionally slim — id, _id, code, name. No timestamps exist on the table and attribute groups are not embedded in the listing.
  • extraArgs declares custom arguments. The filter/sort arguments are not part of the standard API Platform GraphQL schema for QueryCollection — they are explicitly declared via extraArgs on the operation. Pass them at the top level of the query, alongside first and after.
  • attributeGroups is not a field in this query. It is only populated by the item query adminAttributeFamily(id: ID!). Requesting attributeGroups in the collection query will cause a GraphQL schema error.

Released under the MIT License.