Component Grouping
Group components by category, lifecycle status, type, modified-by user, or label — server-side, in a single GraphQL call. Each group returns a capped preview of its components with cursor-based pagination for loading more.
Quick start
query GroupByCategory {
component {
componentGroups(
groupBy: CATEGORY
pagination: { first: 10 }
) {
edges {
node {
key
label
totalCount
components {
edges {
node {
id
name
identifier { displayValue }
}
}
pageInfo {
hasNextPage
}
}
}
}
totalCount
pageInfo {
hasNextPage
endCursor
}
}
}
}This returns up to 10 groups, each containing a preview of up to 50 components sorted by the default order (CREATED_AT DESC). Groups with more than 50 components signal overflow via components.pageInfo.hasNextPage, and the remaining items can be fetched with the componentsInGroup query.
When to use grouping
Use componentGroups when your integration needs to:
Render a grouped UI — category buckets, status lanes, label-based views
Count items per dimension — each group carries a
totalCountwithout a separate aggregation queryCombine grouping with filtering — pass
filteroradvancedFilteralongsidegroupByto scope results before grouping
For flat, ungrouped lists, continue using component.findAll or component.filter.
Grouping dimensions
The ComponentGroupField enum defines the five available dimensions:
CATEGORY
Component category
Category UUID
Category name (e.g., "Capacitor")
LIFECYCLE_STATUS
Custom lifecycle status
Status UUID
Status name (e.g., "Design", "Production")
TYPE
Category type
ASSEMBLY, PART, or DOCUMENT
Same as key, title-cased
MODIFIED_BY
Last-modified user
User UUID
User display name
LABEL
Attached labels
Label UUID
Label display name
Sentinel groups for null values
Components that lack a value for the grouping dimension are collected into synthetic "null-bucket" groups with sentinel keys:
CATEGORY
__uncategorized__
Uncategorized
LIFECYCLE_STATUS
__unknown-status__
Unknown status
TYPE
__unknown-type__
Unknown type
MODIFIED_BY
__unknown-user__
Unknown user
LABEL
__no-label__
No label
Sentinel groups always sort last in the response. Your integration should handle these keys gracefully — they are stable strings, not UUIDs.
Pagination across groups
The outer componentGroups connection uses offset-based cursor pagination to page through groups:
totalCount on the outer connection is the total number of groups matching the active filters, not the number returned on this page. Use it for "Showing 1-5 of 12 groups" labels.
Loading more components in a group
Each group's components connection is capped at 50 items. When components.pageInfo.hasNextPage is true, use componentsInGroup to fetch the next batch:
The groupKey matches the key field from the parent group. For sentinel groups, use the sentinel string directly (e.g., "__uncategorized__").
componentsInGroup uses keyset cursor pagination — pass the last edge's cursor as after to advance. The cursor encodes the sort-field value and the component ID, so it's tied to the orderBy you specify. Changing the sort field or direction invalidates previous cursors.
Filtering + grouping
Both filter (simple) and advancedFilter (AND/OR logic) work with componentGroups. When both are provided, advancedFilter takes priority and the simple filter is ignored.
Simple filter
Advanced filter
Wildcard patterns
Text conditions inside advancedFilter accept like patterns, so you can group a wildcard-matched set of components. A leading % matches by suffix — the equivalent of the search bar's *-00100:
See Searching and Filtering for the full AdvancedComponentFilterInput reference and the Search Query Syntax reference for the search-bar * equivalents.
Sorting within groups
Control how components are ordered inside each group using pagination.orderBy:
Available sort fields:
NAME
Component name (alphabetical)
CPN
Component Part Number (identifier display value)
CREATED_AT
Creation timestamp
UPDATED_AT
Last-modified timestamp
Directions: ASC, DESC
Default: When orderBy is omitted, components are sorted by CREATED_AT DESC (most recently created first). This matches the default behavior of component.findAll and component.filter.
Complete API reference
ComponentGroupField
componentGroups field
ComponentGroupConnection
ComponentGroup
componentsInGroup field
PaginationInput
Next steps
Learn about Searching and Filtering for the full filter reference
Explore Components for create, update, and assembly operations
Set up Webhooks to react to component changes in real-time
Last updated
Was this helpful?